diff options
author | Yinghai Lu <Yinghai.Lu@Sun.COM> | 2008-01-30 07:33:32 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:33:32 -0500 |
commit | 093af8d7f0ba3c6be1485973508584ef081e9f93 (patch) | |
tree | 0a2db2401e09764e654efafbea60f6d5d6894dcd /include/asm-x86/e820_32.h | |
parent | 11201e603d28a1cb7a4bb1d65f39e61629c97a28 (diff) |
x86_32: trim memory by updating e820
when MTRRs are not covering the whole e820 table, we need to trim the
RAM and need to update e820.
reuse some code on 64-bit as well.
here need to add early_get_cap and use it in early_cpu_detect, and move
mtrr_bp_init early.
The code successfully trimmed the memory map on Justin's system:
from:
[ 0.000000] BIOS-e820: 0000000100000000 - 000000022c000000 (usable)
to:
[ 0.000000] modified: 0000000100000000 - 0000000228000000 (usable)
[ 0.000000] modified: 0000000228000000 - 000000022c000000 (reserved)
According to Justin it makes quite a difference:
| When I boot the box without any trimming it acts like a 286 or 386,
| takes about 10 minutes to boot (using raptor disks).
Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>
Tested-by: Justin Piszcz <jpiszcz@lucidpixels.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/asm-x86/e820_32.h')
-rw-r--r-- | include/asm-x86/e820_32.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/asm-x86/e820_32.h b/include/asm-x86/e820_32.h index e2faf5f3a0bb..f1da7ebd1905 100644 --- a/include/asm-x86/e820_32.h +++ b/include/asm-x86/e820_32.h | |||
@@ -19,12 +19,15 @@ | |||
19 | #ifndef __ASSEMBLY__ | 19 | #ifndef __ASSEMBLY__ |
20 | 20 | ||
21 | extern struct e820map e820; | 21 | extern struct e820map e820; |
22 | extern void update_e820(void); | ||
22 | 23 | ||
23 | extern int e820_all_mapped(unsigned long start, unsigned long end, | 24 | extern int e820_all_mapped(unsigned long start, unsigned long end, |
24 | unsigned type); | 25 | unsigned type); |
25 | extern int e820_any_mapped(u64 start, u64 end, unsigned type); | 26 | extern int e820_any_mapped(u64 start, u64 end, unsigned type); |
26 | extern void find_max_pfn(void); | 27 | extern void find_max_pfn(void); |
27 | extern void register_bootmem_low_pages(unsigned long max_low_pfn); | 28 | extern void register_bootmem_low_pages(unsigned long max_low_pfn); |
29 | extern void add_memory_region(unsigned long long start, | ||
30 | unsigned long long size, int type); | ||
28 | extern void e820_register_memory(void); | 31 | extern void e820_register_memory(void); |
29 | extern void limit_regions(unsigned long long size); | 32 | extern void limit_regions(unsigned long long size); |
30 | extern void print_memory_map(char *who); | 33 | extern void print_memory_map(char *who); |