aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/kernel
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2006-09-26 04:52:36 -0400
committerAndi Kleen <andi@basil.nowhere.org>2006-09-26 04:52:36 -0400
commitdbf9272e863bf4b17ee8e3c66c26682b2061d40d (patch)
tree203c32e86475748b362c97d7340bd4cfbd3376c5 /arch/x86_64/kernel
parentf704cb935006580db0495e54d3c82631f6e2a984 (diff)
[PATCH] Don't force reserve the 640k-1MB range
From i386 x86-64 inherited code to force reserve the 640k-1MB area. That was needed on some old systems. But we generally trust the e820 map to be correct on 64bit systems and mark all areas that are not memory correctly. This patch will allow to use the real memory in there. Or rather the only way to find out if it's still needed is to try. So far I'm optimistic. Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'arch/x86_64/kernel')
-rw-r--r--arch/x86_64/kernel/e820.c33
1 files changed, 1 insertions, 32 deletions
diff --git a/arch/x86_64/kernel/e820.c b/arch/x86_64/kernel/e820.c
index 164d0b83dc92..e06c2714ecf3 100644
--- a/arch/x86_64/kernel/e820.c
+++ b/arch/x86_64/kernel/e820.c
@@ -71,12 +71,7 @@ static inline int bad_addr(unsigned long *addrp, unsigned long size)
71 return 1; 71 return 1;
72 } 72 }
73#endif 73#endif
74 /* kernel code + 640k memory hole (later should not be needed, but 74 /* kernel code */
75 be paranoid for now) */
76 if (last >= 640*1024 && addr < 1024*1024) {
77 *addrp = 1024*1024;
78 return 1;
79 }
80 if (last >= __pa_symbol(&_text) && last < __pa_symbol(&_end)) { 75 if (last >= __pa_symbol(&_text) && last < __pa_symbol(&_end)) {
81 *addrp = __pa_symbol(&_end); 76 *addrp = __pa_symbol(&_end);
82 return 1; 77 return 1;
@@ -519,13 +514,6 @@ static int __init sanitize_e820_map(struct e820entry * biosmap, char * pnr_map)
519 * If we're lucky and live on a modern system, the setup code 514 * If we're lucky and live on a modern system, the setup code
520 * will have given us a memory map that we can use to properly 515 * will have given us a memory map that we can use to properly
521 * set up memory. If we aren't, we'll fake a memory map. 516 * set up memory. If we aren't, we'll fake a memory map.
522 *
523 * We check to see that the memory map contains at least 2 elements
524 * before we'll use it, because the detection code in setup.S may
525 * not be perfect and most every PC known to man has two memory
526 * regions: one from 0 to 640k, and one from 1mb up. (The IBM
527 * thinkpad 560x, for example, does not cooperate with the memory
528 * detection code.)
529 */ 517 */
530static int __init copy_e820_map(struct e820entry * biosmap, int nr_map) 518static int __init copy_e820_map(struct e820entry * biosmap, int nr_map)
531{ 519{
@@ -543,25 +531,6 @@ static int __init copy_e820_map(struct e820entry * biosmap, int nr_map)
543 if (start > end) 531 if (start > end)
544 return -1; 532 return -1;
545 533
546 /*
547 * Some BIOSes claim RAM in the 640k - 1M region.
548 * Not right. Fix it up.
549 *
550 * This should be removed on Hammer which is supposed to not
551 * have non e820 covered ISA mappings there, but I had some strange
552 * problems so it stays for now. -AK
553 */
554 if (type == E820_RAM) {
555 if (start < 0x100000ULL && end > 0xA0000ULL) {
556 if (start < 0xA0000ULL)
557 add_memory_region(start, 0xA0000ULL-start, type);
558 if (end <= 0x100000ULL)
559 continue;
560 start = 0x100000ULL;
561 size = end - start;
562 }
563 }
564
565 add_memory_region(start, size, type); 534 add_memory_region(start, size, type);
566 } while (biosmap++,--nr_map); 535 } while (biosmap++,--nr_map);
567 return 0; 536 return 0;