if (start > end)
return -1;
- /*
- * Some BIOSes claim RAM in the 640k - 1M region.
- * Not right. Fix it up.
- */
- if (type == E820_RAM) {
- if (start < 0x100000ULL && end > 0xA0000ULL) {
- if (start < 0xA0000ULL)
- add_memory_region(start, 0xA0000ULL-start, type);
- if (end <= 0x100000ULL)
- continue;
- start = 0x100000ULL;
- size = end - start;
- }
- }
add_memory_region(start, size, type);
} while (biosmap++,--nr_map);
return 0;
}
}
+static void __init reserve_vga_region(void)
+{
+ /* Remove any RAM regions from the VGA hole. */
+ e820_remove_range(&e820, KB(640), MB(1) - 1, E820_RAM, true);
+}
+
static void __init machine_specific_memory_setup(struct e820map *raw)
{
unsigned long mpt_limit, ro_mpt_limit;
reserve_dmi_region();
+ /*
+ * Some BIOSes claim RAM in the 640k - 1M region.
+ * Not right. Fix it up.
+ */
+ reserve_vga_region();
+
top_of_ram = mtrr_top_of_ram();
if ( top_of_ram )
clip_to_limit(top_of_ram, "MTRRs do not cover all of memory.");