* RE: Something seems to be wrong with my RSDP
@ 2005-05-09 20:18 Moore, Robert
[not found] ` <robert.moore-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Moore, Robert @ 2005-05-09 20:18 UTC (permalink / raw)
To: Dean Townsley, acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f; +Cc: Heiko Gerstung
acpi_tb_find_rsdp is the up-to-date version. acpi_find_rsdp should be
removed.
Acpi_tb_find_rsdp correctly searches the EBDA (Extended BIOS Data Area),
and I think that acpi_find_rsdp does not.
Bob
> -----Original Message-----
> From: acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org [mailto:acpi-devel-
> admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf Of Dean Townsley
> Sent: Monday, May 09, 2005 12:01 PM
> To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> Cc: Heiko Gerstung
> Subject: Re: [ACPI] Something seems to be wrong with my RSDP
>
> On Mon, 09 May 2005 12:16:39 -0500 Dean Townsley wrote:
> >
> > So my current guess is that there is an invalid RSDP floating around
> > in addition to the real one, and the first code (which appears less
> > sophisticated) is finding it instead of the real thing.
>
> So far this appears to be what's happening. I just replaced
> acpi_find_rsdp()
> with
> acpi_tb_find_rsdp(ACPI_PHYSICAL_ADDRESSING,&addr)
> (see patch below, with my extra debuging lines)
> and it finds a valid RSDP at a DIFFERENT address than before.
> (Compare the dmesg below to that in my last message) It then goes on
> to find the RSDT etc etc and works fine. It seems that
> acpi_tb_find_rsdp is a little more carful about where it scans (it
> appears to do some checks that the other doesn't).
>
>
> So the question is the same: why does acpi_table_init() use
> acpi_find_rsdp() instead of acpi_tb_find_rsdp(..) ?
> And additionally: is the substitution I've performed acceptable on a
> permanent basis?
>
> Later,
> -Dean
>
>
>
>
> ***********dmesg snippet
>
> Linux version 2.6.11 (dean@odysseus) (gcc version 2.95.4 20011002
(Debian
> prerelease)) #8 Mon May 9 13:03:20 CDT 2005
> BIOS-provided physical RAM map:
> BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
> BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
> BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
> BIOS-e820: 0000000000100000 - 000000000ffc0000 (usable)
> BIOS-e820: 000000000ffc0000 - 000000000ffe0000 (reserved)
> BIOS-e820: 000000000ffe0000 - 000000000ffe8000 (ACPI data)
> BIOS-e820: 000000000ffe8000 - 0000000010000000 (ACPI NVS)
> BIOS-e820: 00000000ffff0000 - 0000000100000000 (reserved)
> 255MB LOWMEM available.
> On node 0 totalpages: 65472
> DMA zone: 4096 pages, LIFO batch:1
> Normal zone: 61376 pages, LIFO batch:14
> HighMem zone: 0 pages, LIFO batch:1
> DMI 2.3 present.
> ACPI: RSDP (v000 Acer ) @ 0x000fe030
> ACPI: RSDP contents signature="RSD PTR " checksum=0x19 oem_id="Acer "
> revision=0x00 rsdt_addr=0x0ffe0000
> ACPI: RSDP checksum=0x0
> ACPI: RSDT (v001 Acer TM100 0x00000001 MSFT 0x00000001) @
0x0ffe0000
> ACPI: FADT (v001 Acer TM100 0x00000001 MSFT 0x00000001) @
0x0ffe0054
> ACPI: BOOT (v001 Acer TM100 0x00000001 MSFT 0x00000001) @
0x0ffe002c
> ACPI: DSDT (v001 Acer AN100 0x00001000 MSFT 0x0100000e) @
0x00000000
> ACPI: PM-Timer IO Port: 0xf008
> Allocating PCI resources starting at 10000000 (gap: 10000000:efff0000)
> Built 1 zonelists
> Kernel command line: BOOT_IMAGE=test26 ro root=306 acpi=force
> Local APIC disabled by BIOS -- you can enable it with "lapic"
> mapped APIC to ffffd000 (01201000)
> Initializing CPU#0
> CPU 0 irqstacks, hard=c04f0000 soft=c04ef000
> PID hash table entries: 1024 (order: 10, 16384 bytes)
> Detected 798.462 MHz processor.
> Using pmtmr for high-res timesource
> Console: colour VGA+ 80x25
> Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
> Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
> Memory: 254696k/261888k available (2566k kernel code, 6684k reserved,
> 1267k data, 168k init, 0k highmem)
> Checking if this processor honours the WP bit even in supervisor
mode...
> Ok.
> Calibrating delay loop... 1585.15 BogoMIPS (lpj=792576)
> Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
> CPU: After generic identify, caps: 0383f9ff 00000000 00000000 00000000
> 00000000 00000000 00000000
> CPU: After vendor identify, caps: 0383f9ff 00000000 00000000 00000000
> 00000000 00000000 00000000
> CPU: L1 I cache: 16K, L1 D cache: 16K
> CPU: L2 cache: 512K
> CPU: After all inits, caps: 0383f9ff 00000000 00000000 00000040
00000000
> 00000000 00000000
> Intel machine check architecture supported.
> Intel machine check reporting enabled on CPU#0.
> CPU: Intel Mobile Intel(R) Pentium(R) III CPU - M 800MHz stepping 04
> Enabling fast FPU save and restore... done.
> Enabling unmasked SIMD FPU exception support... done.
> Checking 'hlt' instruction... OK.
> tbxface-0120 [02] acpi_load_tables : ACPI Tables successfully
> acquired
> Parsing all Control
>
Methods:................................................................
..
> ......................................................
> Table [DSDT](id F004) - 436 Objects with 35 Devices 120 Methods 34
Regions
> ACPI Namespace successfully loaded at root c0505b40
> ACPI: setting ELCR to 0200 (from 0c00)
> evxfevnt-0096 [03] acpi_enable : Transition to ACPI mode
> successful
>
>
> ************patch tested
>
> diff -ur linux-2.6.11-orig/drivers/acpi/tables.c linux-
> 2.6.11/drivers/acpi/tables.c
> --- linux-2.6.11-orig/drivers/acpi/tables.c Wed Mar 2 01:38:07 2005
> +++ linux-2.6.11/drivers/acpi/tables.c Mon May 9 13:02:34 2005
> @@ -572,14 +572,24 @@
> struct acpi_table_rsdp *rsdp = NULL;
> unsigned long rsdp_phys = 0;
> int result = 0;
> + struct acpi_pointer addr;
>
> /* Locate and map the Root System Description Table (RSDP) */
>
> + if
> (ACPI_FAILURE(acpi_find_root_pointer(ACPI_PHYSICAL_ADDRESSING,&addr)))
> + {
> + printk(KERN_ERR PREFIX "Unable to locate RSDP\n");
> + return -ENODEV;
> + }
> +
> + rsdp_phys=addr.pointer.physical;
> + /* old code
> rsdp_phys = acpi_find_rsdp();
> if (!rsdp_phys) {
> printk(KERN_ERR PREFIX "Unable to locate RSDP\n");
> return -ENODEV;
> }
> + */
>
> rsdp = (struct acpi_table_rsdp *) __va(rsdp_phys);
> if (!rsdp) {
> @@ -590,11 +600,14 @@
> printk(KERN_DEBUG PREFIX "RSDP (v%3.3d %6.6s
> ) @ 0x%p\n",
> rsdp->revision, rsdp->oem_id, (void *) rsdp_phys);
>
> + printk(KERN_DEBUG PREFIX "RSDP contents signature=\"%8.8s\"
> checksum=0x%2.2x oem_id=\"%6.6s\" revision=0x%2.2x
rsdt_addr=0x%8.8x\n",
> +
rsdp->signature,rsdp->checksum,rsdp->oem_id,rsdp-
> >revision,rsdp->rsdt_address);
> if (rsdp->revision < 2)
> result = acpi_table_compute_checksum(rsdp, sizeof(struct
> acpi_table_rsdp));
> else
> result = acpi_table_compute_checksum(rsdp, ((struct
> acpi20_table_rsdp *)rsdp)->length);
>
> + printk(KERN_DEBUG PREFIX "RSDP checksum=0x%x\n", result);
> if (result) {
> printk(KERN_WARNING " >>> ERROR: Invalid checksum\n");
> return -ENODEV;
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: NEC IT Guy Games.
> Get your fingers limbered up and give it your best shot. 4 great
events, 4
> opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
> win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
> _______________________________________________
> Acpi-devel mailing list
> Acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/acpi-devel
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r
^ permalink raw reply [flat|nested] 2+ messages in thread
* Patch to update acpi_find_rsdp -- was: Something seems to be wrong with my RSDP
[not found] ` <971FCB6690CD0E4898387DBF7552B90E0170B05A-sBd4vmA9Se5Qxe9IK+vIArfspsVTdybXVpNB7YpNyf8@public.gmane.org>
@ 2005-05-10 4:48 ` Dean Townsley
0 siblings, 0 replies; 2+ messages in thread
From: Dean Townsley @ 2005-05-10 4:48 UTC (permalink / raw)
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Hi all,
On Mon, 9 May 2005 13:18:40 -0700 "Moore, Robert" wrote:
> acpi_tb_find_rsdp is the up-to-date version. acpi_find_rsdp should be
> removed.
>
> Acpi_tb_find_rsdp correctly searches the EBDA (Extended BIOS Data Area),
> and I think that acpi_find_rsdp does not.
>
> Bob
Great! Below is a patch that I think does a clean update.
It appears that acpi_find_rsdp is different on ia64 (no memory scan),
though both i386 and ia64 call its parent acpi_table_init, so
explicitly removing it doesn't look like it will work.
My patch changes arch/i386/kernel/acpi/boot.c so that acpi_find_rsdp
calls acpi_find_root_pointer, which calls acpi_tb_find_rsdp. This
seems like the right thing so that i386 will always use the better
scanning code.
I've also preserved the old i386 acpi_find_rsdp in
arch/i386/mach-es7000/es7000plat.c -- this may be unnecessary, but
not knowing anything about the es7000 I figured I'd play it safe. (I
think I added the right includes so it will compile.) I put in a
FIXME note mentioning there is a more general version.
It seems to work on my Travelmate C100, finding the right rsdp and
all.
Please, comments welcome, I just figured I'd make a first stab.
Thanks to all for your hard work!
Cheers,
-Dean
diff -ur linux-2.6.11-orig/arch/i386/kernel/acpi/boot.c linux-2.6.11/arch/i386/kernel/acpi/boot.c
--- linux-2.6.11-orig/arch/i386/kernel/acpi/boot.c Wed Mar 2 01:38:25 2005
+++ linux-2.6.11/arch/i386/kernel/acpi/boot.c Mon May 9 21:59:24 2005
@@ -506,27 +506,6 @@
EXPORT_SYMBOL(acpi_unmap_lsapic);
#endif /* CONFIG_ACPI_HOTPLUG_CPU */
-static unsigned long __init
-acpi_scan_rsdp (
- unsigned long start,
- unsigned long length)
-{
- unsigned long offset = 0;
- unsigned long sig_len = sizeof("RSD PTR ") - 1;
-
- /*
- * Scan all 16-byte boundaries of the physical memory region for the
- * RSDP signature.
- */
- for (offset = 0; offset < length; offset += 16) {
- if (strncmp((char *) (start + offset), "RSD PTR ", sig_len))
- continue;
- return (start + offset);
- }
-
- return 0;
-}
-
static int __init acpi_parse_sbf(unsigned long phys_addr, unsigned long size)
{
struct acpi_table_sbf *sb;
@@ -630,21 +609,11 @@
unsigned long __init
acpi_find_rsdp (void)
{
+ struct acpi_pointer addr;
unsigned long rsdp_phys = 0;
- if (efi_enabled) {
- if (efi.acpi20)
- return __pa(efi.acpi20);
- else if (efi.acpi)
- return __pa(efi.acpi);
- }
- /*
- * Scan memory looking for the RSDP signature. First search EBDA (low
- * memory) paragraphs and then search upper memory (E0000-FFFFF).
- */
- rsdp_phys = acpi_scan_rsdp (0, 0x400);
- if (!rsdp_phys)
- rsdp_phys = acpi_scan_rsdp (0xE0000, 0xFFFFF);
+ if (!ACPI_FAILURE(acpi_find_root_pointer(ACPI_PHYSICAL_ADDRESSING,&addr)))
+ rsdp_phys=addr.pointer.physical;
return rsdp_phys;
}
diff -ur linux-2.6.11-orig/arch/i386/mach-es7000/es7000plat.c linux-2.6.11/arch/i386/mach-es7000/es7000plat.c
--- linux-2.6.11-orig/arch/i386/mach-es7000/es7000plat.c Wed Mar 2 01:38:26 2005
+++ linux-2.6.11/arch/i386/mach-es7000/es7000plat.c Mon May 9 21:23:15 2005
@@ -35,6 +35,7 @@
#include <linux/reboot.h>
#include <linux/init.h>
#include <linux/acpi.h>
+#include <linux/efi.h>
#include <asm/io.h>
#include <asm/nmi.h>
#include <asm/smp.h>
@@ -75,6 +76,52 @@
#endif // (CONFIG_X86_IO_APIC) && (CONFIG_ACPI_INTERPRETER || CONFIG_ACPI_BOOT)
+
+static unsigned long __init
+es7000_acpi_scan_rsdp (
+ unsigned long start,
+ unsigned long length)
+{
+ unsigned long offset = 0;
+ unsigned long sig_len = sizeof("RSD PTR ") - 1;
+
+ /*
+ * Scan all 16-byte boundaries of the physical memory region for the
+ * RSDP signature.
+ */
+ for (offset = 0; offset < length; offset += 16) {
+ if (strncmp((char *) (start + offset), "RSD PTR ", sig_len))
+ continue;
+ return (start + offset);
+ }
+
+ return 0;
+}
+
+
+unsigned long __init
+es7000_acpi_find_rsdp (void)
+{
+ unsigned long rsdp_phys = 0;
+
+ if (efi_enabled) {
+ if (efi.acpi20)
+ return __pa(efi.acpi20);
+ else if (efi.acpi)
+ return __pa(efi.acpi);
+ }
+ /*
+ * Scan memory looking for the RSDP signature. First search EBDA (low
+ * memory) paragraphs and then search upper memory (E0000-FFFFF).
+ */
+ rsdp_phys = es7000_acpi_scan_rsdp (0, 0x400);
+ if (!rsdp_phys)
+ rsdp_phys = es7000_acpi_scan_rsdp (0xE0000, 0xFFFFF);
+
+ return rsdp_phys;
+}
+
+
/*
* Parse the OEM Table
*/
@@ -153,7 +200,8 @@
int i;
struct acpi_table_sdt sdt;
- rsdp_phys = acpi_find_rsdp();
+ /* FIXME -- can we use the general acpi_find_rsdp() ? */
+ rsdp_phys = es7000_acpi_find_rsdp();
rsdp = __va(rsdp_phys);
if (rsdp->rsdt_address) {
struct acpi_table_rsdt *mapped_rsdt = NULL;
-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-05-10 4:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-09 20:18 Something seems to be wrong with my RSDP Moore, Robert
[not found] ` <robert.moore-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
[not found] ` <971FCB6690CD0E4898387DBF7552B90E0170B05A-sBd4vmA9Se5Qxe9IK+vIArfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2005-05-10 4:48 ` Patch to update acpi_find_rsdp -- was: " Dean Townsley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox