
One of the four items left to fix up for bare ivybridge support in U-Boot is MTRRs. These are an important part of the x86 platform since they provide a means to control the cache behaviour for areas of memory.
Memory areas can be marked as uncacheable or cacheable. For cacheable the write behaviour can be controlled:
- write-back: data is not written back from the cache until evicted - write-though: data goes into the cache but is also written to memory - write-protect: data cannot be written to this area - write-combining: multiple writes to this area can be combined
This series adds support for deciding the MTRR setup that should be used, commiting it to registers before relocation, updating it for the video frame buffer, disabling CAR (cache-as-RAM) when needed and making sure that the faster possible execution speed is provided. In addition an 'mtrr' command is added to permit inspection and adjustment of MTRR registers from the command line.
Simon Glass (22): x86: Correct XIP_ROM_SIZE x86: Drop RAMTOP Kconfig x86: Correct ifdtool microcode calculation x86: video: Add support for CONFIG_CONSOLE_SCROLL_LINES x86: config: Always scroll the display by 5 lines, for speed x86: video: Add a debug() to display the frame buffer address x86: pci: Don't return a vesa mode when there is not video x86: video: Add debug option to time the BIOS copy x86: ivybridge: Only run the Video BIOS when video is enabled x86: Use cache, don't clear the display in video BIOS x86: Tidy up VESA mode numbers x86: pci: Display vesa modes in hex x86: ivybridge: Drop support for ROM caching x86: Add support for MTRRs x86: ivybridge: Set up an MTRR for the video frame buffer x86: board_f: Adjust x86 boot order for performance x86: ivybridge: Request MTRRs for DRAM regions x86: Commit the current MTRRs before relocation x86: ivybridge: Add a way to turn off the CAR x86: Disable CAR before relocation on platforms that need it x86: ivybridge: Update microcode early in boot x86: Add an 'mtrr' command to list and adjust MTRRs
arch/x86/Kconfig | 6 +- arch/x86/cpu/Makefile | 1 + arch/x86/cpu/coreboot/coreboot.c | 22 ++--- arch/x86/cpu/ivybridge/car.S | 78 +++++++++++++-- arch/x86/cpu/ivybridge/cpu.c | 27 +---- arch/x86/cpu/ivybridge/gma.c | 25 ++++- arch/x86/cpu/ivybridge/microcode_intel.c | 9 +- arch/x86/cpu/ivybridge/sdram.c | 10 ++ arch/x86/cpu/mtrr.c | 81 +++++++++++++++ arch/x86/cpu/start.S | 10 ++ arch/x86/dts/link.dts | 3 - arch/x86/include/asm/global_data.h | 15 +++ arch/x86/include/asm/mtrr.h | 163 ++++++++++++++----------------- arch/x86/lib/bios.c | 14 +-- arch/x86/lib/init_helpers.c | 8 ++ common/Makefile | 1 + common/board_f.c | 8 +- common/cmd_mtrr.c | 138 ++++++++++++++++++++++++++ doc/README.x86 | 18 +++- drivers/pci/pci_rom.c | 9 +- drivers/video/cfb_console.c | 26 +++-- drivers/video/x86_fb.c | 1 + include/configs/x86-common.h | 1 + tools/ifdtool.c | 4 +- 24 files changed, 509 insertions(+), 169 deletions(-) create mode 100644 arch/x86/cpu/mtrr.c create mode 100644 common/cmd_mtrr.c