[Concept,v2,09/20] x86: efi: Avoid setting MTRRs in the app

Message ID 20251007170549.541981-10-sjg@u-boot.org
State New
Headers
Series expo: Complete mouse operation in the EFI app |

Commit Message

Simon Glass Oct. 7, 2025, 5:05 p.m. UTC
  From: Simon Glass <sjg@chromium.org>

The MTRRs have already been set by the previous phase so we should not
set them when the U-Boot app starts. Add a condition to prevent it.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

(no changes since v1)

 arch/x86/lib/init_helpers.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Patch

diff --git a/arch/x86/lib/init_helpers.c b/arch/x86/lib/init_helpers.c
index bd0efde00c1..4384c10f697 100644
--- a/arch/x86/lib/init_helpers.c
+++ b/arch/x86/lib/init_helpers.c
@@ -29,7 +29,8 @@  int init_cache_f_r(void)
 	 *	the MTRRs here
 	 */
 	do_mtrr &= !IS_ENABLED(CONFIG_FSP_VERSION1) &&
-		!IS_ENABLED(CONFIG_SYS_SLIMBOOTLOADER);
+		!IS_ENABLED(CONFIG_SYS_SLIMBOOTLOADER) &&
+		!IS_ENABLED(CONFIG_EFI_APP);
 
 	if (do_mtrr) {
 		ret = mtrr_commit(false);