[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] [Xen] Check FADT's signature
Again the output and the debugging changes to acpi/boot.c. There are 5 additional calls to the fadt parser. Stefan [...] (XEN) sign: RSDT; name=RSDT0 (XEN) ACPI: RSDT (v001 IBM SERBLADE 0x00001000 IBM 0x45444f43) @ 0x3ffcff80 (XEN) (2) Mapped 0x3ffcfec0 to fff9bec0, base = 0xfff9b000 (XEN) (2) Mapped 0x3ffcfec0 to fff9bec0, base = 0xfff9b000 (XEN) sign: FACP; name=FADT (XEN) ACPI: FADT (v002 IBM SERBLADE 0x00001000 IBM 0x45444f43) @ 0x3ffcfec0 (XEN) std_entry[0].id = 7,matches sign FACP (XEN) (2) Mapped 0x3ffcfe00 to fff9be00, base = 0xfff9b000 (XEN) (2) Mapped 0x3ffcfe00 to fff9be00, base = 0xfff9b000 (XEN) sign: APIC; name=MADT (XEN) ACPI: MADT (v001 IBM SERBLADE 0x00001000 IBM 0x45444f43) @ 0x3ffcfe00 (XEN) std_entry[1].id = 1,matches sign APIC (XEN) (2) Mapped 0x3ffcfdc0 to fff9bdc0, base = 0xfff9b000 (XEN) (2) Mapped 0x3ffcfdc0 to fff9bdc0, base = 0xfff9b000 (XEN) sign: MCFG; name=MCFG< (XEN) ACPI: MCFG (v001 IBM SERBLADE 0x00001000 IBM 0x45444f43) @ 0x3ffcfdc0 (XEN) std_entry[2].id = 18,matches sign MCFG (XEN) (2) Mapped 0x3ffcfec0 to fff9bec0, base = 0xfff9b000 (XEN) (2) Mapped 0x3ffbe4a8 to fff9b4a8, base = 0xfff9b000 (XEN) sign: DSDT; name=DSDT (XEN) ACPI: DSDT (v001 IBM SERBLADE 0x00001000 INTL 0x02002025) @ 0x00000000 (XEN) NUMA turned off (XEN) Faking a node at 0000000000000000-000000003ffb0000 (XEN) Xen heap: 9MB (10184kB) (XEN) Domain heap initialised: DMA width 32 bits (XEN) PAE enabled, limit: 16 GB (XEN) found SMP MP-table at 0009d540 (XEN) DMI 2.3 present. (XEN) (1) Mapped 0xf601f to ff0f601f (XEN) Using APIC driver default (XEN) IN acpi_parse_fadt. (XEN) (2) Mapped 0x3ffcfec0 to fff9bec0, base = 0xfff9b000 (XEN) ACPI: Invalid FADT signature A__ADR (XEN) IN acpi_parse_fadt. (XEN) (2) Mapped 0x3ffcfec0 to fff9bec0, base = 0xfff9b000 (XEN) ACPI: PM-Timer IO Port: 0x588 (XEN) (2) Mapped 0x3ffcfd80 to fff9bd80, base = 0xfff9b000 (XEN) ACPI: ACPI SLEEP INFO: pm1x_cnt[584,0], pm1x_evt[580,0] (XEN) wakeup_vec[3ffcfd8c], vec_size[20] (XEN) IN acpi_parse_fadt. (XEN) (2) Mapped 0x3ffcfec0 to fff9bec0, base = 0xfff9b000 (XEN) ACPI: PM-Timer IO Port: 0x588 (XEN) (2) Mapped 0x3ffcfd80 to fff9bd80, base = 0xfff9b000 (XEN) ACPI: ACPI SLEEP INFO: pm1x_cnt[584,0], pm1x_evt[580,0] (XEN) wakeup_vec[3ffcfd8c], vec_size[20] (XEN) IN acpi_parse_fadt. (XEN) (2) Mapped 0x3ffcfec0 to fff9bec0, base = 0xfff9b000 (XEN) ACPI: PM-Timer IO Port: 0x588 (XEN) (2) Mapped 0x3ffcfd80 to fff9bd80, base = 0xfff9b000 (XEN) ACPI: ACPI SLEEP INFO: pm1x_cnt[584,0], pm1x_evt[580,0] (XEN) wakeup_vec[3ffcfd8c], vec_size[20] diff -r 7c5c3aa858cc xen/arch/x86/acpi/boot.c --- a/xen/arch/x86/acpi/boot.c Tue Jul 31 15:09:45 2007 +0100 +++ b/xen/arch/x86/acpi/boot.c Fri Aug 10 07:34:46 2007 -0400 @@ -106,8 +106,10 @@ char *__acpi_map_table(unsigned long phy unsigned long base, offset, mapped_size; int idx; - if (phys + size < 8 * 1024 * 1024) + if (phys + size < 8 * 1024 * 1024) { + printk("(1) Mapped 0x%lx to %p\n",phys,__va(phys)); return __va(phys); + } offset = phys & (PAGE_SIZE - 1); mapped_size = PAGE_SIZE - offset; @@ -126,6 +128,7 @@ char *__acpi_map_table(unsigned long phy mapped_size += PAGE_SIZE; } + printk("(2) Mapped 0x%lx to %p, base = 0x%lx\n",phys,((char *)base + offset),base); return ((char *) base + offset); } @@ -308,8 +311,10 @@ static int __init acpi_parse_sbf(unsigne { struct acpi_table_sbf *sb; - if (!phys_addr || !size) + if (!phys_addr || !size) { + printk("SBF: Bad phys addr. or size.\n"); return -EINVAL; + } sb = (struct acpi_table_sbf *)__acpi_map_table(phys_addr, size); if (!sb) { @@ -318,6 +323,7 @@ static int __init acpi_parse_sbf(unsigne } sbf_port = sb->sbf_cmos; /* Save CMOS port */ +printk("Successfully read SBF.\n"); return 0; } @@ -467,11 +473,19 @@ static int __init acpi_parse_fadt(unsign { struct fadt_descriptor_rev2 *fadt = NULL; +printk("IN acpi_parse_fadt.\n"); fadt = (struct fadt_descriptor_rev2 *)__acpi_map_table(phys, size); if (!fadt) { printk(KERN_WARNING PREFIX "Unable to map FADT\n"); return 0; } + + if (strncmp(fadt->signature, "FACP", 4)) { + printk(KERN_ERR PREFIX "Invalid FADT signature %s\n", + fadt->signature); + return 0; + } + #ifdef CONFIG_ACPI_INTERPRETER /* initialize sci_int early for INT_SRC_OVR MADT parsing */ @@ -1002,19 +1016,24 @@ int __init acpi_boot_init(void) if (acpi_disabled && !acpi_ht) return 1; +acpi_table_parse(ACPI_FADT, acpi_parse_fadt); acpi_table_parse(ACPI_BOOT, acpi_parse_sbf); /* * set sci_int and PM timer address */ +acpi_table_parse(ACPI_FADT, acpi_parse_fadt); acpi_table_parse(ACPI_FADT, acpi_parse_fadt); /* * Process the Multiple APIC Description Table (MADT), if present */ +acpi_table_parse(ACPI_FADT, acpi_parse_fadt); acpi_process_madt(); +acpi_table_parse(ACPI_FADT, acpi_parse_fadt); acpi_table_parse(ACPI_HPET, acpi_parse_hpet); - - return 0; -} +acpi_table_parse(ACPI_FADT, acpi_parse_fadt); + + return 0; +} Keir Fraser <keir@xxxxxxxxxxxxx> wrote on 08/10/2007 02:55:50 AM: > Did you check the signature on all three mappings, and only the > first time you mapped it was broken? Weird. > > -- Keir > > > On 9/8/07 18:54, "Stefan Berger" <stefanb@xxxxxxxxxx> wrote: > (XEN) (2) Mapped 0x3ffcfec0 to fff9bec0 > (XEN) ACPI: Invalid FADT signature A__ADR > > That one is bad. It has a bad signature! First call. > > > (XEN) (2) Mapped 0x3ffcfec0 to fff9bec0 > (XEN) ACPI: PM-Timer IO Port: 0x588 > > 2nd call. This one is good! POrt is also good. > > (XEN) (2) Mapped 0x3ffcfd80 to fff9bd80 > (XEN) ACPI: ACPI SLEEP INFO: pm1x_cnt[584,0], pm1x_evt[580,0] > (XEN) wakeup_vec[3ffcfd8c], vec_size[20] > (XEN) (2) Mapped 0x3ffcfec0 to fff9bec0 > (XEN) ACPI: PM-Timer IO Port: 0x588 > > 3rd call. This one is also good! > > Looks like the mapping does not work correctly. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |