From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f177.google.com (mail-pg1-f177.google.com [209.85.215.177]) by mx.groups.io with SMTP id smtpd.web12.877.1635884455964406898 for ; Tue, 02 Nov 2021 13:20:56 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@corthon-com.20210112.gappssmtp.com header.s=20210112 header.b=QucejZe4; spf=none, err=permanent DNS error (domain: corthon.com, ip: 209.85.215.177, mailfrom: bret@corthon.com) Received: by mail-pg1-f177.google.com with SMTP id p17so427101pgj.2 for ; Tue, 02 Nov 2021 13:20:55 -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=QucejZe4YVaQfuvXYkBmnjGvIvbMMIQVlv1RX8bWwRTAk8Tx5Ms/CamUZlrTIwCXKG EPjxQUH2GHZulgj5FRWVsnEqlD6l7YzYlBqEj1RlORJifV/+LYlPHrh7rPB97eDzgcMI 4lFcpJxCuoK4KBDiuunh32cXW+1mQFn5ggmaKXLAt4eV+kp/m0WLryEeHZV9+boLIGe/ QRnM9yp1XiW8VWFHn4B5Z4nbgxfWsecZuXw/t0+Pevnrh+W2auh45rYgcWsRnBI4loIV +70nR6uE8PXW8F3Ma4NlX6Qvhxlu7hvHKVuZpjVjtIRjiox6pvAeS6ZOFg3OktFvpTcQ FaQQ== 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=Utw7Wg9WDodbk5xbtCh9NG8CrERGu1ozqU3cCcTQyiW68MpCACyWwA2vfbfUy28Mmk OwTG+U5neilla7hhy8PRG8gcdxsZGJGYT/qnlmiYDgCP5zvkXSfKE4YgzaVXRdBrjQ3p DKVdpqRkfa0rx3/9js6hesIIAti3kVNfoYT7sJZ1TN98mV2erJLEyJz69ERGeHZEyeMk 9Uc3wmGfv3i87IPMuqy1nnw9kb3qEQ2grAZgMFWX3V46uZCHxVxUwBC7rf/3JEOOFLDO fidkSIjHDO9pE0BMWoyYkW0RfZpklQDmtPRGKcACSglKfold5HySaljKYJysffgn4qBq Nnrg== X-Gm-Message-State: AOAM533yBBuq0Zme+kftQfXST6wqcSUwNf1UgivZmA5PMYT0ls7lbNFS f6F9dn+hCUGaDicI43xlIuUufKBuoA8xceDw X-Google-Smtp-Source: ABdhPJzQNtwfgMeIpyFj/lO9dAZ0phGnjvlwRPuoa8vTX5VG2FzZ2Qira1Gy9AgMBg1Zze08vbd/FQ== X-Received: by 2002:a05:6a00:10d2:b0:44d:f03e:46c7 with SMTP id d18-20020a056a0010d200b0044df03e46c7mr38972588pfu.0.1635884455226; Tue, 02 Nov 2021 13:20:55 -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 t24sm17652pfg.118.2021.11.02.13.20.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Nov 2021 13:20:54 -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 v2 09/16] MdeModulePkg: Swap to MmuLib instead of Arm-specific lib Date: Tue, 2 Nov 2021 13:17:41 -0700 Message-Id: <20211102201748.1963-10-brbarkel@microsoft.com> X-Mailer: git-send-email 2.31.1.windows.1 In-Reply-To: <20211102201748.1963-1-brbarkel@microsoft.com> References: <20211102201748.1963-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