From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from cxsh.intel-email.com (cxsh.intel-email.com [121.46.250.151]) by mx.groups.io with SMTP id smtpd.web11.5612.1687661946778582877 for ; Sat, 24 Jun 2023 19:59:10 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@byosoft.com.cn header.s=cloud-union header.b=JX7e9IZZ; spf=pass (domain: byosoft.com.cn, ip: 121.46.250.151, mailfrom: gaoliming@byosoft.com.cn) Received: from cxsh.intel-email.com (localhost [127.0.0.1]) by cxsh.intel-email.com (Postfix) with ESMTP id 24F6ADDA7A9 for ; Sun, 25 Jun 2023 10:59:01 +0800 (CST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=byosoft.com.cn; s=cloud-union; t=1687661941; bh=9yZgrxIdlD0YruA6sygUKST9L4izj32BVUKXFAGcEVU=; h=From:To:Cc:References:In-Reply-To:Subject:Date; b=JX7e9IZZaN+cETiEyvNUQW/WKEoIQgpYNckKnYF0EKC1H0obXYaMEBKHF5jqbsa6j 2sDjoW1UH7OACPbcTUxK2Y8tC5q5YLZsieQaNjLd3hQvJH98IhwT55GYsWrGG4w9zI tc/U17KrffdCd+VO9+FPsAGOiuO3Pkp3Sx7iF900= Received: from localhost (localhost [127.0.0.1]) by cxsh.intel-email.com (Postfix) with ESMTP id 204CADDA7A1 for ; Sun, 25 Jun 2023 10:59:01 +0800 (CST) Received: from cxsh.intel-email.com (localhost [127.0.0.1]) by cxsh.intel-email.com (Postfix) with ESMTP id C976DDDA78E for ; Sun, 25 Jun 2023 10:59:00 +0800 (CST) Authentication-Results: cxsh.intel-email.com; none Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by cxsh.intel-email.com (Postfix) with SMTP id 623C9DDA7AF for ; Sun, 25 Jun 2023 10:58:57 +0800 (CST) Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Sun, 25 Jun 2023 10:58:56 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-Originating-IP: 58.246.60.130 X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: , , "'Ard Biesheuvel'" Cc: "'Ray Ni'" , "'Jiewen Yao'" , "'Gerd Hoffmann'" , "'Taylor Beebe'" , "'Oliver Smith-Denny'" , "'Dandan Bi'" , "'Dun Tan'" , "'Kinney, Michael D'" , "'Leif Lindholm'" References: <20230602151739.3600820-1-ardb@kernel.org> <6bd48197-a08e-ba19-3d84-c6fd53407519@linux.microsoft.com> In-Reply-To: <6bd48197-a08e-ba19-3d84-c6fd53407519@linux.microsoft.com> Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gW1BBVENIIHYyIDAvN10gQWRkIFBQSSB0byBtYW5hZ2UgUEVJIHBoYXNlIG1lbW9yeSBhdHRyaWJ1dGVz?= Date: Sun, 25 Jun 2023 10:58:57 +0800 Message-ID: <03df01d9a710$fc2be230$f483a690$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQE+dc+GOsauwfq4gxUfNOoK7vGudQHuJTzYsMHFGyA= Sender: "gaoliming" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn For the changes in MdeModulePkg, Reviewed-by: Liming Gao > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > =E5=8F=91=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io = =E4=BB=A3=E8=A1=A8 Michael > Kubacki > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2023=E5=B9=B46=E6=9C=887=E6=97=A5 7= :13 > =E6=94=B6=E4=BB=B6=E4=BA=BA: Ard Biesheuvel ; devel@edk2= .groups.io > =E6=8A=84=E9=80=81: Ray Ni ; Jiewen Yao ; Gerd > Hoffmann ; Taylor Beebe ; Oliver > Smith-Denny ; Dandan Bi ; > Dun Tan ; Liming Gao ; > Kinney, Michael D ; Leif Lindholm > > =E4=B8=BB=E9=A2=98: Re: [edk2-devel] [PATCH v2 0/7] Add PPI to manage PEI= phase memory > attributes >=20 > Reviewed-by: Michael Kubacki >=20 > On 6/2/2023 11:17 AM, Ard Biesheuvel wrote: > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4468 > > > > > > > > This is a followup to the RFC that I sent to the edk2-devel list on the > > > > 25th of May. > > > > > > > > In an attempt to make some incremental progress, this v2 only covers th= e > > > > NX remapping of the DXE stack in DxeIpl, using the newly introduced > > > > memory attributes PPI. > > > > > > > > Other use cases are deferred until we can converge on an approach that > > > > works across architectures and platforms. In particular, this means the > > > > following use cases: > > > > - mapping the DXE core code and data regions RO and XP, respectively; > > > > - mapping shadowed PEIMs read-only (including the PEI core itself); > > > > - managing memory permissions after temporary RAM migration; > > > > - reorganizing the X64 PEI flow with respect to page table allocation; > > > > - managing the dispatch order of the PEIM producing the PPI in relation > > > > to its consumers. > > > > > > > > The current series specifies the PPI in patch #1, and wires it up into > > > > DxeIpl to remap the DXE stack non-executable in a generic manner > > > > (patches #2 and #3) > > > > > > > > Patches #4 and #5 implement the PPI for ARM and AArch64. > > > > > > > > Patch #6 switches ARM and AArch64 over to the generic DxeIpl. > > > > > > > > Patch #7 cleans up the ARM implementation of the UEFI memory attributes > > > > protocol, based on the improvements made in patch #4. > > > > > > > > Changes since RFC (in addition to the above): > > > > - update PPI protype to use attributes+mask instead of setmask+clearmas= k > > > > - drop OVMF patch for RISC-V that has been applied in the meantime > > > > > > > > Cc: Ray Ni > > > > Cc: Jiewen Yao > > > > Cc: Gerd Hoffmann > > > > Cc: Taylor Beebe > > > > Cc: Oliver Smith-Denny > > > > Cc: Dandan Bi > > > > Cc: Dun Tan > > > > Cc: Liming Gao > > > > Cc: "Kinney, Michael D" > > > > Cc: Leif Lindholm > > > > Cc: Michael Kubacki > > > > > > > > Ard Biesheuvel (7): > > > > MdeModulePkg: Define memory attribute PPI > > > > MdeModulePkg/DxeIpl: Merge EBC, RISCV64 and LOONGARCH code > > > > MdeModulePkg/DxeIpl: Use memory attribute PPI to remap the stack > NX > > > > ArmPkg/ArmMmuLib: Extend API to manage memory permissions > better > > > > ArmPkg/CpuPei: Implement the memory attributes PPI > > > > MdeModulePkg/DxeIpl ARM AARCH64: Switch to generic handoff code > > > > ArmPkg/CpuDxe: Simplify memory attributes protocol implementation > > > > > > > > ArmPkg/Drivers/CpuDxe/CpuMmuCommon.c > | 2 +- > > > > ArmPkg/Drivers/CpuDxe/MemoryAttribute.c > | 50 +---------- > > > > ArmPkg/Drivers/CpuPei/CpuPei.c > | 76 +++++++++++++++++ > > > > ArmPkg/Drivers/CpuPei/CpuPei.inf > | 4 + > > > > ArmPkg/Include/Library/ArmMmuLib.h > | 36 +++++++- > > > > ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c > | 52 +++++++++++- > > > > ArmPkg/Library/ArmMmuLib/Arm/ArmMmuLibUpdate.c > | 88 +++++++++++++++++--- > > > > ArmPkg/Library/OpteeLib/Optee.c > | 2 +- > > > > MdeModulePkg/Core/DxeIplPeim/Arm/DxeLoadFunc.c > | 71 ---------------- > > > > MdeModulePkg/Core/DxeIplPeim/{Ebc/DxeLoadFunc.c =3D> DxeHandoff.c} > | 31 ++++++- > > > > MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf > | 24 ++---- > > > > MdeModulePkg/Core/DxeIplPeim/LoongArch64/DxeLoadFunc.c > | 63 -------------- > > > > MdeModulePkg/Core/DxeIplPeim/RiscV64/DxeLoadFunc.c > | 75 ----------------- > > > > MdeModulePkg/Include/Ppi/MemoryAttribute.h > | 83 ++++++++++++++++++ > > > > MdeModulePkg/MdeModulePkg.dec > | 3 + > > > > 15 files changed, 366 insertions(+), 294 deletions(-) > > > > delete mode 100644 > MdeModulePkg/Core/DxeIplPeim/Arm/DxeLoadFunc.c > > > > rename MdeModulePkg/Core/DxeIplPeim/{Ebc/DxeLoadFunc.c =3D> > DxeHandoff.c} (62%) > > > > delete mode 100644 > MdeModulePkg/Core/DxeIplPeim/LoongArch64/DxeLoadFunc.c > > > > delete mode 100644 > MdeModulePkg/Core/DxeIplPeim/RiscV64/DxeLoadFunc.c > > > > create mode 100644 MdeModulePkg/Include/Ppi/MemoryAttribute.h > > > > > > >=20 >=20 >=20 >=20