x86: force DMI table to not be in E820 RAM region
PATCH 1/1 x86: force DMI table to not be in E820 RAM region
In order for Dom0 to be able to map the DMI table, it must not be in E820 RAM; since some BIOS versions apparently fail to set the type correctly for the page(s) containing this table, adjust it before starting to consume memory.
Signed-off-by Jan Beulich <[email protected]>
xen/arch/x86/dmi_scan.c +21 -2
@@ -100,7 +100,7 @@ inline static int __init dmi_checksum(u8return (sum==0 ); } -static int __init dmi_iterate (void (*decode)(struct dmi_header *)) +static int __init dmi_iterate (void (*decode)(struct dmi_header *),u32 *pbase) {u8 buf[15 ];char __iomem *p, *q;
@@ -121,6 +121,11 @@ static int __init dmi_iterate(void (*decu16 len=buf[7 ]<<8 |buf[6 ];u32 base=buf[11 ]<<24 |buf[10 ]<<16 |buf[9 ]<<8 |buf[8 ]; +if (pbase) + *pbase = base; +if (!decode) +return len; +/* * DMI version 0.0 means that the real version is taken from * the SMBIOS version, which we don't know at this point.
@@ -433,13 +438,27 @@ static void __init dmi_decode(struct dmivoid __init dmi_scan_machine (void ) { -int err =dmi_iterate (dmi_decode); +int err =dmi_iterate (dmi_decode,NULL );if (err ==0 )dmi_check_system (dmi_blacklist);else printk (KERN_INFO "DMI not present.\n" ); } +int __init dmi_get_table (u32 *pbase,u32 *plen) +{ +int rc =dmi_iterate (NULL , pbase); + +if (rc <0 ) { + *pbase = *plen =0 ; +return rc; + } + + *plen = rc; + +return 0 ; +} +/** * dmi_check_system - check system DMI data
xen/arch/x86/setup.c +54 -1
91 lines not on this page · raw message