u-boot/arch/x86
Bin Meng 3dfa411501 x86: fsp: Use mtrr_set_next_var() for graphics memory
At present this uses mtrr_add_request() & mtrr_commit() combination
to program the MTRR for graphics memory. This usage has two major
issues as below:

- mtrr_commit() will re-initialize all MTRR registers from index 0,
  using the settings previously added by mtrr_add_request() and saved
  in gd->arch.mtrr_req[], which won't cause any issue but is unnecessary
- The way such combination works is based on the assumption that U-Boot
  has full control with MTRR programming (e.g.: U-Boot without any blob
  that does all low-level initialization on its own, or using FSP2 which
  does not touch MTRR), but this is not the case with FSP. FSP programs
  some MTRRs during its execution but U-Boot does not have the settings
  saved in gd->arch.mtrr_req[] and when doing mtrr_commit() it will
  corrupt what was already programmed previously.

Correct this to use mtrr_set_next_var() instead.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-01 10:06:46 +08:00
..
cpu x86: Switch QEMU over to use the bochs driver 2023-07-17 17:23:15 +08:00
dts x86: link: Support Micron memory 2023-07-17 17:23:15 +08:00
include/asm x86: Record the start and end of the tables 2023-07-17 17:23:08 +08:00
lib x86: fsp: Use mtrr_set_next_var() for graphics memory 2023-08-01 10:06:46 +08:00
config.mk x86: Pass -z execstack for EFI payload flags 2023-02-23 13:29:20 -05:00
Kconfig efi: Set RUN_64BIT correctly for the EFI app 2023-03-25 11:07:21 +01:00
Makefile x86: Allow 16-bit init to be in TPL 2019-05-08 13:02:13 +08:00