diff options
author | Simon Glass <sjg@chromium.org> | 2015-01-01 16:18:07 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-01-13 07:25:00 -0800 |
commit | aff2523f6998dca1f667aa0d26cc8f351c5628dc (patch) | |
tree | ae1694272e3fd7124f83e2a5730755943d041dbd /arch/x86/include/asm/global_data.h | |
parent | 3a5659f7cfc0fd99b57fe2ed9e4a9ebde7cf8491 (diff) | |
download | u-boot-aff2523f6998dca1f667aa0d26cc8f351c5628dc.tar.gz |
x86: Add support for MTRRs
Memory Type Range Registers are used to tell the CPU whether memory is
cacheable and if so the cache write mode to use.
Clean up the existing header file to follow style, and remove the unneeded
code.
These can speed up booting so should be supported. Add these to global_data
so they can be requested while booting. We will apply the changes during
relocation (in a later commit).
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/x86/include/asm/global_data.h')
-rw-r--r-- | arch/x86/include/asm/global_data.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/x86/include/asm/global_data.h b/arch/x86/include/asm/global_data.h index aeab3e52e3..24e305239b 100644 --- a/arch/x86/include/asm/global_data.h +++ b/arch/x86/include/asm/global_data.h @@ -29,6 +29,19 @@ struct memory_info { struct memory_area area[CONFIG_NR_DRAM_BANKS]; }; +#define MAX_MTRR_REQUESTS 8 + +/** + * A request for a memory region to be set up in a particular way. These + * requests are processed before board_init_r() is called. They are generally + * optional and can be ignored with some performance impact. + */ +struct mtrr_request { + int type; /* MTRR_TYPE_... */ + uint64_t start; + uint64_t size; +}; + /* Architecture-specific global data */ struct arch_global_data { struct global_data *gd_addr; /* Location of Global Data */ @@ -49,6 +62,8 @@ struct arch_global_data { #ifdef CONFIG_HAVE_FSP void *hob_list; /* FSP HOB list */ #endif + struct mtrr_request mtrr_req[MAX_MTRR_REQUESTS]; + int mtrr_req_count; }; #endif |