From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) by mx.groups.io with SMTP id smtpd.web12.1598.1635796723193529370 for ; Mon, 01 Nov 2021 12:58:43 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@corthon-com.20210112.gappssmtp.com header.s=20210112 header.b=OlcBKaY3; spf=none, err=permanent DNS error (domain: corthon.com, ip: 209.85.214.176, mailfrom: bret@corthon.com) Received: by mail-pl1-f176.google.com with SMTP id t21so12378007plr.6 for ; Mon, 01 Nov 2021 12:58:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corthon-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2z0fK7LxNvQvAt9HmrPlW/4onhiyMZEouNI7J2rEvvU=; b=OlcBKaY38/XHRk+wIci8wX3CpbMWfJKB0U6Adzw/D5sfv0MIWpGKX8UzxejdoPdsTG tor3fviQjgwYSuw6cNQiIqle4+pjfVNVdaWviFtH5g8N2gUTM0P4c7GFcxgWz0PgN0vI hQQ9Xt7bQ7vJ72Jqm2Thy2lTvB7qNr6ngk+SyLBtSzr1L5qHEQc0X7p4dQbbCouWovu3 Dlr0WeGs3gatvEZ3o/BdSPjksFhaZdHlEZSvKRn0IBo/4iPYWcCsL6u+L5vse56Av1Sv ebWNxlhqmHJQdQAGx5bNOMLrhN6vYYDJ1/CkhrPXlrMaNnu1FnvkXenWIaVxYQj6H28h 9BSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2z0fK7LxNvQvAt9HmrPlW/4onhiyMZEouNI7J2rEvvU=; b=3wX4HqGhv0IPbivjYgJtf0qH+KfM86YuHmj5j+9A2Aa8sRZotjFDJU6oxDdSW5fZyZ 2pMSYIxDfiWLNqcyS6leMlCa8bevh1bQR/Hzo5YFjAj1y2ibT+q5cP6AV4dve1Bjc5yx Nledr07NR5U1N74s+ZWU6ro74RdKNALblVmb2CdoNgPL1x82uhzTkgH3Yh0gNNe8tbho KRcZKdke9Gl7IyuXx71/MKlYqZkf6UaHOOCYUVoRDTURidluMLrbtEyLmhMRfKjo1aID Ogu5kSwJ2VY94XXi01tozmeC1JO2TP3xeDR8V3jOqS+nQH+qBo2sB/EcVrQ4oXco8OvE y7rQ== X-Gm-Message-State: AOAM533bJ3m1GMCWyOl4RSsmHj/ZeYOEKCv3LOX2BudDl+H06K40EIfZ hZNWWwnyi74yUFmeOMKPqII+slBvsBekuC+X X-Google-Smtp-Source: ABdhPJzojqkfSTeyJuT3OKwx/TJW07lctWvGCJdOuTI2T0wY4qHmSqBNDNYbioz3CVKqNrEQuiJzow== X-Received: by 2002:a17:90a:7a81:: with SMTP id q1mr1176003pjf.1.1635796722516; Mon, 01 Nov 2021 12:58:42 -0700 (PDT) Return-Path: Received: from localhost.localdomain (174-21-94-94.tukw.qwest.net. [174.21.94.94]) by smtp.gmail.com with ESMTPSA id t2sm13759796pgf.35.2021.11.01.12.58.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Nov 2021 12:58:42 -0700 (PDT) From: "Bret Barkelew" X-Google-Original-From: "brbarkel@microsoft.com" To: devel@edk2.groups.io Cc: Jian J Wang , Liming Gao , Dandan Bi , Sean Brogan Subject: [PATCH v1 09/16] MdeModulePkg: Swap to MmuLib instead of Arm-specific lib Date: Mon, 1 Nov 2021 12:56:41 -0700 Message-Id: <20211101195648.6420-10-brbarkel@microsoft.com> X-Mailer: git-send-email 2.31.1.windows.1 In-Reply-To: <20211101195648.6420-1-brbarkel@microsoft.com> References: <20211101195648.6420-1-brbarkel@microsoft.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Bret Barkelew REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3651 Cc: Jian J Wang Cc: Liming Gao Cc: Dandan Bi Cc: Liming Gao Cc: Sean Brogan Signed-off-by: Bret Barkelew --- MdeModulePkg/Core/DxeIplPeim/Arm/DxeLoadFunc.c | 4 ++-- MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf | 4 +--- MdeModulePkg/MdeModulePkg.dsc | 3 +-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/MdeModulePkg/Core/DxeIplPeim/Arm/DxeLoadFunc.c b/MdeModulePkg/= Core/DxeIplPeim/Arm/DxeLoadFunc.c index 6619a650661b..16c20930a662 100644 --- a/MdeModulePkg/Core/DxeIplPeim/Arm/DxeLoadFunc.c +++ b/MdeModulePkg/Core/DxeIplPeim/Arm/DxeLoadFunc.c @@ -10,7 +10,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent =0D #include "DxeIpl.h"=0D =0D -#include =0D +#include =0D =0D /**=0D Transfers control to DxeCore.=0D @@ -40,7 +40,7 @@ HandOffToDxeCore ( ASSERT (BaseOfStack !=3D NULL);=0D =0D if (PcdGetBool (PcdSetNxForStack)) {=0D - Status =3D ArmSetMemoryRegionNoExec ((UINTN)BaseOfStack, STACK_SIZE);= =0D + Status =3D MmuSetAttributes ((UINTN)BaseOfStack, STACK_SIZE, EFI_MEMOR= Y_XP);=0D ASSERT_EFI_ERROR (Status);=0D }=0D =0D diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf b/MdeModulePkg/Core/Dx= eIplPeim/DxeIpl.inf index 19b8a4c8aefa..3634d836548f 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf +++ b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf @@ -57,8 +57,6 @@ [Packages] MdePkg/MdePkg.dec=0D MdeModulePkg/MdeModulePkg.dec=0D =0D -[Packages.ARM, Packages.AARCH64]=0D - ArmPkg/ArmPkg.dec=0D =0D [LibraryClasses]=0D PcdLib=0D @@ -77,7 +75,7 @@ [LibraryClasses] PerformanceLib=0D =0D [LibraryClasses.ARM, LibraryClasses.AARCH64]=0D - ArmMmuLib=0D + MmuLib=0D =0D [Ppis]=0D gEfiDxeIplPpiGuid ## PRODUCES=0D diff --git a/MdeModulePkg/MdeModulePkg.dsc b/MdeModulePkg/MdeModulePkg.dsc index ab505f5bb2c6..20790145d5bf 100644 --- a/MdeModulePkg/MdeModulePkg.dsc +++ b/MdeModulePkg/MdeModulePkg.dsc @@ -103,6 +103,7 @@ [LibraryClasses] DisplayUpdateProgressLib|MdeModulePkg/Library/DisplayUpdateProgressLibGr= aphics/DisplayUpdateProgressLibGraphics.inf=0D VariablePolicyHelperLib|MdeModulePkg/Library/VariablePolicyHelperLib/Var= iablePolicyHelperLib.inf=0D MmUnblockMemoryLib|MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibN= ull.inf=0D + MmuLib|MdePkg/Library/BaseMmuLibNull/BaseMmuLibNull.inf=0D =0D [LibraryClasses.EBC.PEIM]=0D IoLib|MdePkg/Library/PeiIoLibCpuIo/PeiIoLibCpuIo.inf=0D @@ -174,8 +175,6 @@ [LibraryClasses.common.MM_STANDALONE] MemLib|StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.inf= =0D =0D [LibraryClasses.ARM, LibraryClasses.AARCH64]=0D - ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf=0D - ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf=0D LockBoxLib|MdeModulePkg/Library/LockBoxNullLib/LockBoxNullLib.inf=0D =0D #=0D --=20 2.31.1.windows.1