|
@@ -618,88 +618,20 @@ static __init void reserve_ibft_region(void)
|
|
|
reserve_early_overlap_ok(addr, addr + size, "ibft");
|
|
|
}
|
|
|
|
|
|
-#ifdef CONFIG_X86_RESERVE_LOW_64K
|
|
|
-static int __init dmi_low_memory_corruption(const struct dmi_system_id *d)
|
|
|
-{
|
|
|
- printk(KERN_NOTICE
|
|
|
- "%s detected: BIOS may corrupt low RAM, working around it.\n",
|
|
|
- d->ident);
|
|
|
-
|
|
|
- e820_update_range(0, 0x10000, E820_RAM, E820_RESERVED);
|
|
|
- sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &e820.nr_map);
|
|
|
-
|
|
|
- return 0;
|
|
|
-}
|
|
|
-#endif
|
|
|
-
|
|
|
-/* List of systems that have known low memory corruption BIOS problems */
|
|
|
-static struct dmi_system_id __initdata bad_bios_dmi_table[] = {
|
|
|
-#ifdef CONFIG_X86_RESERVE_LOW_64K
|
|
|
- {
|
|
|
- .callback = dmi_low_memory_corruption,
|
|
|
- .ident = "AMI BIOS",
|
|
|
- .matches = {
|
|
|
- DMI_MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."),
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- .callback = dmi_low_memory_corruption,
|
|
|
- .ident = "Phoenix BIOS",
|
|
|
- .matches = {
|
|
|
- DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies"),
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- .callback = dmi_low_memory_corruption,
|
|
|
- .ident = "Phoenix/MSC BIOS",
|
|
|
- .matches = {
|
|
|
- DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix/MSC"),
|
|
|
- },
|
|
|
- },
|
|
|
- /*
|
|
|
- * AMI BIOS with low memory corruption was found on Intel DG45ID and
|
|
|
- * DG45FC boards.
|
|
|
- * It has a different DMI_BIOS_VENDOR = "Intel Corp.", for now we will
|
|
|
- * match only DMI_BOARD_NAME and see if there is more bad products
|
|
|
- * with this vendor.
|
|
|
- */
|
|
|
- {
|
|
|
- .callback = dmi_low_memory_corruption,
|
|
|
- .ident = "AMI BIOS",
|
|
|
- .matches = {
|
|
|
- DMI_MATCH(DMI_BOARD_NAME, "DG45ID"),
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- .callback = dmi_low_memory_corruption,
|
|
|
- .ident = "AMI BIOS",
|
|
|
- .matches = {
|
|
|
- DMI_MATCH(DMI_BOARD_NAME, "DG45FC"),
|
|
|
- },
|
|
|
- },
|
|
|
- /*
|
|
|
- * The Dell Inspiron Mini 1012 has DMI_BIOS_VENDOR = "Dell Inc.", so
|
|
|
- * match on the product name.
|
|
|
- */
|
|
|
- {
|
|
|
- .callback = dmi_low_memory_corruption,
|
|
|
- .ident = "Phoenix BIOS",
|
|
|
- .matches = {
|
|
|
- DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 1012"),
|
|
|
- },
|
|
|
- },
|
|
|
-#endif
|
|
|
- {}
|
|
|
-};
|
|
|
-
|
|
|
static void __init trim_bios_range(void)
|
|
|
{
|
|
|
/*
|
|
|
* A special case is the first 4Kb of memory;
|
|
|
* This is a BIOS owned area, not kernel ram, but generally
|
|
|
* not listed as such in the E820 table.
|
|
|
+ *
|
|
|
+ * This typically reserves additional memory (64KiB by default)
|
|
|
+ * since some BIOSes are known to corrupt low memory. See the
|
|
|
+ * Kconfig help text for X86_LOW_RESERVE.
|
|
|
*/
|
|
|
- e820_update_range(0, PAGE_SIZE, E820_RAM, E820_RESERVED);
|
|
|
+ e820_update_range(0, ALIGN(CONFIG_X86_LOW_RESERVE << 10, PAGE_SIZE),
|
|
|
+ E820_RAM, E820_RESERVED);
|
|
|
+
|
|
|
/*
|
|
|
* special case: Some BIOSen report the PC BIOS
|
|
|
* area (640->1Mb) as ram even though it is not.
|
|
@@ -863,8 +795,6 @@ void __init setup_arch(char **cmdline_p)
|
|
|
|
|
|
dmi_scan_machine();
|
|
|
|
|
|
- dmi_check_system(bad_bios_dmi_table);
|
|
|
-
|
|
|
/*
|
|
|
* VMware detection requires dmi to be available, so this
|
|
|
* needs to be done after dmi_scan_machine, for the BP.
|