diff options
| author | David Woodhouse <David.Woodhouse@intel.com> | 2008-10-13 12:13:56 -0400 |
|---|---|---|
| committer | David Woodhouse <David.Woodhouse@intel.com> | 2008-10-13 12:13:56 -0400 |
| commit | e758936e02700ff88a0b08b722a3847b95283ef2 (patch) | |
| tree | 50c919bef1b459a778b85159d5929de95b6c4a01 /arch/x86/kernel/e820.c | |
| parent | 239cfbde1f5843c4a24199f117d5f67f637d72d5 (diff) | |
| parent | 4480f15b3306f43bbb0310d461142b4e897ca45b (diff) | |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
include/asm-x86/statfs.h
Diffstat (limited to 'arch/x86/kernel/e820.c')
| -rw-r--r-- | arch/x86/kernel/e820.c | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c index 9af89078f7bb..78e642feac30 100644 --- a/arch/x86/kernel/e820.c +++ b/arch/x86/kernel/e820.c | |||
| @@ -148,6 +148,9 @@ void __init e820_print_map(char *who) | |||
| 148 | case E820_NVS: | 148 | case E820_NVS: |
| 149 | printk(KERN_CONT "(ACPI NVS)\n"); | 149 | printk(KERN_CONT "(ACPI NVS)\n"); |
| 150 | break; | 150 | break; |
| 151 | case E820_UNUSABLE: | ||
| 152 | printk("(unusable)\n"); | ||
| 153 | break; | ||
| 151 | default: | 154 | default: |
| 152 | printk(KERN_CONT "type %u\n", e820.map[i].type); | 155 | printk(KERN_CONT "type %u\n", e820.map[i].type); |
| 153 | break; | 156 | break; |
| @@ -1203,7 +1206,7 @@ static int __init parse_memmap_opt(char *p) | |||
| 1203 | if (!p) | 1206 | if (!p) |
| 1204 | return -EINVAL; | 1207 | return -EINVAL; |
| 1205 | 1208 | ||
| 1206 | if (!strcmp(p, "exactmap")) { | 1209 | if (!strncmp(p, "exactmap", 8)) { |
| 1207 | #ifdef CONFIG_CRASH_DUMP | 1210 | #ifdef CONFIG_CRASH_DUMP |
| 1208 | /* | 1211 | /* |
| 1209 | * If we are doing a crash dump, we still need to know | 1212 | * If we are doing a crash dump, we still need to know |
| @@ -1260,6 +1263,7 @@ static inline const char *e820_type_to_string(int e820_type) | |||
| 1260 | case E820_RAM: return "System RAM"; | 1263 | case E820_RAM: return "System RAM"; |
| 1261 | case E820_ACPI: return "ACPI Tables"; | 1264 | case E820_ACPI: return "ACPI Tables"; |
| 1262 | case E820_NVS: return "ACPI Non-volatile Storage"; | 1265 | case E820_NVS: return "ACPI Non-volatile Storage"; |
| 1266 | case E820_UNUSABLE: return "Unusable memory"; | ||
| 1263 | default: return "reserved"; | 1267 | default: return "reserved"; |
| 1264 | } | 1268 | } |
| 1265 | } | 1269 | } |
| @@ -1267,6 +1271,7 @@ static inline const char *e820_type_to_string(int e820_type) | |||
| 1267 | /* | 1271 | /* |
| 1268 | * Mark e820 reserved areas as busy for the resource manager. | 1272 | * Mark e820 reserved areas as busy for the resource manager. |
| 1269 | */ | 1273 | */ |
| 1274 | static struct resource __initdata *e820_res; | ||
| 1270 | void __init e820_reserve_resources(void) | 1275 | void __init e820_reserve_resources(void) |
| 1271 | { | 1276 | { |
| 1272 | int i; | 1277 | int i; |
| @@ -1274,6 +1279,7 @@ void __init e820_reserve_resources(void) | |||
| 1274 | u64 end; | 1279 | u64 end; |
| 1275 | 1280 | ||
| 1276 | 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; | ||
| 1277 | for (i = 0; i < e820.nr_map; i++) { | 1283 | for (i = 0; i < e820.nr_map; i++) { |
| 1278 | end = e820.map[i].addr + e820.map[i].size - 1; | 1284 | end = e820.map[i].addr + e820.map[i].size - 1; |
| 1279 | #ifndef CONFIG_RESOURCES_64BIT | 1285 | #ifndef CONFIG_RESOURCES_64BIT |
| @@ -1287,7 +1293,14 @@ void __init e820_reserve_resources(void) | |||
| 1287 | res->end = end; | 1293 | res->end = end; |
| 1288 | 1294 | ||
| 1289 | res->flags = IORESOURCE_MEM | IORESOURCE_BUSY; | 1295 | res->flags = IORESOURCE_MEM | IORESOURCE_BUSY; |
| 1290 | insert_resource(&iomem_resource, res); | 1296 | |
| 1297 | /* | ||
| 1298 | * don't register the region that could be conflicted with | ||
| 1299 | * pci device BAR resource and insert them later in | ||
| 1300 | * pcibios_resource_survey() | ||
| 1301 | */ | ||
| 1302 | if (e820.map[i].type != E820_RESERVED || res->start < (1ULL<<20)) | ||
| 1303 | insert_resource(&iomem_resource, res); | ||
| 1291 | res++; | 1304 | res++; |
| 1292 | } | 1305 | } |
| 1293 | 1306 | ||
| @@ -1299,6 +1312,19 @@ void __init e820_reserve_resources(void) | |||
| 1299 | } | 1312 | } |
| 1300 | } | 1313 | } |
| 1301 | 1314 | ||
| 1315 | void __init e820_reserve_resources_late(void) | ||
| 1316 | { | ||
| 1317 | int i; | ||
| 1318 | struct resource *res; | ||
| 1319 | |||
| 1320 | res = e820_res; | ||
| 1321 | for (i = 0; i < e820.nr_map; i++) { | ||
| 1322 | if (!res->parent && res->end) | ||
| 1323 | reserve_region_with_split(&iomem_resource, res->start, res->end, res->name); | ||
| 1324 | res++; | ||
| 1325 | } | ||
| 1326 | } | ||
| 1327 | |||
| 1302 | char *__init default_machine_specific_memory_setup(void) | 1328 | char *__init default_machine_specific_memory_setup(void) |
| 1303 | { | 1329 | { |
| 1304 | char *who = "BIOS-e820"; | 1330 | char *who = "BIOS-e820"; |
