aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/e820.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/e820.c')
-rw-r--r--arch/x86/kernel/e820.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
index 291e6cd9f9c0..523d6c5605d1 100644
--- a/arch/x86/kernel/e820.c
+++ b/arch/x86/kernel/e820.c
@@ -1271,13 +1271,15 @@ static inline const char *e820_type_to_string(int e820_type)
1271/* 1271/*
1272 * Mark e820 reserved areas as busy for the resource manager. 1272 * Mark e820 reserved areas as busy for the resource manager.
1273 */ 1273 */
1274struct resource __initdata *e820_res;
1274void __init e820_reserve_resources(void) 1275void __init e820_reserve_resources(void)
1275{ 1276{
1276 int i; 1277 int i;
1277 struct resource *res;
1278 u64 end; 1278 u64 end;
1279 struct resource *res;
1279 1280
1280 res = alloc_bootmem_low(sizeof(struct resource) * e820.nr_map); 1281 res = alloc_bootmem_low(sizeof(struct resource) * e820.nr_map);
1282 e820_res = res;
1281 for (i = 0; i < e820.nr_map; i++) { 1283 for (i = 0; i < e820.nr_map; i++) {
1282 end = e820.map[i].addr + e820.map[i].size - 1; 1284 end = e820.map[i].addr + e820.map[i].size - 1;
1283#ifndef CONFIG_RESOURCES_64BIT 1285#ifndef CONFIG_RESOURCES_64BIT
@@ -1291,7 +1293,8 @@ void __init e820_reserve_resources(void)
1291 res->end = end; 1293 res->end = end;
1292 1294
1293 res->flags = IORESOURCE_MEM | IORESOURCE_BUSY; 1295 res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
1294 insert_resource(&iomem_resource, res); 1296 if (e820.map[i].type != E820_RESERVED || res->start < (1ULL<<20))
1297 insert_resource(&iomem_resource, res);
1295 res++; 1298 res++;
1296 } 1299 }
1297 1300
@@ -1303,6 +1306,19 @@ void __init e820_reserve_resources(void)
1303 } 1306 }
1304} 1307}
1305 1308
1309void __init e820_reserve_resources_late(void)
1310{
1311 int i;
1312 struct resource *res;
1313
1314 res = e820_res;
1315 for (i = 0; i < e820.nr_map; i++) {
1316 if (e820.map[i].type == E820_RESERVED && res->start >= (1ULL<<20))
1317 insert_resource(&iomem_resource, res);
1318 res++;
1319 }
1320}
1321
1306char *__init default_machine_specific_memory_setup(void) 1322char *__init default_machine_specific_memory_setup(void)
1307{ 1323{
1308 char *who = "BIOS-e820"; 1324 char *who = "BIOS-e820";