android_kernel_motorola_sm6225/arch/x86/kernel/cpu/mtrr
Yinghai Lu 093af8d7f0 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>
2008-01-30 13:33:32 +01:00
..
amd.c x86: mtrr use type bool [RESEND AGAIN] 2008-01-30 13:30:31 +01:00
centaur.c i386: move kernel/cpu/mtrr 2007-10-11 11:16:28 +02:00
cyrix.c x86: use CR0 defines. 2008-01-30 13:30:39 +01:00
generic.c x86, 32-bit: trim memory not covered by wb mtrrs 2008-01-30 13:33:18 +01:00
if.c x86, 32-bit: trim memory not covered by wb mtrrs 2008-01-30 13:33:18 +01:00
main.c x86_32: trim memory by updating e820 2008-01-30 13:33:32 +01:00
Makefile i386: move kernel/cpu/mtrr 2007-10-11 11:16:28 +02:00
mtrr.h x86, 32-bit: trim memory not covered by wb mtrrs 2008-01-30 13:33:18 +01:00
state.c x86: use CR0 defines. 2008-01-30 13:30:39 +01:00