From nobody Sun Feb 8 19:43:32 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+106829+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+106829+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1689119588; cv=none; d=zohomail.com; s=zohoarc; b=lH6EtbeH0TDXomF3gdx0acNcIwR11eRBDd3JOdS4EUWflBePJ2PFWvMhLjcSbSkTiB0a6RluklTcvHMuKMFfB8feAo/oFZoZ0bMb3N4nyBjpEN4cs58VxQxcfhvtY+JaOpemZK0yCOqWLke8qspAbN1zQks9zq65r+9RFUA6VE0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1689119588; 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=tElKmjAKnzIAhAmkseVIh6ni5IFVgLSjwPeHrDeyMUE=; b=hP5TSsidYUxqMWotq/RaJ91JIO1aarenQz72q2cirfRFXyU6g/QX8CanV1lAT9NmcKXoBYxa0/3/fc7Ty8WMuopQOgDyRjLNW4WYtNdi+Rz4n5hQFxHoK4o2CQ1ccmZqYT52f6ORjx9mCB86+KY2tcPPcCpLatwnrUy5b8d+zUA= 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+106829+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1689119588975443.8027228277582; Tue, 11 Jul 2023 16:53:08 -0700 (PDT) Return-Path: DKIM-Signature: a=rsa-sha256; bh=TrH9KL4cOwO7ZdJFt2BsHENSB+j/8fBz5j+9AmPVIzA=; c=relaxed/simple; d=groups.io; h=X-Received:X-Received:X-Received:X-Gm-Message-State:X-Google-Smtp-Source:X-Received:X-Received:From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:MIME-Version:Precedence:List-Unsubscribe:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:Content-Transfer-Encoding; s=20140610; t=1689119588; v=1; b=lLKXTXsKQRWr95W4hoKEuCWogSbhG2p3evIil8NR0Icyiyu1Jxoqi7hCVMqN8hfvZF2+n9zD uhXJ9oNn4OBQ36dGvMHGRGZJRlqyA8rIZdUPo+qFsKKTizuezznW0x/bbvaFePfELFTbkUVGpXN XW51elXIweflgGXpDtZM56Ek= X-Received: by 127.0.0.2 with SMTP id FzYtYY1788612x2x2FdaR9CK; Tue, 11 Jul 2023 16:53:08 -0700 X-Received: from mail-il1-f169.google.com (mail-il1-f169.google.com [209.85.166.169]) by mx.groups.io with SMTP id smtpd.web11.1762.1689119587883801951 for ; Tue, 11 Jul 2023 16:53:08 -0700 X-Received: by mail-il1-f169.google.com with SMTP id e9e14a558f8ab-3460aee1d57so31290685ab.0 for ; Tue, 11 Jul 2023 16:53:07 -0700 (PDT) X-Gm-Message-State: ww8sRNyehR1Mu5BezOSo4NI9x1787277AA= X-Google-Smtp-Source: APBJJlEEpRRmtN80i1gmk+Fm7/K730ZSG+GXWAZTYCQZi3m8KtkKwy9JWEKv1rc/492CnF4mSWFD1g== X-Received: by 2002:a92:da11:0:b0:346:28e:ebf with SMTP id z17-20020a92da11000000b00346028e0ebfmr18522392ilm.2.1689119587062; Tue, 11 Jul 2023 16:53:07 -0700 (PDT) X-Received: from localhost.localdomain ([50.46.230.135]) by smtp.gmail.com with ESMTPSA id a13-20020a62e20d000000b00660d80087a8sm2232677pfi.187.2023.07.11.16.53.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jul 2023 16:53:06 -0700 (PDT) From: "Taylor Beebe" To: devel@edk2.groups.io Cc: Leif Lindholm , Ard Biesheuvel , Sami Mujawar Subject: [edk2-devel] [PATCH 06/14] ArmPkg: Update to use memory protection HOB Date: Tue, 11 Jul 2023 16:52:43 -0700 Message-ID: <3bb18b2b369dbab06da677707c4c0d7713ea1239.1689101263.git.t@taylorbeebe.com> In-Reply-To: References: 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,t@taylorbeebe.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1689119590001100021 Content-Type: text/plain; charset="utf-8" From: Taylor Beebe Replace references to the memory protection PCDs to instead reference the memory protection HOB. Signed-off-by: Taylor Beebe Cc: Leif Lindholm Cc: Ard Biesheuvel Cc: Sami Mujawar --- ArmPkg/ArmPkg.dsc | 1 + ArmPkg/Drivers/CpuDxe/CpuDxe.c | 5 ++--- ArmPkg/Drivers/CpuDxe/CpuDxe.inf | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ArmPkg/ArmPkg.dsc b/ArmPkg/ArmPkg.dsc index 4939b3d59b..3d3605921f 100644 --- a/ArmPkg/ArmPkg.dsc +++ b/ArmPkg/ArmPkg.dsc @@ -57,6 +57,7 @@ PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeC= offGetEntryPointLib.inf PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeC= offExtraActionLibNull.inf + DxeMemoryProtectionHobLib|MdeModulePkg/Library/MemoryProtectionHobLibNul= l/DxeMemoryProtectionHobLibNull.inf =20 UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServic= esLib.inf HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf diff --git a/ArmPkg/Drivers/CpuDxe/CpuDxe.c b/ArmPkg/Drivers/CpuDxe/CpuDxe.c index fc63e52784..6518a7130a 100644 --- a/ArmPkg/Drivers/CpuDxe/CpuDxe.c +++ b/ArmPkg/Drivers/CpuDxe/CpuDxe.c @@ -12,6 +12,7 @@ #include =20 #include +#include =20 BOOLEAN mIsFlushingGCD; =20 @@ -241,7 +242,6 @@ RemapUnusedMemoryNx ( VOID ) { - UINT64 TestBit; UINTN MemoryMapSize; UINTN MapKey; UINTN DescriptorSize; @@ -251,8 +251,7 @@ RemapUnusedMemoryNx ( EFI_MEMORY_DESCRIPTOR *MemoryMapEnd; EFI_STATUS Status; =20 - TestBit =3D LShiftU64 (1, EfiBootServicesData); - if ((PcdGet64 (PcdDxeNxMemoryProtectionPolicy) & TestBit) =3D=3D 0) { + if (!gDxeMps.ExecutionProtection.EnabledForType[EfiBootServicesData]) { return; } =20 diff --git a/ArmPkg/Drivers/CpuDxe/CpuDxe.inf b/ArmPkg/Drivers/CpuDxe/CpuDx= e.inf index 7d8132200e..a0f94bc567 100644 --- a/ArmPkg/Drivers/CpuDxe/CpuDxe.inf +++ b/ArmPkg/Drivers/CpuDxe/CpuDxe.inf @@ -46,6 +46,7 @@ CpuExceptionHandlerLib DebugLib DefaultExceptionHandlerLib + DxeMemoryProtectionHobLib DxeServicesTableLib HobLib MemoryAllocationLib @@ -65,7 +66,6 @@ =20 [Pcd.common] gArmTokenSpaceGuid.PcdVFPEnabled - gEfiMdeModulePkgTokenSpaceGuid.PcdDxeNxMemoryProtectionPolicy =20 [FeaturePcd.common] gArmTokenSpaceGuid.PcdDebuggerExceptionSupport --=20 2.41.0.windows.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 (#106829): https://edk2.groups.io/g/devel/message/106829 Mute This Topic: https://groups.io/mt/100090637/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-