diff options
author | Simon Glass <sjg@chromium.org> | 2015-01-01 16:18:10 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-01-13 07:25:01 -0800 |
commit | aaafcd6c3f472f81d2c87b96571fba2e0f55b368 (patch) | |
tree | 204338267990c2c2abd080dd0f011397bf806fde /arch/x86/cpu | |
parent | 313aef37a12703b32a75dfc15b50491ecc43d97a (diff) | |
download | u-boot-imx-aaafcd6c3f472f81d2c87b96571fba2e0f55b368.zip u-boot-imx-aaafcd6c3f472f81d2c87b96571fba2e0f55b368.tar.gz u-boot-imx-aaafcd6c3f472f81d2c87b96571fba2e0f55b368.tar.bz2 |
x86: ivybridge: Request MTRRs for DRAM regions
We should use MTRRs to speed up execution. Add a list of MTRR requests which
will dealt with when we relocate and run from RAM.
We set RAM as cacheable (with write-back) and registers as non-cacheable.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/x86/cpu')
-rw-r--r-- | arch/x86/cpu/ivybridge/sdram.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/x86/cpu/ivybridge/sdram.c b/arch/x86/cpu/ivybridge/sdram.c index b95e781..9504735 100644 --- a/arch/x86/cpu/ivybridge/sdram.c +++ b/arch/x86/cpu/ivybridge/sdram.c @@ -17,6 +17,7 @@ #include <asm/processor.h> #include <asm/gpio.h> #include <asm/global_data.h> +#include <asm/mtrr.h> #include <asm/pci.h> #include <asm/arch/me.h> #include <asm/arch/pei_data.h> @@ -430,6 +431,15 @@ static int sdram_find(pci_dev_t dev) add_memory_area(info, (2 << 28) + (2 << 20), 4 << 28); add_memory_area(info, (4 << 28) + (2 << 20), tseg_base); add_memory_area(info, 1ULL << 32, touud); + + /* Add MTRRs for memory */ + mtrr_add_request(MTRR_TYPE_WRBACK, 0, 2ULL << 30); + mtrr_add_request(MTRR_TYPE_WRBACK, 2ULL << 30, 512 << 20); + mtrr_add_request(MTRR_TYPE_WRBACK, 0xaULL << 28, 256 << 20); + mtrr_add_request(MTRR_TYPE_UNCACHEABLE, tseg_base, 16 << 20); + mtrr_add_request(MTRR_TYPE_UNCACHEABLE, tseg_base + (16 << 20), + 32 << 20); + /* * If >= 4GB installed then memory from TOLUD to 4GB * is remapped above TOM, TOUUD will account for both |