From nobody Sun Feb 8 00:38:58 2026 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+100097+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+100097+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=kernel.org ARC-Seal: i=1; a=rsa-sha256; t=1676301542; cv=none; d=zohomail.com; s=zohoarc; b=hHY4nqNlUU6es22qgViBdW54UvCcsSjbrlaCNl13omlMaS6XLBx1BuZ9Vem+6BqRXK88PbrXd2WqNOWQz9bvqoaIgujtfQ1YTYJLMz8I0BeLEdyA+e4ijCklAq3/2UdLoqHHew+2a3/vdgpLqrrjaO5rMsGALBddaAJx7hd8QUg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676301542; 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=Y4aoHMaJcjL6zs+CumQ2lKocOTUMeooSGWnEYeu/rMc=; b=AMcdX8fFHPOaA/enlKenfazcjPR7MfUaIQ0vPhuFnlEVoIJrZm176I8LIrjwMRa2I36gl8SmdPg2m4wy4wJmCBEyucIPm8NcQMeV4jPIxgAxS1XAP1XEvfYNALtdL4xoB0Rw774Dz6TKCkJ5Sed//gjdiiJoMm+KB3KeqK9lDO0= 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+100097+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 167630154217034.52769744880379; Mon, 13 Feb 2023 07:19:02 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id D9dMYY1788612x0ZGQ5zBGHx; Mon, 13 Feb 2023 07:19:01 -0800 X-Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by mx.groups.io with SMTP id smtpd.web11.16992.1676301541096724228 for ; Mon, 13 Feb 2023 07:19:01 -0800 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 ams.source.kernel.org (Postfix) with ESMTPS id 7D8DCB81260; Mon, 13 Feb 2023 15:18:59 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 756B2C433A4; Mon, 13 Feb 2023 15:18:55 +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 , Matthew Garrett , Peter Jones , Kees Cook Subject: [edk2-devel] [RFC 10/13] ArmVirtPkg/ArmVirtQemu: Use PEI flavor of ArmMmuLib for all PEIMs Date: Mon, 13 Feb 2023 16:18:07 +0100 Message-Id: <20230213151810.2301480-11-ardb@kernel.org> In-Reply-To: <20230213151810.2301480-1-ardb@kernel.org> References: <20230213151810.2301480-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: ZU7t2JgtSSQuzo8keuiUAgmmx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1676301541; bh=P0V5scNcW4X39whlokDy7KasTZdLPQlBYzOuYp9hvqk=; h=Cc:Date:From:Reply-To:Subject:To; b=vCkenkk+QkWJA1sJQcnoNkNjWf8DFzoEHRgROsGQ+WppZoGCWCBiCsow3XZyvW58Ck7 otQtmia8pnpVIHFYLMTiEWG7gvhGAGuAwYtrNSJRaOW08tdNMIDcaI0E6NhEnM6ahC8FF gUFk7FulnUMNnT+fjZ8k2R9b09/o2dt+w+c= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1676301543729100001 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 dd4c84ae6eb9..69e51d19300d 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.1 -=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 (#100097): https://edk2.groups.io/g/devel/message/100097 Mute This Topic: https://groups.io/mt/96937489/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-