From nobody Thu Dec 26 19:42:13 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+101129+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+101129+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=kernel.org ARC-Seal: i=1; a=rsa-sha256; t=1678727921; cv=none; d=zohomail.com; s=zohoarc; b=MHfFyg2s7uYcdP5S4IEEVwCBEbQjpw3G9OgGZapcqN7kbbiUlNzduEVnnUkQlXBp3S83R8VFOIKYgKnVPy32SpnP3eq+qpV69elUixmLwydOqro7V3LTMI3rEOgOdH4X/Pgxkn0wmc5NDJIltu2incIalGJRtNlwZWmGaa/VLR8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678727921; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=pJ6Fqpe2UX5/PmUbkyoO3YfHyafXn+EPrz4qL2h36WQ=; b=NrKZFSHlcy0Dx4DlzvdvYEod6MwNrN+nIjkfsKqQvCx51UsbVAfzIzcUbQVklRgs9vemT2BgdAGvUkYUJwYXP2tKDnnOFU/IKDGCmbgX0OPcZ9tze7i52bWv+kJ2YUc/sJ+YyK311CmznhOTKWZ+iAsH/g3YLGSVO51edwgGAmc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+101129+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1678727921757475.5504512418978; Mon, 13 Mar 2023 10:18:41 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id b5M7YY1788612x2BCkGNJfZg; Mon, 13 Mar 2023 10:18:41 -0700 X-Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by mx.groups.io with SMTP id smtpd.web11.26503.1678727920720546779 for ; Mon, 13 Mar 2023 10:18:40 -0700 X-Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4365A6142D; Mon, 13 Mar 2023 17:18:40 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 75EC5C4339C; Mon, 13 Mar 2023 17:18:37 +0000 (UTC) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Michael Kinney , Liming Gao , Jiewen Yao , Michael Kubacki , Sean Brogan , Rebecca Cran , Leif Lindholm , Sami Mujawar , Taylor Beebe Subject: [edk2-devel] [PATCH v5 25/38] ArmVirtPkg/ArmVirtQemu: Use PEI flavor of ArmMmuLib for all PEIMs Date: Mon, 13 Mar 2023 18:17:01 +0100 Message-Id: <20230313171714.3866151-26-ardb@kernel.org> In-Reply-To: <20230313171714.3866151-1-ardb@kernel.org> References: <20230313171714.3866151-1-ardb@kernel.org> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: 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,ardb@kernel.org X-Gm-Message-State: 2JfbJubiNJ6dzc1HpHw1ps2Qx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1678727921; bh=hX5+dKlmBcvOEztEf2tZ2p4ijsJpNddNAOvkvh2EFRs=; h=Cc:Date:From:Reply-To:Subject:To; b=SJesJXZfXr3/UDanJ8yA8Nz4CRe6qyMXLwQEG4fGlaWHBWkUijhWp5LAfSo8EhfcEiL l0zBVQUDfDyaq437nJNXEWmdGfFNEOHVeqursPIxT3y4CbBscx4OntMgNxSrBzRaNJJZ7 ppEwKMHmgq0K0gNVxcR88APIryxVO3tRLok= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1678727922310100002 Content-Type: text/plain; charset="utf-8" The PEI flavor of the ArmMmuLib will install a HOB that exposes its implementation of the special helper routine that is used to update live entries, so that other instantiations of ArmMmuLib can invoke it. This is needed to ensure that splitting page tables using break-before-make (BBM) does not unmap the code that is performing the split. However, the BASE variety of ArmMmuLib discovers the HOB and sets a global pointer to refer to it, which is not possible in PEIMs, and so all PEIMs must use the PEI variety of this library if one does. Signed-off-by: Ard Biesheuvel --- ArmVirtPkg/ArmVirtQemu.dsc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc index b9c244f16e04..7f79a2b5fa6b 100644 --- a/ArmVirtPkg/ArmVirtQemu.dsc +++ b/ArmVirtPkg/ArmVirtQemu.dsc @@ -107,6 +107,9 @@ [LibraryClasses.common.PEIM] Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.inf !endif =20 +[LibraryClasses.AARCH64.PEIM] + ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuPeiLib.inf + [LibraryClasses.common.DXE_DRIVER] ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeRepor= tStatusCodeLib.inf =20 @@ -333,12 +336,7 @@ [Components.common] ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf MdeModulePkg/Core/Pei/PeiMain.inf ArmPlatformPkg/PlatformPei/PlatformPeim.inf - ArmVirtPkg/MemoryInitPei/MemoryInitPeim.inf { - -!if $(ARCH) =3D=3D AARCH64 - ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuPeiLib.inf -!endif - } + ArmVirtPkg/MemoryInitPei/MemoryInitPeim.inf ArmPkg/Drivers/CpuPei/CpuPei.inf =20 !if $(TPM2_ENABLE) =3D=3D TRUE --=20 2.39.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#101129): https://edk2.groups.io/g/devel/message/101129 Mute This Topic: https://groups.io/mt/97586031/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-