From: "Gerd Hoffmann" <kraxel@redhat.com>
To: devel@edk2.groups.io
Cc: Michael Roth <michael.roth@amd.com>,
Jiewen Yao <jiewen.yao@intel.com>,
Liming Gao <gaoliming@byosoft.com.cn>,
Laszlo Ersek <lersek@redhat.com>,
Tom Lendacky <thomas.lendacky@amd.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Ard Biesheuvel <ardb+tianocore@kernel.org>,
Gerd Hoffmann <kraxel@redhat.com>, Min Xu <min.m.xu@intel.com>,
Erdem Aktas <erdemaktas@google.com>,
Oliver Steffen <osteffen@redhat.com>,
Ard Biesheuvel <ardb@kernel.org>
Subject: [edk2-devel] [PATCH v4 1/3] MdeModulePkg/DxeIplPeim: fix PcdUse5LevelPageTable assert
Date: Thu, 22 Feb 2024 11:54:05 +0100 [thread overview]
Message-ID: <20240222105407.75735-2-kraxel@redhat.com> (raw)
In-Reply-To: <20240222105407.75735-1-kraxel@redhat.com>
PcdUse5LevelPageTable documentation says:
Indicates if 5-Level Paging will be enabled in long mode. 5-Level
Paging will not be enabled when the PCD is TRUE but CPU doesn't support
5-Level Paging.
So running in 4-level paging mode with PcdUse5LevelPageTable=TRUE is
possible. The only invalid combination is 5-level paging being active
with PcdUse5LevelPageTable=FALSE.
Fix the ASSERT accordingly.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
---
MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c b/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c
index 980c2002d4f5..1d240e95966e 100644
--- a/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c
+++ b/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c
@@ -745,7 +745,9 @@ CreateIdentityMappingPageTables (
//
Cr4.UintN = AsmReadCr4 ();
Page5LevelSupport = (Cr4.Bits.LA57 != 0);
- ASSERT (PcdGetBool (PcdUse5LevelPageTable) == Page5LevelSupport);
+ if (Page5LevelSupport) {
+ ASSERT (PcdGetBool (PcdUse5LevelPageTable));
+ }
} else {
//
// If cpu runs in 32bit protected mode PEI, Page table Level in DXE is decided by PCD and feature capability.
--
2.43.2
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#115800): https://edk2.groups.io/g/devel/message/115800
Mute This Topic: https://groups.io/mt/104506114/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
next prev parent reply other threads:[~2024-02-22 10:54 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-22 10:54 [edk2-devel] [PATCH v4 0/3] OvmfPkg: Add support for 5-level paging Gerd Hoffmann
2024-02-22 10:54 ` Gerd Hoffmann [this message]
2024-03-01 12:44 ` [edk2-devel] 回复: [PATCH v4 1/3] MdeModulePkg/DxeIplPeim: fix PcdUse5LevelPageTable assert gaoliming via groups.io
2024-02-22 10:54 ` [edk2-devel] [PATCH v4 2/3] MdeModulePkg/DxeIplPeim: rename variable Gerd Hoffmann
2024-03-01 12:44 ` [edk2-devel] 回复: " gaoliming via groups.io
2024-02-22 10:54 ` [edk2-devel] [PATCH v4 3/3] OvmfPkg/PlatformInitLib: add 5-level paging support Gerd Hoffmann
2024-02-22 11:24 ` [edk2-devel] GuestPhysAddrSize questions (was: Re: [PATCH v4 3/3] OvmfPkg/PlatformInitLib: add 5-level paging) support Gerd Hoffmann
2024-02-22 15:44 ` [edk2-devel] GuestPhysAddrSize questions Lendacky, Thomas via groups.io
2024-02-22 16:13 ` Paolo Bonzini
2024-02-22 17:39 ` Paolo Bonzini
2024-03-04 13:09 ` Gerd Hoffmann
2024-03-04 17:23 ` Lendacky, Thomas via groups.io
2024-03-06 22:45 ` Paolo Bonzini
2024-02-27 12:54 ` [edk2-devel] [PATCH v4 0/3] OvmfPkg: Add support for 5-level paging Laszlo Ersek
2024-02-29 10:16 ` Laszlo Ersek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240222105407.75735-2-kraxel@redhat.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox