From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 1C1CED80477 for ; Thu, 25 Jan 2024 08:21:05 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=wrDli0+bx3eAi08mIaYsz9OUZP/OI0IfuxNmasxjNV8=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding:Content-Type; s=20140610; t=1706170864; v=1; b=sxUBavmsph85aqVeAexPhLJYMgtFJWvFsUpRDBBpo3jdpoSfYs1aV1OS2lAbV1INbd160AaV k+NUVF6Nl+PQuhKoL4cgNTtaHPhC7BgEddNKbamwgKYUTMR/xGAn8f5nEDyfYLdUg4UxIwXB8Tx N2xZiW4q+D9ruPPW6UO8Nsts= X-Received: by 127.0.0.2 with SMTP id xVrHYY7687511xJYDzlU4vbI; Thu, 25 Jan 2024 00:21:04 -0800 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web11.12521.1706170863918679372 for ; Thu, 25 Jan 2024 00:21:04 -0800 X-Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-323-KbLafkTONGe7wueTv-qv0Q-1; Thu, 25 Jan 2024 03:20:59 -0500 X-MC-Unique: KbLafkTONGe7wueTv-qv0Q-1 X-Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8C4B1106D062; Thu, 25 Jan 2024 08:20:59 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.192.43]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 409E3492BC9; Thu, 25 Jan 2024 08:20:58 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id E176B1801A8B; Thu, 25 Jan 2024 09:20:57 +0100 (CET) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Liming Gao , =?UTF-8?q?L=C3=A1szl=C3=B3=20=C3=89rsek?= , Oliver Steffen , Gerd Hoffmann Subject: [edk2-devel] [PATCH v2 1/2] MdeModulePkg: rename PcdUse5LevelPageTable to PcdEnable5LevelPageTable Date: Thu, 25 Jan 2024 09:20:56 +0100 Message-ID: <20240125082057.309133-2-kraxel@redhat.com> In-Reply-To: <20240125082057.309133-1-kraxel@redhat.com> References: <20240125082057.309133-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,kraxel@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: Z3F2Mo2OF8byci1SvPDuFpkJx7686176AA= Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=sxUBavms; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.com (policy=none) The PCD will allow but not require 5-level paging. Whenever 5-level paging is used or not will be decided by the ResetVector, by looking at CPU capabilities. Rename the PCD to make that clear. Signed-off-by: Gerd Hoffmann --- MdeModulePkg/MdeModulePkg.dec | 2 +- MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf | 2 +- MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c | 4 ++-- MdeModulePkg/MdeModulePkg.uni | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec index a2cd83345f5b..80047f029d36 100644 --- a/MdeModulePkg/MdeModulePkg.dec +++ b/MdeModulePkg/MdeModulePkg.dec @@ -2105,7 +2105,7 @@ [PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx] # TRUE - 5-Level Paging will be enabled.
# FALSE - 5-Level Paging will not be enabled.
# @Prompt Enable 5-Level Paging support in long mode. - gEfiMdeModulePkgTokenSpaceGuid.PcdUse5LevelPageTable|FALSE|BOOLEAN|0x0001105F + gEfiMdeModulePkgTokenSpaceGuid.PcdEnable5LevelPageTable|FALSE|BOOLEAN|0x0001105F ## Capsule In Ram is to use memory to deliver the capsules that will be processed after system # reset.

diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf index f1990eac7760..d73add2d814d 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf +++ b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf @@ -104,7 +104,7 @@ [Pcd.IA32,Pcd.X64] gEfiMdeModulePkgTokenSpaceGuid.PcdNullPointerDetectionPropertyMask ## CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdHeapGuardPropertyMask ## CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdCpuStackGuard ## CONSUMES - gEfiMdeModulePkgTokenSpaceGuid.PcdUse5LevelPageTable ## SOMETIMES_CONSUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdEnable5LevelPageTable ## SOMETIMES_CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdGhcbBase ## CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdGhcbSize ## CONSUMES diff --git a/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c b/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c index 980c2002d4f5..46528e4f719d 100644 --- a/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c +++ b/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c @@ -745,13 +745,13 @@ CreateIdentityMappingPageTables ( // Cr4.UintN = AsmReadCr4 (); Page5LevelSupport = (Cr4.Bits.LA57 != 0); - ASSERT (PcdGetBool (PcdUse5LevelPageTable) == Page5LevelSupport); + ASSERT (PcdGetBool (PcdEnable5LevelPageTable) == Page5LevelSupport); } else { // // If cpu runs in 32bit protected mode PEI, Page table Level in DXE is decided by PCD and feature capability. // Page5LevelSupport = FALSE; - if (PcdGetBool (PcdUse5LevelPageTable)) { + if (PcdGetBool (PcdEnable5LevelPageTable)) { AsmCpuidEx ( CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS, CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS_SUB_LEAF_INFO, diff --git a/MdeModulePkg/MdeModulePkg.uni b/MdeModulePkg/MdeModulePkg.uni index a17d34d60b21..7a98dc64832b 100644 --- a/MdeModulePkg/MdeModulePkg.uni +++ b/MdeModulePkg/MdeModulePkg.uni @@ -1332,9 +1332,9 @@ "required to be accessed in PcdDxe driver entry point. So, its value must be set in PEI phase." "It can't depend on EFI variable service, and can't be DynamicExHii PCD." -#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdUse5LevelPageTable_PROMPT #language en-US "Enable 5-Level Paging support in long mode" +#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdEnable5LevelPageTable_PROMPT #language en-US "Enable 5-Level Paging support in long mode" -#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdUse5LevelPageTable_HELP #language en-US "Indicates if 5-Level Paging will be enabled in long mode. 5-Level Paging will not be enabled" +#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdEnable5LevelPageTable_HELP #language en-US "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." " TRUE - 5-Level Paging will be enabled." " FALSE - 5-Level Paging will not be enabled." -- 2.43.0 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#114373): https://edk2.groups.io/g/devel/message/114373 Mute This Topic: https://groups.io/mt/103950404/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-