Re: [edk2-devel] MdeModulePkg: Fix MAT SplitRecord() Logic introduce one bug and will cause SUT reset when boot to windows

2024-04-17 Thread Taylor Beebe
Hi Yanbo, I didn't do it in the way you suggest for the same reason that the SplitTable() logic doesn't set attributes on descriptors of type EfiRuntimeServicesData or other memory types. The purpose of the SplitTable() function is to use the input image records to split descriptors so each

Re: [edk2-devel] [PATCH v1] MdeModulePkg: Fixup MAT Attributes After Splitting EFI Memory Map

2024-04-17 Thread Taylor Beebe
On 4/17/2024 7:09 AM, Oliver Smith-Denny wrote: On 4/17/2024 7:05 AM, Taylor Beebe wrote: On 4/17/2024 6:40 AM, Oliver Smith-Denny wrote: Aside from this, I wonder if we can be more aspirational here. These EfiRuntimeServicesCode regions without attributes set are, if I am understanding

Re: [edk2-devel] [PATCH v1] MdeModulePkg: Fixup MAT Attributes After Splitting EFI Memory Map

2024-04-17 Thread Taylor Beebe
On 4/17/2024 6:40 AM, Oliver Smith-Denny wrote: Hi Ard, On 4/16/2024 11:38 PM, Ard Biesheuvel wrote: For entries where we lack such additional metadata, I don't think we can make assumptions based on the type beyond mapping data and MMIO regions XP. We have no idea how those

Re: [edk2-devel] MdeModulePkg: Fix MAT SplitRecord() Logic introduce one bug and will cause SUT reset when boot to windows

2024-04-16 Thread Taylor Beebe
Hi Yanbo, Can you confirm that the following resolves the issue you're seeing? [PATCH v1] MdeModulePkg: Fixup MAT Attributes After Splitting EFI Memory Map (groups.io) <https://edk2.groups.io/g/devel/message/117889> -Taylor On 4/15/2024 6:17 PM, Taylor Beebe wrote: On 4/15/2024 3:57

[edk2-devel] [PATCH v1] MdeModulePkg: Fixup MAT Attributes After Splitting EFI Memory Map

2024-04-16 Thread Taylor Beebe
of runtime memory regions which are not part of loaded images (have not had their access attributes set). Cc: Liming Gao Signed-off-by: Taylor Beebe --- MdeModulePkg/Core/Dxe/Misc/MemoryAttributesTable.c | 29 ++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git

Re: [edk2-devel] MdeModulePkg: Fix MAT SplitRecord() Logic introduce one bug and will cause SUT reset when boot to windows

2024-04-15 Thread Taylor Beebe
On 4/15/2024 3:57 AM, Bi, Dandan wrote: Hi Taylor, With this patch, MAT contains some entries with Attribute - 0x8000, doesn't have EFI_MEMORY_RO or EFI_MEMORY_XP. After revert this patch, don't see such entries in MAT. a. MAT with this patch: Entry (0x609E4268) Type

Re: [edk2-devel] MdeModulePkg: Fix MAT SplitRecord() Logic introduce one bug and will cause SUT reset when boot to windows

2024-04-12 Thread Taylor Beebe
iginal Message- From: devel@edk2.groups.io On Behalf Of Taylor Beebe Sent: Tuesday, November 28, 2023 2:18 AM To: devel@edk2.groups.io Cc: Wang, Jian J ; Gao, Liming ; Bi, Dandan Subject: [edk2-devel] [PATCH v5 10/16] MdeModulePkg: Fix MAT SplitRecord() Logic SplitRecord() does not handle the case

Re: 回复: 回复: [edk2-devel] [PATCH v2 0/2] Update BaseTools NULL Include and Library Matching

2024-04-09 Thread Taylor Beebe
Hi Liming, I made a mistake in patch 2 of the v2 series. In v3, lines 126 and 144 of WorkspaceCommon.py update the check to: `LibraryClassName[4:].isdigit()` instead of `LibraryClass[4:].isdigit()` Can you re-review with this change? -Taylor On 4/1/2024 6:37 PM, gaoliming via groups.io

[edk2-devel] [PATCH v3 2/2] BaseTools: Use Stronger Matching for NULL Linked Libraries

2024-04-09 Thread Taylor Beebe
To prevent the possibility that a library with a name like NULLTestLib is interpreted as a NULL linked library, use more explicit pattern matching to ensure that the library name follows the pattern NULL%d. Cc: Rebecca Cran Cc: Liming Gao Cc: Bob Feng Cc: Yuwei Chen Signed-off-by: Taylor

[edk2-devel] [PATCH v3 0/2] Update BaseTools NULL Include and Library Matching

2024-04-09 Thread Taylor Beebe
lassName[4:].isdigit() instead of LibraryClass[4:].isdigit(). Taylor Beebe (2): BaseTools: Don't Recurse NULL Includes Not Linked to Module BaseTools: Use Stronger Matching for NULL Linked Libraries BaseTools/Source/Python/GenFds/FfsInfStatement.py| 4 ++-- BaseTools/Source/Python

[edk2-devel] [PATCH v3 1/2] BaseTools: Don't Recurse NULL Includes Not Linked to Module

2024-04-09 Thread Taylor Beebe
directly to the module/library being evaluated. Cc: Rebecca Cran Cc: Liming Gao Cc: Bob Feng Cc: Yuwei Chen Signed-off-by: Taylor Beebe Reviewed-by: Liming Gao --- BaseTools/Source/Python/Workspace/WorkspaceCommon.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/BaseTools/Source/Python

Re: 回复: [edk2-devel] [PATCH v2 0/2] Update BaseTools NULL Include and Library Matching

2024-03-28 Thread Taylor Beebe
: Can you submit a Bugzilla for this problem? Can you give one example to explain the incorrect usage? Thanks Liming -邮件原件- 发件人: devel@edk2.groups.io 代表 Taylor Beebe 发送时间: 2024年3月23日 3:19 收件人: devel@edk2.groups.io 抄送: Rebecca Cran ; Liming Gao ; Bob Feng ; Yuwei Chen 主题: [edk2-devel

[edk2-devel] [PATCH v2 2/2] BaseTools: Use Stronger Matching for NULL Linked Libraries

2024-03-22 Thread Taylor Beebe
To prevent the possibility that a library with a name like NULLTestLib is interpreted as a NULL linked library, use more explicit pattern matching to ensure that the library name follows the pattern NULL%d. Signed-off-by: Taylor Beebe Cc: Rebecca Cran Cc: Liming Gao Cc: Bob Feng Cc: Yuwei

[edk2-devel] [PATCH v2 0/2] Update BaseTools NULL Include and Library Matching

2024-03-22 Thread Taylor Beebe
v1: - Initial patch series v2: - Simplified the check for if the currently evaluated inf is a module or library. - Added a commit to use stronger matching of NULL includes (check for pattern "NULL") Cc: Rebecca Cran Cc: Liming Gao Cc: Bob Feng Cc: Yuwei Chen Taylo

[edk2-devel] [PATCH v2 1/2] BaseTools: Don't Recurse NULL Includes Not Linked to Module

2024-03-22 Thread Taylor Beebe
directly to the module/library being evaluated. Signed-off-by: Taylor Beebe Cc: Rebecca Cran Cc: Liming Gao Cc: Bob Feng Cc: Yuwei Chen --- BaseTools/Source/Python/Workspace/WorkspaceCommon.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/BaseTools/Source/Python/Workspace/WorkspaceCommon.py

Re: [edk2-devel] [PATCH] ArmVirtPkg: Allow EFI memory attributes protocol to be disabled

2023-12-06 Thread Taylor Beebe
But what we might do is invent a way to avoid setting the XP attribute on the entire region based on some heuristic. Given that the main purpose of the EFI memory attribute protocol is to provide the ability to remove XP (and set RO instead), perhaps we can avoid the set entirely? Just

[edk2-devel] [PATCH v1 15/17] Platform/Sophgo/SG2042_EVB_Board: Add ImagePropertiesRecordLib Instance

2023-11-30 Thread Taylor Beebe
ImagePropertiesRecordLib is used by DxeMain and PiSmmCore, so it needs to be added to most platforms. Signed-off-by: Taylor Beebe Cc: Sunil V L Cc: dahogn Cc: meng-cz Cc: caiyuqing379 Cc: USER0FISH --- Platform/Sophgo/SG2042_EVB_Board/SG2042.dsc | 1 + 1 file changed, 1 insertion(+) diff

[edk2-devel] [PATCH v1 17/17] Silicon/Phytium/PhytiumCommonPkg: Add ImagePropertiesRecordLib Instance

2023-11-30 Thread Taylor Beebe
ImagePropertiesRecordLib is used by DxeMain and PiSmmCore, so it needs to be added to most platforms. Signed-off-by: Taylor Beebe Cc: Leif Lindholm Cc: Peng Xie Cc: Ling Jia Cc: Yiqi Shu --- Silicon/Phytium/PhytiumCommonPkg/PhytiumCommonPkg.dsc.inc | 1 + 1 file changed, 1 insertion

[edk2-devel] [PATCH v1 16/17] Silicon/Ampere/AmpereAltraPkg: Add ImagePropertiesRecordLib Instance

2023-11-30 Thread Taylor Beebe
ImagePropertiesRecordLib is used by DxeMain and PiSmmCore, so it needs to be added to most platforms. Signed-off-by: Taylor Beebe Cc: Nhi Pham Cc: Chuong Tran Cc: Leif Lindholm Cc: Rebecca Cran --- Silicon/Ampere/AmpereAltraPkg/AmpereAltraPkg.dsc.inc | 1 + 1 file changed, 1 insertion

[edk2-devel] [PATCH v1 13/17] Silicon/Hisilicon: Add ImagePropertiesRecordLib Instance

2023-11-30 Thread Taylor Beebe
ImagePropertiesRecordLib is used by DxeMain and PiSmmCore, so it needs to be added to most platforms. Signed-off-by: Taylor Beebe Cc: Leif Lindholm Cc: Ard Biesheuvel Cc: Wenyi Xie --- Silicon/Hisilicon/Hisilicon.dsc.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/Silicon/Hisilicon

[edk2-devel] [PATCH v1 14/17] Silicon/Marvell/Armada7k8k: Add ImagePropertiesRecordLib Instance

2023-11-30 Thread Taylor Beebe
ImagePropertiesRecordLib is used by DxeMain and PiSmmCore, so it needs to be added to most platforms. Signed-off-by: Taylor Beebe Cc: Marcin Wojtas Cc: Leif Lindholm --- Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/Silicon/Marvell

[edk2-devel] [PATCH v1 11/17] Platform/SoftIron/Overdrive1000Board: Add ImagePropertiesRecordLib Instance

2023-11-30 Thread Taylor Beebe
ImagePropertiesRecordLib is used by DxeMain and PiSmmCore, so it needs to be added to most platforms. Signed-off-by: Taylor Beebe Cc: Ard Biesheuvel Cc: Leif Lindholm --- Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc | 1 + 1 file changed, 1 insertion(+) diff --git a/Platform

[edk2-devel] [PATCH v1 12/17] Silicon/NXP: Add ImagePropertiesRecordLib Instance

2023-11-30 Thread Taylor Beebe
ImagePropertiesRecordLib is used by DxeMain and PiSmmCore, so it needs to be added to most platforms. Signed-off-by: Taylor Beebe Cc: Leif Lindholm Cc: Meenakshi Aggarwal --- Silicon/NXP/NxpQoriqLs.dsc.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/Silicon/NXP/NxpQoriqLs.dsc.inc b

[edk2-devel] [PATCH v1 09/17] Platform/SiFive/U5SeriesPkg: Add ImagePropertiesRecordLib Instance

2023-11-30 Thread Taylor Beebe
ImagePropertiesRecordLib is used by DxeMain and PiSmmCore, so it needs to be added to most platforms. Signed-off-by: Taylor Beebe Cc: Daniel Schaefer --- Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.dsc | 1 + Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540

[edk2-devel] [PATCH v1 10/17] Platform/Socionext: Add ImagePropertiesRecordLib Instance

2023-11-30 Thread Taylor Beebe
ImagePropertiesRecordLib is used by DxeMain and PiSmmCore, so it needs to be added to most platforms. Signed-off-by: Taylor Beebe Cc: Ard Biesheuvel Cc: Leif Lindholm --- Platform/Socionext/DeveloperBox/DeveloperBox.dsc.inc | 1 + Platform/Socionext/SynQuacerEvalBoard

[edk2-devel] [PATCH v1 08/17] Platform/Qemu/SbsaQemu: Add ImagePropertiesRecordLib Instance

2023-11-30 Thread Taylor Beebe
ImagePropertiesRecordLib is used by DxeMain and PiSmmCore, so it needs to be added to most platforms. Signed-off-by: Taylor Beebe Cc: Ard Biesheuvel Cc: Leif Lindholm Cc: Graeme Gregory Cc: Marcin Juszkiewicz --- Platform/Qemu/SbsaQemu/SbsaQemu.dsc | 1 + 1 file changed, 1 insertion

[edk2-devel] [PATCH v1 07/17] Platform/Loongson/LoongArchQemuPkg: Add ImagePropertiesRecordLib Instance

2023-11-30 Thread Taylor Beebe
ImagePropertiesRecordLib is used by DxeMain and PiSmmCore, so it needs to be added to most platforms. Signed-off-by: Taylor Beebe Cc: Bibo Mao Cc: Xianglai li Cc: Chao Li --- Platform/Loongson/LoongArchQemuPkg/Loongson.dsc | 1 + 1 file changed, 1 insertion(+) diff --git a/Platform/Loongson

[edk2-devel] [PATCH v1 06/17] Platform/RaspberryPi: Add ImagePropertiesRecordLib Instance

2023-11-30 Thread Taylor Beebe
ImagePropertiesRecordLib is used by DxeMain and PiSmmCore, so it needs to be added to most platforms. Signed-off-by: Taylor Beebe Cc: Ard Biesheuvel Cc: Leif Lindholm Cc: Jeremy Linton --- Platform/RaspberryPi/RPi3/RPi3.dsc | 1 + Platform/RaspberryPi/RPi4/RPi4.dsc | 1 + 2 files changed, 2

[edk2-devel] [PATCH v1 04/17] Platform/Intel/Vlv2TbltDevicePkg: Add ImagePropertiesRecordLib Instance

2023-11-30 Thread Taylor Beebe
ImagePropertiesRecordLib is used by DxeMain and PiSmmCore, so it needs to be added to most platforms. Signed-off-by: Taylor Beebe Cc: Zailiang Sun Cc: Yi Qian Cc: Nate DeSimone Cc: Sai Chaganty --- Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc | 1 + Platform/Intel/Vlv2TbltDevicePkg

[edk2-devel] [PATCH v1 05/17] Platform/LeMaker/CelloBoard: Add ImagePropertiesRecordLib Instance

2023-11-30 Thread Taylor Beebe
ImagePropertiesRecordLib is used by DxeMain and PiSmmCore, so it needs to be added to most platforms. Signed-off-by: Taylor Beebe Cc: Ard Biesheuvel Cc: Leif Lindholm --- Platform/LeMaker/CelloBoard/CelloBoard.dsc | 1 + 1 file changed, 1 insertion(+) diff --git a/Platform/LeMaker/CelloBoard

[edk2-devel] [PATCH v1 01/17] Platform/AMD/OverdriveBoard: Add ImagePropertiesRecordLib Instance

2023-11-30 Thread Taylor Beebe
ImagePropertiesRecordLib is used by DxeMain and PiSmmCore, so it needs to be added to most platforms. Signed-off-by: Taylor Beebe Cc: Abner Chang Cc: Abdul Lateef Attar Cc: Ard Biesheuvel Cc: Leif Lindholm --- Platform/AMD/OverdriveBoard/OverdriveBoard.dsc | 1 + 1 file changed, 1 insertion

[edk2-devel] [PATCH v1 02/17] Platform/ARM/Morello: Add ImagePropertiesRecordLib Instance

2023-11-30 Thread Taylor Beebe
ImagePropertiesRecordLib is used by DxeMain and PiSmmCore, so it needs to be added to most platforms. Signed-off-by: Taylor Beebe Cc: Ard Biesheuvel Cc: Thomas Abraham Cc: Sami Mujawar --- Platform/ARM/Morello/MorelloPlatform.dsc.inc | 1 + 1 file changed, 1 insertion(+) diff --git

[edk2-devel] [PATCH v1 03/17] Platform/BeagleBoard/BeagleBoardPkg: Add ImagePropertiesRecordLib Instance

2023-11-30 Thread Taylor Beebe
ImagePropertiesRecordLib is used by DxeMain and PiSmmCore, so it needs to be added to most platforms. Signed-off-by: Taylor Beebe Cc: Ard Biesheuvel Cc: Leif Lindholm --- Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc | 1 + 1 file changed, 1 insertion(+) diff --git a/Platform

[edk2-devel] [PATCH v1 00/17] Add ImagePropertiesRecordLib Instances

2023-11-30 Thread Taylor Beebe
ImagePropertiesRecordLib is used by DxeMain and PiSmmCore, so it needs to be added to most platforms. Taylor Beebe (17): Platform/AMD/OverdriveBoard: Add ImagePropertiesRecordLib Instance Platform/ARM/Morello: Add ImagePropertiesRecordLib Instance Platform/BeagleBoard/BeagleBoardPkg: Add

Re: [edk2-devel] [edk2-platforms][PATCH v1] QuarkPlatformPkg: Fix DxeCore Build Failures

2023-11-30 Thread Taylor Beebe
ImagePropertiesRecordLib to QuarkPlatformPkg and resolves the build failure. Cc: Chasel Chiu Cc: Ray Ni Cc: Sai Chaganty Cc: Liming Gao Cc: Michael D Kinney Cc: Kelly Steele Cc: Taylor Beebe Cc: Michael Kubacki Signed-off-by: Nate DeSimone --- Platform/Intel/QuarkPlatformPkg/Quark.dsc| 1

[edk2-devel] [PATCH v5 16/16] MdeModulePkg: Update DumpImageRecord() in ImagePropertiesRecordLib

2023-11-27 Thread Taylor Beebe
Wu Cc: Ray Ni Signed-off-by: Taylor Beebe Reviewed-by: Liming Gao --- MdeModulePkg/Core/Dxe/Misc/MemoryAttributesTable.c | 9 ++ MdeModulePkg/Core/PiSmmCore/MemoryAttributesTable.c| 11 +- MdeModulePkg/Library/ImagePropertiesRecordLib

[edk2-devel] [PATCH v5 14/16] MdeModulePkg: Transition SMM MAT Logic to Use ImagePropertiesRecordLib

2023-11-27 Thread Taylor Beebe
Now that the bugs are fixed in the MAT logic, we can remove the duplicate logic from PiSmmCore/MemoryAttributesTable.c and use ImagePropertiesRecordLib instead. Cc: Jian J Wang Cc: Liming Gao Cc: Dandan Bi Cc: Jiaxin Wu Cc: Ray Ni Signed-off-by: Taylor Beebe Reviewed-by: Liming Gao

[edk2-devel] [PATCH v5 12/16] MdeModulePkg: Add NULL checks and Return Status to ImagePropertiesRecordLib

2023-11-27 Thread Taylor Beebe
-off-by: Taylor Beebe Reviewed-by: Liming Gao --- MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.c | 290 MdeModulePkg/Include/Library/ImagePropertiesRecordLib.h | 137 - 2 files changed, 246 insertions(+), 181 deletions

[edk2-devel] [PATCH v5 13/16] UefiCpuPkg: Use Attribute From SMM MemoryAttributesTable if Nonzero

2023-11-27 Thread Taylor Beebe
Signed-off-by: Taylor Beebe Reviewed-by: Laszlo Ersek --- UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c b/UefiCpuPkg/PiSmmCpuDxeSmm

[edk2-devel] [PATCH v5 11/16] MdeModulePkg: Fix MAT SplitTable() Logic

2023-11-27 Thread Taylor Beebe
. This failure cases is documented extensively in the following bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=4492 Cc: Jian J Wang Cc: Liming Gao Cc: Dandan Bi Signed-off-by: Taylor Beebe Reviewed-by: Liming Gao --- MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.c

[edk2-devel] [PATCH v5 15/16] MdeModulePkg: Add Logic to Create/Delete Image Properties Records

2023-11-27 Thread Taylor Beebe
Add logic to create and delete image properties records. Where applicable, redirect existing code to use the new library. Cc: Jian J Wang Cc: Liming Gao Cc: Dandan Bi Cc: Jiaxin Wu Cc: Ray Ni Signed-off-by: Taylor Beebe Reviewed-by: Liming Gao --- MdeModulePkg/Core/Dxe/Misc

[edk2-devel] [PATCH v5 08/16] MdeModulePkg: Add ImagePropertiesRecordLib Host-Based Unit Test

2023-11-27 Thread Taylor Beebe
Cc: Liming Gao Cc: Dandan Bi Signed-off-by: Taylor Beebe Reviewed-by: Liming Gao --- MdeModulePkg/Library/ImagePropertiesRecordLib/UnitTest/ImagePropertiesRecordLibUnitTestHost.c | 938 MdeModulePkg/Library/ImagePropertiesRecordLib/UnitTest

[edk2-devel] [PATCH v5 09/16] MdeModulePkg: Fix MAT Descriptor Count Calculation

2023-11-27 Thread Taylor Beebe
to describe this layout will be 2 * 2 + 3 == 7. This patch updates the calculations to account for the worst-case scenario. Cc: Jian J Wang Cc: Liming Gao Cc: Dandan Bi Signed-off-by: Taylor Beebe Reviewed-by: Liming Gao --- MdeModulePkg/Core/Dxe/Misc/MemoryAttributesTable.c

[edk2-devel] [PATCH v5 06/16] MdeModulePkg: Update MemoryAttributesTable.c to Reduce Global Variable Use

2023-11-27 Thread Taylor Beebe
This patch updates MemoryAttributesTable.c to reduce reliance on global variables and allow some logic to move to a library. Cc: Jian J Wang Cc: Liming Gao Cc: Dandan Bi Signed-off-by: Taylor Beebe Reviewed-by: Liming Gao --- MdeModulePkg/Core/Dxe/Misc/MemoryAttributesTable.c | 102

[edk2-devel] [PATCH v5 04/16] OvmfPkg: Add ImagePropertiesRecordLib Instance

2023-11-27 Thread Taylor Beebe
Add an instance of ImagePropertiesRecordLib which will be used by the DXE Core. Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Jordan Justen Cc: Gerd Hoffmann Signed-off-by: Taylor Beebe Reviewed-by: Michael D Kinney Acked-by: Jiewen Yao --- OvmfPkg/AmdSev/AmdSevX64.dsc| 1 + OvmfPkg/Bhyve

[edk2-devel] [PATCH v5 03/16] EmulatorPkg: Add ImagePropertiesRecordLib Instance

2023-11-27 Thread Taylor Beebe
Add an instance of ImagePropertiesRecordLib which will be used by the DXE Core. Cc: Andrew Fish Cc: Ray Ni Signed-off-by: Taylor Beebe Reviewed-by: Michael D Kinney --- EmulatorPkg/EmulatorPkg.dsc | 1 + 1 file changed, 1 insertion(+) diff --git a/EmulatorPkg/EmulatorPkg.dsc b/EmulatorPkg

[edk2-devel] [PATCH v5 00/16] Add ImagePropertiesRecordLib and Fix MAT Bugs​

2023-11-27 Thread Taylor Beebe
Mujawar Cc: Sean Rhodes Cc: Lazlo Ersek Taylor Beebe (16): MdeModulePkg: Add ImagePropertiesRecordLib ArmVirtPkg: Add ImagePropertiesRecordLib Instance EmulatorPkg: Add ImagePropertiesRecordLib Instance OvmfPkg: Add ImagePropertiesRecordLib Instance UefiPayloadPkg: Add

[edk2-devel] [PATCH v5 01/16] MdeModulePkg: Add ImagePropertiesRecordLib

2023-11-27 Thread Taylor Beebe
Create a library for manipulating image properties records. The library is currently blank and will be filled in a future patch to help with reviewer readability. Cc: Jian J Wang Cc: Liming Gao Cc: Dandan Bi Signed-off-by: Taylor Beebe Reviewed-by: Liming Gao --- MdeModulePkg/Library

[edk2-devel] [PATCH v5 02/16] ArmVirtPkg: Add ImagePropertiesRecordLib Instance

2023-11-27 Thread Taylor Beebe
Add an instance of ImagePropertiesRecordLib which will be used by the DXE Core. Cc: Ard Biesheuvel Cc: Leif Lindholm Cc: Sami Mujawar Cc: Gerd Hoffmann Signed-off-by: Taylor Beebe Reviewed-by: Michael D Kinney --- ArmVirtPkg/ArmVirt.dsc.inc | 1 + 1 file changed, 1 insertion(+) diff --git

[edk2-devel] [PATCH v5 07/16] MdeModulePkg: Move Some DXE MAT Logic to ImagePropertiesRecordLib

2023-11-27 Thread Taylor Beebe
Move some DXE MAT logic to ImagePropertiesRecordLib to consolidate code and enable unit testability. Cc: Jian J Wang Cc: Liming Gao Cc: Dandan Bi Signed-off-by: Taylor Beebe Reviewed-by: Liming Gao --- MdeModulePkg/Core/Dxe/Misc/MemoryAttributesTable.c | 774

[edk2-devel] [PATCH v5 10/16] MdeModulePkg: Fix MAT SplitRecord() Logic

2023-11-27 Thread Taylor Beebe
-by: Taylor Beebe Reviewed-by: Liming Gao --- MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.c | 56 ++-- 1 file changed, 27 insertions(+), 29 deletions(-) diff --git a/MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.c b/MdeModulePkg

[edk2-devel] [PATCH v5 05/16] UefiPayloadPkg: Add ImagePropertiesRecordLib Instance

2023-11-27 Thread Taylor Beebe
Add an instance of ImagePropertiesRecordLib which will be used by the DXE Core. Cc: Guo Dong Cc: Sean Rhodes Cc: James Lu Cc: Gua Guo Signed-off-by: Taylor Beebe Reviewed-by: Michael D Kinney Reviewed-by: Gua Guo --- UefiPayloadPkg/UefiPayloadPkg.dsc | 1 + 1 file changed, 1 insertion

Re: [edk2-devel] [PATCH v4 11/14] UefiCpuPkg: Use Attribute From SMM MemoryAttributesTable if Nonzero

2023-11-20 Thread Taylor Beebe
. On 11/8/2023 1:57 PM, Laszlo Ersek wrote: On 11/3/23 18:17, Taylor Beebe wrote: The function EnforceMemoryMapAttribute() in the SMM MAT logic will ensure that the CODE and DATA memory types have the desired attributes. EnforceMemoryMapAttribute() leaves those descriptors alone where Attribute

[edk2-devel] [PATCH v4 13/14] MdeModulePkg: Add Logic to Create/Delete Image Properties Records

2023-11-03 Thread Taylor Beebe
Add logic to create and delete image properties records. Where applicable, redirect existing code to use the new library. Cc: Jian J Wang Cc: Liming Gao Cc: Dandan Bi Cc: Jiaxin Wu Cc: Ray Ni Signed-off-by: Taylor Beebe Reviewed-by: Liming Gao --- MdeModulePkg/Core/Dxe/Misc

[edk2-devel] [PATCH v4 14/14] MdeModulePkg: Update DumpImageRecord() in ImagePropertiesRecordLib

2023-11-03 Thread Taylor Beebe
Wu Cc: Ray Ni Signed-off-by: Taylor Beebe Reviewed-by: Liming Gao --- MdeModulePkg/Core/Dxe/Misc/MemoryAttributesTable.c | 9 ++ MdeModulePkg/Core/PiSmmCore/MemoryAttributesTable.c| 11 +- MdeModulePkg/Library/ImagePropertiesRecordLib

[edk2-devel] [PATCH v4 11/14] UefiCpuPkg: Use Attribute From SMM MemoryAttributesTable if Nonzero

2023-11-03 Thread Taylor Beebe
ImagePropertiesRecordLib instead of carrying two copies of the image properties record manipulation logic. Cc: Eric Dong Cc: Ray Ni Cc: Rahul Kumar Cc: Gerd Hoffmann Signed-off-by: Taylor Beebe --- UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c | 19 +++ 1 file changed, 11

[edk2-devel] [PATCH v4 12/14] MdeModulePkg: Transition SMM MAT Logic to Use ImagePropertiesRecordLib

2023-11-03 Thread Taylor Beebe
Now that the bugs are fixed in the MAT logic, we can remove the duplicate logic from PiSmmCore/MemoryAttributesTable.c and use ImagePropertiesRecordLib instead. Cc: Jian J Wang Cc: Liming Gao Cc: Dandan Bi Cc: Jiaxin Wu Cc: Ray Ni Signed-off-by: Taylor Beebe Reviewed-by: Liming Gao

[edk2-devel] [PATCH v4 05/14] UefiPayloadPkg: Add ImagePropertiesRecordLib Instance

2023-11-03 Thread Taylor Beebe
Add an instance of ImagePropertiesRecordLib which will be used by the DXE Core. Cc: Guo Dong Cc: Sean Rhodes Cc: James Lu Cc: Gua Guo Signed-off-by: Taylor Beebe Reviewed-by: Michael D Kinney Reviewed-by: Gua Guo --- UefiPayloadPkg/UefiPayloadPkg.dsc | 1 + 1 file changed, 1 insertion

[edk2-devel] [PATCH v4 09/14] MdeModulePkg: Fix Bugs in MAT Logic

2023-11-03 Thread Taylor Beebe
Fix the bugs in the MAT logic before switching the UEFI and SMM MAT logic to use the new library. Cc: Jian J Wang Cc: Liming Gao Cc: Dandan Bi Signed-off-by: Taylor Beebe Reviewed-by: Liming Gao --- MdeModulePkg/Core/Dxe/Misc/MemoryAttributesTable.c | 2

[edk2-devel] [PATCH v4 07/14] MdeModulePkg: Move Some DXE MAT Logic to ImagePropertiesRecordLib

2023-11-03 Thread Taylor Beebe
Move some DXE MAT logic to ImagePropertiesRecordLib to consolidate code and enable unit testability. Cc: Jian J Wang Cc: Liming Gao Cc: Dandan Bi Signed-off-by: Taylor Beebe Reviewed-by: Liming Gao --- MdeModulePkg/Core/Dxe/Misc/MemoryAttributesTable.c | 774

[edk2-devel] [PATCH v4 10/14] MdeModulePkg: Add NULL checks and Return Status to ImagePropertiesRecordLib

2023-11-03 Thread Taylor Beebe
-off-by: Taylor Beebe Reviewed-by: Liming Gao --- MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.c | 290 MdeModulePkg/Include/Library/ImagePropertiesRecordLib.h | 137 - 2 files changed, 246 insertions(+), 181 deletions

[edk2-devel] [PATCH v4 08/14] MdeModulePkg: Add ImagePropertiesRecordLib Host-Based Unit Test

2023-11-03 Thread Taylor Beebe
Cc: Liming Gao Cc: Dandan Bi Signed-off-by: Taylor Beebe Reviewed-by: Liming Gao --- MdeModulePkg/Library/ImagePropertiesRecordLib/UnitTest/ImagePropertiesRecordLibUnitTestHost.c | 938 MdeModulePkg/Library/ImagePropertiesRecordLib/UnitTest

[edk2-devel] [PATCH v4 06/14] MdeModulePkg: Update MemoryAttributesTable.c to Reduce Global Variable Use

2023-11-03 Thread Taylor Beebe
This patch updates MemoryAttributesTable.c to reduce reliance on global variables and allow some logic to move to a library. Cc: Jian J Wang Cc: Liming Gao Cc: Dandan Bi Signed-off-by: Taylor Beebe Reviewed-by: Liming Gao --- MdeModulePkg/Core/Dxe/Misc/MemoryAttributesTable.c | 102

[edk2-devel] [PATCH v4 00/14] Add ImagePropertiesRecordLib and Fix MAT Bugs

2023-11-03 Thread Taylor Beebe
Lindholm Cc: Liming Gao Cc: Rahul Kumar Cc: Ray Ni Cc: Sami Mujawar Cc: Sean Rhodes Cc: Lazlo Ersek Taylor Beebe (14): MdeModulePkg: Add ImagePropertiesRecordLib ArmVirtPkg: Add ImagePropertiesRecordLib Instance EmulatorPkg: Add ImagePropertiesRecordLib Instance OvmfPkg: Add

[edk2-devel] [PATCH v4 04/14] OvmfPkg: Add ImagePropertiesRecordLib Instance

2023-11-03 Thread Taylor Beebe
Add an instance of ImagePropertiesRecordLib which will be used by the DXE Core. Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Jordan Justen Cc: Gerd Hoffmann Signed-off-by: Taylor Beebe Reviewed-by: Michael D Kinney Acked-by: Jiewen Yao --- OvmfPkg/AmdSev/AmdSevX64.dsc| 1 + OvmfPkg/Bhyve

[edk2-devel] [PATCH v4 03/14] EmulatorPkg: Add ImagePropertiesRecordLib Instance

2023-11-03 Thread Taylor Beebe
Add an instance of ImagePropertiesRecordLib which will be used by the DXE Core. Cc: Andrew Fish Cc: Ray Ni Signed-off-by: Taylor Beebe Reviewed-by: Michael D Kinney --- EmulatorPkg/EmulatorPkg.dsc | 1 + 1 file changed, 1 insertion(+) diff --git a/EmulatorPkg/EmulatorPkg.dsc b/EmulatorPkg

[edk2-devel] [PATCH v4 02/14] ArmVirtPkg: Add ImagePropertiesRecordLib Instance

2023-11-03 Thread Taylor Beebe
Add an instance of ImagePropertiesRecordLib which will be used by the DXE Core. Cc: Ard Biesheuvel Cc: Leif Lindholm Cc: Sami Mujawar Cc: Gerd Hoffmann Signed-off-by: Taylor Beebe Reviewed-by: Michael D Kinney --- ArmVirtPkg/ArmVirt.dsc.inc | 1 + 1 file changed, 1 insertion(+) diff --git

[edk2-devel] [PATCH v4 01/14] MdeModulePkg: Add ImagePropertiesRecordLib

2023-11-03 Thread Taylor Beebe
Create a library for manipulating image properties records. The library is currently blank and will be filled in a future patch to help with reviewer readability. Cc: Jian J Wang Cc: Liming Gao Cc: Dandan Bi Signed-off-by: Taylor Beebe Reviewed-by: Liming Gao --- MdeModulePkg/Library

Re: [edk2-devel] [PATCH v4 11/14] UefiCpuPkg: Use Attribute From SMM MemoryAttributesTable if Nonzero

2023-11-01 Thread Taylor Beebe
This patch is the final in this series which needs a review. Can someone take a look? On 8/4/2023 12:46 PM, Taylor Beebe via groups.io wrote: From: Taylor Beebe The function EnforceMemoryMapAttribute() in the SMM MAT logic will ensure that the CODE and DATA memory types have the desired

Re: 回复: 回复: [edk2-devel] [PATCH v4 00/14] Add ImagePropertiesRecordLib and Fix MAT Bugs

2023-10-23 Thread Taylor Beebe
of the commit messages do not look right. Signed-off-by: Taylor Beebe Please make sure those are updated. Thanks, Mike -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#109965): https://edk2.groups.io/g/devel/message/109965 Mute This Topic

Re: 回复: 回复: [edk2-devel] [PATCH v4 00/14] Add ImagePropertiesRecordLib and Fix MAT Bugs

2023-10-13 Thread Taylor Beebe
ng via groups.io wrote: Taylor:  Thanks for your detail information. I understand more in the detail. The changes is good to me. Reviewed-by: Liming Gao Thanks Liming *发件人:*devel@edk2.groups.io *代表 *Taylor Beebe *发送时间:*2023年10月9日3:21 *收件人:*devel@edk2.groups.io; gaolim...@byosoft.com.cn;

Re: [edk2-devel] [PATCH v5 28/28] MdeModulePkg: Delete Memory Protection PCDs

2023-10-09 Thread Taylor Beebe
On 10/9/23 3:03 AM, Laszlo Ersek wrote: On 10/9/23 02:07, Taylor Beebe wrote: Now that the transition to use SetMemoryProtectionsLib and GetMemoryProtectionsLib is complete, delete the memory protection PCDs to avoid confusing the interface. All memory protection settings will now be set

[edk2-devel] [PATCH v5 28/28] MdeModulePkg: Delete Memory Protection PCDs

2023-10-08 Thread Taylor Beebe
Now that the transition to use SetMemoryProtectionsLib and GetMemoryProtectionsLib is complete, delete the memory protection PCDs to avoid confusing the interface. All memory protection settings will now be set and consumed via the libraries. Signed-off-by: Taylor Beebe Cc: Jian J Wang Cc

[edk2-devel] [PATCH v5 24/28] ArmVirtPkg: Apply Memory Protections via SetMemoryProtectionsLib

2023-10-08 Thread Taylor Beebe
Set the memory protections on Arm virtual platforms. Because the QemuFg parser is not currently available in ArmVirtPkg, use the GrubCompat profile by default. Signed-off-by: Taylor Beebe Cc: Ard Biesheuvel Cc: Leif Lindholm Cc: Sami Mujawar Cc: Gerd Hoffmann --- ArmVirtPkg/MemoryInitPei

[edk2-devel] [PATCH v5 27/28] ArmVirtPkg: Delete Memory Protection PCDs

2023-10-08 Thread Taylor Beebe
Now that the transition to use SetMemoryProtectionsLib and GetMemoryProtectionsLib is complete, delete the memory protection PCDs to avoid confusing the interface. All memory protection settings will now be set and consumed via the libraries. Signed-off-by: Taylor Beebe Cc: Ard Biesheuvel Cc

[edk2-devel] [PATCH v5 26/28] OvmfPkg: Delete Memory Protection PCDs

2023-10-08 Thread Taylor Beebe
Now that the transition to use SetMemoryProtectionsLib and GetMemoryProtectionsLib is complete, delete the memory protection PCDs to avoid confusing the interface. All memory protection settings will now be set and consumed via the libraries. Signed-off-by: Taylor Beebe Cc: Ard Biesheuvel Cc

[edk2-devel] [PATCH v5 25/28] MdeModulePkg: Delete PCD Profile from SetMemoryProtectionsLib

2023-10-08 Thread Taylor Beebe
Now that the transition to use SetMemoryProtectionsLib and GetMemoryProtectionsLib is complete, delete the PCD profile to avoid confusing the interface. All memory protection settings will now be set and consumed via the libraries. Signed-off-by: Taylor Beebe Cc: Jian J Wang Cc: Liming Gao

[edk2-devel] [PATCH v5 22/28] OvmfPkg: Add MemoryProtectionConfigLib

2023-10-08 Thread Taylor Beebe
MemoryProtectionConfigLib enables parsing the fw_cfg for the memory protection profile. Signed-off-by: Taylor Beebe Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Jordan Justen Cc: Gerd Hoffmann --- OvmfPkg/Library/MemoryProtectionConfigLib/MemoryProtectionConfigLib.c | 118

[edk2-devel] [PATCH v5 23/28] OvmfPkg: Enable Choosing Memory Protection Profile via QemuCfg

2023-10-08 Thread Taylor Beebe
and MM_MEMORY_PROTECTION_PROFILE=release are equivalent to the above examples. Signed-off-by: Taylor Beebe Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Jordan Justen Cc: Gerd Hoffmann Cc: Rebecca Cran Cc: Peter Grehan Cc: Corvin Köhne --- OvmfPkg/Library/PeilessStartupLib/PeilessStartup.c | 21

[edk2-devel] [PATCH v5 21/28] OvmfPkg: Add QemuFwCfgParseString to QemuFwCfgSimpleParserLib

2023-10-08 Thread Taylor Beebe
QemuFwCfgParseString allows reading strings from the fw_cfg file. This function is needed for parsing the memory protection profile name. Signed-off-by: Taylor Beebe Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Jordan Justen Cc: Gerd Hoffmann --- OvmfPkg/Library/QemuFwCfgSimpleParserLib

[edk2-devel] [PATCH v5 20/28] MdeModulePkg: Add Additional Profiles to SetMemoryProtectionsLib

2023-10-08 Thread Taylor Beebe
Now that the EDK2 tree uses GetMemoryProtectionsLib to query the platform memory protection settings, we can add additional profiles to SetMemoryProtectionsLib to give plaforms more options for setting memory protections. Signed-off-by: Taylor Beebe Cc: Jian J Wang Cc: Liming Gao

[edk2-devel] [PATCH v5 19/28] MdeModulePkg: Use GetMemoryProtectionsLib instead of Memory Protection PCDs

2023-10-08 Thread Taylor Beebe
Replace references to the memory protection PCDs to instead check the platform protections via GetMemoryProtectionsLib. Because the protection profile is equivalent to the PCD settings, this updated does not cause a torn state. Signed-off-by: Taylor Beebe Cc: Jian J Wang Cc: Liming Gao Cc

[edk2-devel] [PATCH v5 17/28] OvmfPkg: Use GetMemoryProtectionsLib instead of Memory Protection PCDs

2023-10-08 Thread Taylor Beebe
Replace references to the memory protection PCDs to instead check the platform protections via GetMemoryProtectionsLib. Because the protection profile is equivalent to the PCD settings, this updated does not cause a torn state. Signed-off-by: Taylor Beebe Cc: Ard Biesheuvel Cc: Jiewen Yao Cc

[edk2-devel] [PATCH v5 18/28] UefiCpuPkg: Use GetMemoryProtectionsLib instead of Memory Protection PCDs

2023-10-08 Thread Taylor Beebe
Replace references to the memory protection PCDs to instead check the platform protections via GetMemoryProtectionsLib. Because the protection profile is equivalent to the PCD settings, this updated does not cause a torn state. Signed-off-by: Taylor Beebe Cc: Eric Dong Cc: Ray Ni Cc: Rahul

[edk2-devel] [PATCH v5 15/28] ArmPkg: Use GetMemoryProtectionsLib instead of Memory Protection PCDs

2023-10-08 Thread Taylor Beebe
Replace references to the memory protection PCDs to instead check the platform protections via GetMemoryProtectionsLib. Signed-off-by: Taylor Beebe Cc: Leif Lindholm Cc: Ard Biesheuvel Cc: Sami Mujawar --- ArmPkg/Drivers/CpuDxe/CpuDxe.c | 5 ++--- ArmPkg/ArmPkg.dsc| 1

[edk2-devel] [PATCH v5 14/28] MdeModulePkg: Update DXE Handoff to use SetMemoryProtectionsLib

2023-10-08 Thread Taylor Beebe
, this updated does not cause a torn state. Signed-off-by: Taylor Beebe Cc: Jian J Wang Cc: Liming Gao Cc: Dandan Bi --- MdeModulePkg/Core/DxeIplPeim/DxeHandoff.c| 4 +++- MdeModulePkg/Core/DxeIplPeim/DxeLoad.c | 2 ++ MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c | 9

[edk2-devel] [PATCH v5 16/28] EmulatorPkg: Use GetMemoryProtectionsLib instead of Memory Protection PCDs

2023-10-08 Thread Taylor Beebe
Replace references to the memory protection PCDs to instead check the platform protections via GetMemoryProtectionsLib. Because the protection profile is equivalent to the PCD settings, this updated does not cause a torn state. Signed-off-by: Taylor Beebe Cc: Andrew Fish Cc: Ray Ni

[edk2-devel] [PATCH v5 13/28] UefiPayloadPkg: Update DXE Handoff to use SetMemoryProtectionsLib

2023-10-08 Thread Taylor Beebe
a profile, this updated does not cause a torn state. Signed-off-by: Taylor Beebe Cc: Guo Dong Cc: Sean Rhodes Cc: James Lu Cc: Gua Guo --- UefiPayloadPkg/UefiPayloadEntry/Ia32/DxeLoadFunc.c| 11 +-- UefiPayloadPkg/UefiPayloadEntry/LoadDxeCore.c | 2 ++ UefiPayloadPkg

[edk2-devel] [PATCH v5 07/28] MdeModulePkg: Check Print Level Before Dumping GCD Memory Map

2023-10-08 Thread Taylor Beebe
even when the print level doesn't include DEBUG_GCD. This patch adds a check for the DEBUG_GCD print level before dumping the GCD memory map which saves several seconds during boot when page/pool protections are active. Signed-off-by: Taylor Beebe Cc: Jian J Wang Cc: Liming Gao Cc: Dandan Bi

[edk2-devel] [PATCH v5 12/28] OvmfPkg: Update PeilessStartupLib to use SetMemoryProtectionsLib

2023-10-08 Thread Taylor Beebe
This patch updates the DXE Handoff in PEI-less Startup to use SetMemoryProtectionsLib to get the platform memory protection settings and build the page tables based on the applied protections. Signed-off-by: Taylor Beebe Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Jordan Justen Cc: Gerd Hoffmann

[edk2-devel] [PATCH v5 11/28] OvmfPkg: Apply Memory Protections via SetMemoryProtectionsLib

2023-10-08 Thread Taylor Beebe
and GetMemoryProtectionsLib is complete in the rest of EDK2, the mechanics of setting protections in OvmfPkg will be updated and the memory protection PCDs will be deleted. Signed-off-by: Taylor Beebe Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Jordan Justen Cc: Gerd Hoffmann --- OvmfPkg/Library/PeilessStartupLib

[edk2-devel] [PATCH v5 10/28] OvmfPkg: Add Memory Protection Library Definitions to Platforms

2023-10-08 Thread Taylor Beebe
Add library classes for SetMemoryProtectionsLib and GetMemoryProtectionsLib to OvmfPkg platfomrs. Signed-off-by: Taylor Beebe Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Jordan Justen Cc: Gerd Hoffmann Cc: Rebecca Cran Cc: Peter Grehan Cc: Corvin Köhne Cc: Jianyong Wu Cc: Anatol Belski Cc

[edk2-devel] [PATCH v5 09/28] ArmVirtPkg: Add Memory Protection Library Definitions to Platforms

2023-10-08 Thread Taylor Beebe
Add library classes for SetMemoryProtectionsLib and GetMemoryProtectionsLib to ArmVirtPkg. Signed-off-by: Taylor Beebe Cc: Ard Biesheuvel Cc: Leif Lindholm Cc: Sami Mujawar Cc: Gerd Hoffmann Cc: Julien Grall --- ArmVirtPkg/ArmVirt.dsc.inc | 6 ++ 1 file changed, 6 insertions(+) diff

[edk2-devel] [PATCH v5 08/28] UefiCpuPkg: Always Set Stack Guard in MpPei Init

2023-10-08 Thread Taylor Beebe
on every boot should be fine. Signed-off-by: Taylor Beebe Cc: Eric Dong Cc: Ray Ni Cc: Rahul Kumar Cc: Gerd Hoffmann --- UefiCpuPkg/CpuMpPei/CpuMpPei.c | 8 +++- UefiCpuPkg/CpuMpPei/CpuPaging.c | 16 UefiCpuPkg/CpuMpPei/CpuMpPei.h | 3 ++- UefiCpuPkg/CpuMpPei

[edk2-devel] [PATCH v5 05/28] MdeModulePkg: Copy PEI PCD Database Into New Buffer

2023-10-08 Thread Taylor Beebe
HOB memory should not be written to in DXE phase. This patch copies the PCD database from PEI into a new buffer so updates to dynamic PCDs don't write to HOB memory. Signed-off-by: Taylor Beebe Cc: Jian J Wang Cc: Liming Gao Cc: Dandan Bi --- MdeModulePkg/Universal/PCD/Dxe/Service.c | 6

[edk2-devel] [PATCH v5 04/28] MdeModulePkg: Implement SetMemoryProtectionsLib and GetMemoryProtectionsLib

2023-10-08 Thread Taylor Beebe
the gMps global. Signed-off-by: Taylor Beebe Cc: Jian J Wang Cc: Liming Gao --- MdeModulePkg/Library/GetMemoryProtectionsLib/DxeGetMemoryProtectionsLib.c | 158 ++ MdeModulePkg/Library/GetMemoryProtectionsLib/MmGetMemoryProtectionsLib.c| 124 + MdeModulePkg/Library

[edk2-devel] [PATCH v5 06/28] MdeModulePkg: Apply Protections to the HOB List

2023-10-08 Thread Taylor Beebe
-by: Taylor Beebe Cc: Jian J Wang Cc: Liming Gao Cc: Dandan Bi --- MdeModulePkg/Core/Dxe/Gcd/Gcd.c | 18 ++-- MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c | 29 2 files changed, 38 insertions(+), 9 deletions(-) diff --git a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c b

[edk2-devel] [PATCH v5 03/28] MdeModulePkg: Add NULL Instances for Get/SetMemoryProtectionsLib

2023-10-08 Thread Taylor Beebe
The NULL instances for GetMemoryProtectionsLib and SetMemoryProtectionsLib just zero out the memory protections structure effectively disabling memory protections. Signed-off-by: Taylor Beebe Cc: Jian J Wang Cc: Liming Gao --- MdeModulePkg/Library/GetMemoryProtectionsLib

[edk2-devel] [PATCH v5 00/28] Implement Dynamic Memory Protection Settings

2023-10-08 Thread Taylor Beebe
: Rahul Kumar Cc: Ray Ni Cc: Rebecca Cran Cc: Sami Mujawar Cc: Sean Rhodes Cc: Sunil V L Cc: Tom Lendacky Taylor Beebe (28): MdeModulePkg: Add DXE and MM Memory Protection Settings Definitions MdeModulePkg: Define SetMemoryProtectionsLib and GetMemoryProtectionsLib MdeModulePkg

[edk2-devel] [PATCH v5 01/28] MdeModulePkg: Add DXE and MM Memory Protection Settings Definitions

2023-10-08 Thread Taylor Beebe
a fixed at build PCD, memory protections will be set via a HOB at runtime. Signed-off-by: Taylor Beebe Cc: Jian J Wang Cc: Liming Gao --- MdeModulePkg/Include/Guid/MemoryProtectionSettings.h | 216 MdeModulePkg/MdeModulePkg.dec| 5 + 2 files changed

  1   2   3   >