From patchwork Tue Oct 7 17:05:23 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 556 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1759856802; bh=MUr7AqRUgUcZoE9sYXo4I4o+Rluf6fkmsttmZS2lgws=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=PO75wZFUx8iaPEa5UbF38+cuvx8icLXJV9CLioLr3/dkxH7PfT7Crmhzksbif5ktY 3GtfGzPTyd61RqXb7ykQ09dQ48emp3Jop2NFZiyQIjd8P+RPOKSza9ZtS/Kr1VwAYr cSu02x/nEXF56Ny3ZKW3RupOgA3WgkLBRGUKFzHVO/+MXCTrOThPTZvrBRgPEc/aYN HFfhjrF1/QOtXqaiyDmleP7QeEMFHme/2WZmwVYdzycAMJsbWQNoiUDGQzqeZe4/LH fx7G4tcTzha2lxOuglCL+fH8DxLjLcaAx/tKaKmT19JPHdPDMr59Nh2pIeU1eEDM7V NCtuBOGrkBTjg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id E924467FF8 for ; Tue, 7 Oct 2025 11:06:42 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id ueLDwDAiAFld for ; Tue, 7 Oct 2025 11:06:42 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1759856802; bh=MUr7AqRUgUcZoE9sYXo4I4o+Rluf6fkmsttmZS2lgws=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=PO75wZFUx8iaPEa5UbF38+cuvx8icLXJV9CLioLr3/dkxH7PfT7Crmhzksbif5ktY 3GtfGzPTyd61RqXb7ykQ09dQ48emp3Jop2NFZiyQIjd8P+RPOKSza9ZtS/Kr1VwAYr cSu02x/nEXF56Ny3ZKW3RupOgA3WgkLBRGUKFzHVO/+MXCTrOThPTZvrBRgPEc/aYN HFfhjrF1/QOtXqaiyDmleP7QeEMFHme/2WZmwVYdzycAMJsbWQNoiUDGQzqeZe4/LH fx7G4tcTzha2lxOuglCL+fH8DxLjLcaAx/tKaKmT19JPHdPDMr59Nh2pIeU1eEDM7V NCtuBOGrkBTjg== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id D666367F72 for ; Tue, 7 Oct 2025 11:06:42 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1759856801; bh=AJ/Diq6yaE1ngj1rdd/bWSjC/KR7LGFFGhqg8t/fy+I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eU2+cV2qJBuJfboC4VfIn9JRNLhjvJFLr1N4Eac7SsdbNTEm6uxATbqij8dGXVQ/c fFmoon7Shjepmu/QzrlgJm0eX5YSypWR/6FujmKwKTc+jNT8O5pLfzdDT6qo3XUJgy ZheEB9giGrjdnXIUIneahwnRHPefyFxy2LK19O9L4SHv7yp7S/dbOUJ179UJPTg2pY 29rArnz1S2gU82tCGfAilWYs4w7Amk1RXpNt9/jHRYxaTn6rPcv3BImqvo0TKBnEL7 LYWTarZSGsyx5xPkGsCpy+LQQcq3YiHyrZFlvqzdIUZ2fkHrCe2Il2nmcAxdsJH9/B sptu8ja/LUzpQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 41D3367DD0; Tue, 7 Oct 2025 11:06:41 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id roPzEJh3ulnU; Tue, 7 Oct 2025 11:06:41 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1759856794; bh=b0+jJCiMZluhtnuqlqHB6m59c+oHf88p49zUcWzZqhE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WKklUIkEBrIUwP16ayKKGAvFkG2ciDF2VYt8jKymVv/w45i9kVffxtiBlm87k8QiO EYa1GbRJSvJWQ2HVHIZkwRMYNA6l0hG1niL8a1BmNjcC2hesLFJoe4uZPMw0DR2D2P 6LFJP7e+oQM5/CBstYm7P/8DYCAoDFrTZCoFPIjyvrP2EF9RYclCa11J/+BnRWF+EI 0IeSxxN4BUE9QBnu+RTQITZV3jrvLfSCsplT8tHXd2rbG9YwuglyURQw3JzJ1Oadkf gFuHnKgpH0mlZO4lranyl8eQDnP902luEuxI2zfkES0Qu5Dj+WER1ZFFCihN3ZgpQQ odjBwgHhrL2Lg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 9469567FF8; Tue, 7 Oct 2025 11:06:34 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Tue, 7 Oct 2025 11:05:23 -0600 Message-ID: <20251007170549.541981-10-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251007170549.541981-1-sjg@u-boot.org> References: <20251007170549.541981-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: YQC6YBNPXVKMIM5EQC2CHHBY5ASNUQKP X-Message-ID-Hash: YQC6YBNPXVKMIM5EQC2CHHBY5ASNUQKP X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Heinrich Schuchardt , Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH v2 09/20] x86: efi: Avoid setting MTRRs in the app List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass 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 --- (no changes since v1) arch/x86/lib/init_helpers.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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);