diff options
author | Yinghai Lu <yhlu.kernel@gmail.com> | 2008-09-29 21:54:12 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-09-29 23:50:11 -0400 |
commit | 4624065731751a3ace88e5824d8e5654e2d7abd3 (patch) | |
tree | c360575b4629f57becb2037ebe81e536924371e4 /arch/x86/kernel | |
parent | dd7e52224fd7438d701b4bb9834a9ddc06828210 (diff) |
x86: mtrr_cleanup try gran_size to less than 1M
one have gran < 1M
reg00: base=0xd8000000 (3456MB), size= 128MB: uncachable, count=1
reg01: base=0xe0000000 (3584MB), size= 512MB: uncachable, count=1
reg02: base=0x00000000 ( 0MB), size=4096MB: write-back, count=1
reg03: base=0x100000000 (4096MB), size= 512MB: write-back, count=1
reg04: base=0x120000000 (4608MB), size= 128MB: write-back, count=1
reg05: base=0xd7f80000 (3455MB), size= 512KB: uncachable, count=1
will get
Found optimal setting for mtrr clean up
gran_size: 512K chunk_size: 2M num_reg: 7 lose RAM: 0G
range0: 0000000000000000 - 00000000d8000000
Setting variable MTRR 0, base: 0GB, range: 2GB, type WB
Setting variable MTRR 1, base: 2GB, range: 1GB, type WB
Setting variable MTRR 2, base: 3GB, range: 256MB, type WB
Setting variable MTRR 3, base: 3328MB, range: 128MB, type WB
hole: 00000000d7f00000 - 00000000d7f80000
Setting variable MTRR 4, base: 3455MB, range: 512KB, type UC
rangeX: 0000000100000000 - 0000000128000000
Setting variable MTRR 5, base: 4GB, range: 512MB, type WB
Setting variable MTRR 6, base: 4608MB, range: 128MB, type WB
so start from 64k instead of 1M
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/cpu/mtrr/main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c index b1bd1038c91..8f1a342b16b 100644 --- a/arch/x86/kernel/cpu/mtrr/main.c +++ b/arch/x86/kernel/cpu/mtrr/main.c | |||
@@ -1197,11 +1197,11 @@ struct mtrr_cleanup_result { | |||
1197 | }; | 1197 | }; |
1198 | 1198 | ||
1199 | /* | 1199 | /* |
1200 | * gran_size: 1M, 2M, ..., 2G | 1200 | * gran_size: 64K, 128K, 256K, 512K, 1M, 2M, ..., 2G |
1201 | * chunk size: gran_size, ..., 2G | 1201 | * chunk size: gran_size, ..., 2G |
1202 | * so we need (1+12)*6 | 1202 | * so we need (1+16)*8 |
1203 | */ | 1203 | */ |
1204 | #define NUM_RESULT 78 | 1204 | #define NUM_RESULT 136 |
1205 | #define PSHIFT (PAGE_SHIFT - 10) | 1205 | #define PSHIFT (PAGE_SHIFT - 10) |
1206 | 1206 | ||
1207 | static struct mtrr_cleanup_result __initdata result[NUM_RESULT]; | 1207 | static struct mtrr_cleanup_result __initdata result[NUM_RESULT]; |
@@ -1323,7 +1323,7 @@ static int __init mtrr_cleanup(unsigned address_bits) | |||
1323 | i = 0; | 1323 | i = 0; |
1324 | memset(min_loss_pfn, 0xff, sizeof(min_loss_pfn)); | 1324 | memset(min_loss_pfn, 0xff, sizeof(min_loss_pfn)); |
1325 | memset(result, 0, sizeof(result)); | 1325 | memset(result, 0, sizeof(result)); |
1326 | for (gran_size = (1ULL<<20); gran_size < (1ULL<<32); gran_size <<= 1) { | 1326 | for (gran_size = (1ULL<<16); gran_size < (1ULL<<32); gran_size <<= 1) { |
1327 | char gran_factor; | 1327 | char gran_factor; |
1328 | unsigned long gran_base; | 1328 | unsigned long gran_base; |
1329 | 1329 | ||