[edk2-devel] Implementation of edk2 SPI Driver Stack

2023-04-12 Thread Chang, Abner via groups.io
[AMD Official Use Only - General] Hi community, We are going to upstream generic edk2 SPI driver stack that is compliant with UEFI PI spec. The SPI driver stack is proposed to be located under MdeModulePkg/Bus/Spi. This is the message sent to RFC/dev mailing list for requesting comments. The si

Re: [edk2-devel] [Patch V2 1/8] OvmfPkg: Add CpuPageTableLib required by PiSmmCpuDxe

2023-04-12 Thread Gerd Hoffmann
On Wed, Apr 12, 2023 at 04:53:36PM +0800, Dun Tan wrote: > Add CpuPageTableLib instance required by PiSmmCpuDxe in > corresponding DSC files of OvmfPkg. > > Signed-off-by: Dun Tan > Cc: Ard Biesheuvel > Cc: Jiewen Yao > Cc: Jordan Justen > Cc: Gerd Hoffmann > Cc: Ray Ni Acked-by: Gerd Hoffm

[edk2-devel] [PATCH 5/5] RedfishPkg: Add Redfish Platform Config Protocol to RedfishPkg

2023-04-12 Thread Nickle Wang via groups.io
Add RedfishPlatformConfigDxe driver and corresponding library to RedfishPkg. Signed-off-by: Nickle Wang Cc: Abner Chang Cc: Igor Kulchytskyy Cc: Nick Ramirez --- RedfishPkg/RedfishComponents.dsc.inc | 3 +++ RedfishPkg/RedfishLibs.dsc.inc | 2 ++ RedfishPkg/RedfishPkg.dsc| 4

[edk2-devel] [PATCH 4/5] RedfishPkg: Helper library of EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL

2023-04-12 Thread Nickle Wang via groups.io
This is the helper library for using EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL. Signed-off-by: Nickle Wang Cc: Abner Chang Cc: Igor Kulchytskyy Cc: Nick Ramirez --- RedfishPkg/RedfishPkg.dec | 5 + .../RedfishPlatformConfigLib.inf | 41 +++ .../Library/Redfish

[edk2-devel] [PATCH 1/5] RedfishPkg: introduce EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL

2023-04-12 Thread Nickle Wang via groups.io
EDKII Redfish Platform Config Protocol defines the protocol interfaces that abstracts the platform configuration format and storage from EDK2 Redfish Feature driver. This protocol provides the interfaces to get and set platform configuration with the format and configuration storage agnostic to the

[edk2-devel] [PATCH 0/5] Introduce EDKII Redfish Platform Config Protocol

2023-04-12 Thread Nickle Wang via groups.io
Introduce EDKII Redfish Platform Config Protocol and corresponding libraries. This protocol is the interface between UEFI platform configuration and Redfish property. It could handle different firmware implementation and the implementation here is to map EDK2 HII questions to the properties defin

Re: [edk2-devel] [PATCH V1 1/1] OvmfPkg/PlatformPei: Skip PlatformInitEmuVariableNvStore in SEV guest

2023-04-12 Thread Gerd Hoffmann
Hi, > > > Specifying both OVMF_CODE.fd and OVMF_VARS.fd generates an ASSERT. > > > > Both as pflash I assume? Which assert? > > Yes, both as pflash. I've never attempted to run an SEV guest using the > -bios option. > > The assert is: > ASSERT [PlatformPei] > /root/kernels/ovmf-build-X64/Ov

Re: [edk2-devel] [PATCH v2 1/1] ShellPkg: UefiShellDebug1CommandsLib: Uefi Config Tables in Dmem.c

2023-04-12 Thread Gao, Zhichao
Merge at 42b0443599a69c703034079cf2bd389fa3a6bfde. Thanks, Zhichao > -Original Message- > From: devel@edk2.groups.io On Behalf Of Gao, > Zhichao > Sent: Tuesday, April 11, 2023 6:03 PM > To: devel@edk2.groups.io; sam.kay...@arm.com > Cc: Ni, Ray ; sunny.w...@arm.com; Samer.El-Haj- > mahm

Re: [edk2-devel] [PATCH V3] MdeModulePkg/RegularExpressionDxe: Fix GCC build error

2023-04-12 Thread Nickle Wang via groups.io
Hi Mike, It looks like this fix is not merged. Could you please help to merge this fix? There is CI build error which is related to this. Thanks, Nickle -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#102920): https://edk2.groups.io/g/d

Re: [edk2-devel] [edk2-platforms][PATCH] ManageabilityPkg: add support for the phosphor ipmi blob transfer protocol

2023-04-12 Thread Chang, Abner via groups.io
[AMD Official Use Only - General] Hi Nickle, Could you please create a BZ ticket for this? Pease also run Uncristify on these files. Feedback inline, > -Original Message- > From: Nickle Wang > Sent: Wednesday, April 12, 2023 11:17 AM > To: devel@edk2.groups.io > Cc: Chang, Abner ; Is

Re: [edk2-devel] [PATCH v7 1/3] UsbNetworkPkg/UsbRndis: Add USB RNDIS devices support

2023-04-12 Thread RichardHo [何明忠] via groups . io
Hi Pedro, Would you consent if I upstream the code to edk2/MdeModulePkg/Bus/Usb/UsbNetwork? Thanks, Richard -Original Message- From: Chang, Abner Sent: 2023年4月12日 12:26 PM To: Richard Ho (何明忠) ; Pedro Falcato ; devel@edk2.groups.io; rebe...@bsdio.com Cc: Andrew Fish ; Leif Lindholm ;

[edk2-devel] [PATCH v1 1/1] MdeModulePkg/Variable: TcgMorLockSmm Key Mismatch changes lock state

2023-04-12 Thread Abhimanyu Singh
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4410 Inside TcgMorLockSmm.c, the SetVariableCheckHandlerMorLock() function contains a scenario to prevent a possible dictionary attack on the MorLock Key in accordance with the TCG Platform Reset Mitigation Spec v1.10. The mechanism to prevent t

Re: [edk2-devel] [PATCH v2] MinPlatformPkg: Add Pcd for FADT REVISION and MINOR REVISION to update FADT entries from board package.

2023-04-12 Thread Isaac Oram
Reviewed-by: Isaac Oram -Original Message- From: Chiu, Chasel Sent: Wednesday, April 12, 2023 9:41 AM To: Chen, Aryeh ; devel@edk2.groups.io Cc: Desimone, Nathaniel L ; Oram, Isaac W ; Gao, Liming ; Dong, Eric Subject: RE: [PATCH v2] MinPlatformPkg: Add Pcd for FADT REVISION and MINO

Re: [edk2-devel] [Patch V2 0/8] Use CpuPageTableLib to create and update smm page table

2023-04-12 Thread Lendacky, Thomas via groups.io
On 4/12/23 05:17, duntan via groups.io wrote: Hi Tom, This patch set is to change PiSmmCpuDxeSmm code to use CpuPageTableLib to create and update SMM page table. The Pcd PcdPteMemoryEncryptionAddressOrMask is also used in PiSmmCpuDxeSmm code and the whole range covered by page table is mapped

[edk2-devel] [PATCH v2 2/3] MdePkg: Support FDT library.

2023-04-12 Thread Benny Lin
From: Benny Lin REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4392 Add FDT support in EDK2 by submodule 3rd party libfdt (https://github.com/devicetree-org/pylibfdt/tree/main/libfdt) 1. Correct the typo. 2. Remove no use definitions from LibFdtSupport.h. 3. Refer to LibcLib implementation b

[edk2-devel] [PATCH v2 3/3] .pytool: Support FDT library.

2023-04-12 Thread Benny Lin
From: Benny Lin REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4392 Add FDT support in EDK2 by submodule 3rd party libfdt (https://github.com/devicetree-org/pylibfdt/tree/main/libfdt) Add RequiredSubmodule object for CI setting. Cc: Sean Brogan Cc: Michael Kubacki Cc: Michael D Kinney C

[edk2-devel] [PATCH v2 0/3] Support FDT library.

2023-04-12 Thread Benny Lin
From: Benny Lin REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4392 Add FDT support in EDK2 by submodule 3rd party libfdt (https://github.com/devicetree-org/pylibfdt/tree/main/libfdt) Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Cc: Sean Brogan Cc: Michael Kubacki Signed-off-by

[edk2-devel] [PATCH v2 1/3] Tianocore: Support FDT library.

2023-04-12 Thread Benny Lin
From: Benny Lin REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4392 Add FDT support in EDK2 by submodule 3rd party libfdt (https://github.com/devicetree-org/pylibfdt/tree/main/libfdt) Add submodule libfdt and update ReadMe for the licence. Cc: Andrew Fish Cc: Leif Lindholm Cc: Michael D

[edk2-devel] Building edk2-platfrom Simics

2023-04-12 Thread Leon Groß
As mentioned in the Error I should write this email showing the error stack trace: Build environment: Linux-6.0.7-301.fc37.x86_64-x86_64-with-glibc2.36 Build start time: 15:58:52, Apr.11 2023 WORKSPACE= /tmp/vUDK2017 PACKAGES_PATH= /tmp/vUDK2017:/tmp/edk2-platforms:/tmp/edk2-non-osi E

Re: [edk2-devel] please help fix building error

2023-04-12 Thread luming.jin via groups.io
Hello liming Thx for your reply I have already fixed it. I need to install python dev package on the pc, then bug fixed. 致以诚挚的问候 / Kind Regards / Mit freundlichen Grüßen Luming Jin (Mr.) / 金镥明RDCS From: gaoliming Sent: Wednesday, April 12, 2023 1:43 PM To: devel@edk2.groups.io; Jin, Luming

Re: [edk2-devel] [PATCH v8 0/9] Adds AmdSmmCpuFeaturesLib and SmmSmramSaveStateLib

2023-04-12 Thread Attar, AbdulLateef (Abdul Lateef) via groups.io
[AMD Official Use Only - General] Hi Mike, Abner, Patch 5/9 is blank implementation of SmmCpuFeaturesLib library class. Whereas patch 6/9 is actual implementation of the library for AMD processor family. I had separated in two different patches for easy to review. Thanks AbduL -Origi

Re: [edk2-devel] [PATCH v8 1/9] MdePkg: Adds AMD SMRAM save state map

2023-04-12 Thread Attar, AbdulLateef (Abdul Lateef) via groups.io
[AMD Official Use Only - General] Hi Ray, I added the prefix "_" to be in align with Intel's SmramSaveStateMap.h, so that it looks similar and suppose in future if there is any common functionality requires then we can easily add to the common files. Thanks AbduL -Original Message---

Re: [edk2-devel] [PATCH v8 9/9] OvmfPkg: Uses SmmSmramSaveStateLib library

2023-04-12 Thread Attar, AbdulLateef (Abdul Lateef) via groups.io
[AMD Official Use Only - General] Hi Gerd, I think CI was failing with the message " SmmSmramSaveStateLib library not found", I didn't preserve the CI log. Thanks Abdul -Original Message- From: Gerd Hoffmann Sent: 11 April 2023 15:13 To: Attar, AbdulLateef (Abdul Lateef) Cc: de

Re: [edk2-devel] [PATCH v8 9/9] OvmfPkg: Uses SmmSmramSaveStateLib library

2023-04-12 Thread Attar, AbdulLateef (Abdul Lateef) via groups.io
[AMD Official Use Only - General] Hi Ray, You mean directly call the SmramSaveStateReadRegister instead of below code from edk2/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c ? Status = SmmCpuFeaturesReadSaveStateRegister (CpuIndex, Register, Width, Buffer); if (Status == EFI_UNSUPPORTE

Re: [edk2-devel] [PATCH v8 0/9] Adds AmdSmmCpuFeaturesLib and SmmSmramSaveStateLib

2023-04-12 Thread Attar, AbdulLateef (Abdul Lateef) via groups.io
[AMD Official Use Only - General] Got it, will merge these two patches(5/9 and 6/9) into single patch. -Original Message- From: Kinney, Michael D Sent: 12 April 2023 00:19 To: Attar, AbdulLateef (Abdul Lateef) ; Chang, Abner ; devel@edk2.groups.io Cc: Grimes, Paul ; Kirkendall, Garrett

[edk2-devel] [PATCH v1] Securitypkg/hddpassword: Update HddPasswordDxeInit to use Variable Policy

2023-04-12 Thread Linus Liu
From: Linus Liu REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4408 Change-Id: I3c4b466ef318766d6d70c9f73e36b94b5f10832c Cc: Jiewen Yao Cc: Maggie Chu Signed-off-by: Linus Liu --- SecurityPkg/HddPassword/HddPasswordDxe.c | 28 SecurityPkg/HddPassword/HddPasswordDx

[edk2-devel] [PATCH v1] Securitypkg/hddpassword: Update HddPasswordDxeInit to use Variable Policy

2023-04-12 Thread Linus Liu
From: Linus Liu REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4408 Change-Id: I3c4b466ef318766d6d70c9f73e36b94b5f10832c Cc: Jiewen Yao Cc: Maggie Chu Signed-off-by: Linus Liu --- SecurityPkg/HddPassword/HddPasswordDxe.c | 16 +++- SecurityPkg/HddPassword/HddPasswordDxe.h

[edk2-devel] [PATCH v1] Securitypkg/hddpassword: Update HddPasswordDxeInit to use Variable Policy

2023-04-12 Thread Linus Liu
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4408 Change-Id: I3c4b466ef318766d6d70c9f73e36b94b5f10832c Cc: Jiewen Yao Cc: FST-FIR-PRC Cc: FST FIR Server C Cc: Maggie Chu Signed-off-by: Linus Liu --- SecurityPkg/HddPassword/HddPasswordDxe.c | 16 +++- SecurityPkg/HddPassw

[edk2-devel] [PATCH v1] Securitypkg/hddpassword: Update HddPasswordDxeInit to use Variable Policy

2023-04-12 Thread Linus Liu
From: Linus Liu REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4408 Change-Id: I3c4b466ef318766d6d70c9f73e36b94b5f10832c Cc: Jiewen Yao Cc: FST-FIR-PRC Cc: FST FIR Server C Cc: Maggie Chu Signed-off-by: Linus Liu --- SecurityPkg/HddPassword/HddPasswordDxe.c | 16 +++- Se

[edk2-devel] [PATCH] Securitypkg/hddpassword: Update HddPasswordDxeInit to use Variable Policy

2023-04-12 Thread Linus Liu
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4408 Change-Id: I3c4b466ef318766d6d70c9f73e36b94b5f10832c Cc: Jiewen Yao , Jian J Wang , Maggie Chu Signed-off-by: Linus Liu --- SecurityPkg/HddPassword/HddPasswordDxe.c | 16 +++- SecurityPkg/HddPassword/HddPasswordDxe.h | 1

[edk2-devel] [PATCH] Securitypkg/hddpassword: Update HddPasswordDxeInit to use Variable Policy

2023-04-12 Thread Linus Liu
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4408 Change-Id: I3c4b466ef318766d6d70c9f73e36b94b5f10832c Cc: Jiewen Yao Cc: Jian J Wang Cc: Maggie Chu Signed-off-by: Linus Liu --- SecurityPkg/HddPassword/HddPasswordDxe.c | 16 +++- SecurityPkg/HddPassword/HddPasswordDxe.h

[edk2-devel] [PATCH] Securitypkg/hddpassword: Update HddPasswordDxeInit to use Variable Policy

2023-04-12 Thread Linus Liu
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4408 Change-Id: I3c4b466ef318766d6d70c9f73e36b94b5f10832c Cc: Jiewen Yao Cc: FST-FIR-PRC Cc: FST FIR Server C Cc: Maggie Chu Signed-off-by: Linus Liu --- SecurityPkg/HddPassword/HddPasswordDxe.c | 16 +++- SecurityPkg/HddPassw

Re: [edk2-devel] [PATCH 1/2] MdePkg: Support FDT library.

2023-04-12 Thread Benny Lin
Hi, Pedro, Thanks for your feedback. Sorry for the late response. Please find below my comment. -Original Message- From: Pedro Falcato Sent: Friday, March 31, 2023 7:19 AM To: devel@edk2.groups.io; Lin, Benny Cc: Kinney, Michael D ; Gao, Liming ; Liu, Zhiguang Subject: Re: [edk2-deve

Re: [edk2-devel] [PATCH v2] MinPlatformPkg: Add Pcd for FADT REVISION and MINOR REVISION to update FADT entries from board package.

2023-04-12 Thread Chiu, Chasel
Reviewed-by: Chasel Chiu Thanks, Chasel > -Original Message- > From: Chen, Aryeh > Sent: Wednesday, April 12, 2023 9:27 AM > To: devel@edk2.groups.io > Cc: Chen, Aryeh ; Chiu, Chasel > ; Desimone, Nathaniel L > ; Oram, Isaac W ; > Gao, Liming ; Dong, Eric > Subject: [PATCH v2] Min

[edk2-devel] [PATCH v2] MinPlatformPkg: Add Pcd for FADT REVISION and MINOR REVISION to update FADT entries from board package.

2023-04-12 Thread Chen, Aryeh
From: Aryeh Chen REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4409 Add Pcd for FADT REVISION and MINOR REVISION to update FADT entries from board package. Signed-off-by: Aryeh Chen Cc: Chasel Chiu Cc: Nate DeSimone Cc: Isaac Oram Cc: Liming Gao Cc: Eric Dong --- Platform/Intel/MinP

Re: [edk2-devel] [PATCH v2] MdePkg: Support FDT library.

2023-04-12 Thread Michael D Kinney
Hi Benny, Your V1 series had patches 0,1,2. Why was this merged into 1 patch? Or is this a patch on top of the V1 series? Please resend V2 as entire patch series with all changes merged in and please respond to all individual emails with feedback and which items you are addressing in V2 and whi

Re: [edk2-devel] [PATCH v1] MinPlatformPkg: Add Pcd for FADT REVISION and MINOR REVISION to update FADT entries from board package.

2023-04-12 Thread Chiu, Chasel
Hi Aryeh, Please see below inline for comments. Thanks, Chasel > -Original Message- > From: Chen, Aryeh > Sent: Wednesday, April 12, 2023 4:20 AM > To: devel@edk2.groups.io > Cc: Chen, Aryeh ; Chiu, Chasel > ; Desimone, Nathaniel L > ; Oram, Isaac W ; > Gao, Liming ; Dong, Eric > Su

[edk2-devel] [PATCH v2] MdePkg: Support FDT library.

2023-04-12 Thread Benny Lin
From: Benny Lin REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4392 Add FDT support in EDK2 by submodule 3rd party libfdt (https://github.com/devicetree-org/pylibfdt/tree/main/libfdt) 1. Correct the typo. 2. Remove no use definitions from LibFdtSupport.h. 3. Refer to LibcLib implementation b

Re: [edk2-devel] [PATCH V1 1/1] OvmfPkg/PlatformPei: Skip PlatformInitEmuVariableNvStore in SEV guest

2023-04-12 Thread Lendacky, Thomas via groups.io
On 4/12/23 02:24, Gerd Hoffmann wrote: On Tue, Apr 11, 2023 at 01:03:28PM -0500, Tom Lendacky wrote: On 4/11/23 05:04, Gerd Hoffmann wrote: On Fri, Apr 07, 2023 at 12:00:46PM -0500, Tom Lendacky wrote: Thanks for the quick turn-around, but that patch didn't work for me. I've update the bugzil

Re: [edk2-devel] [PATCH edk2-platforms 0/2] Platform/ARM/JunoPkg: Increase FV size and enable NOOPT build

2023-04-12 Thread Ard Biesheuvel
On Tue, 11 Apr 2023 at 15:46, Rebecca Cran wrote: > > The current FV size of 996KB for the Juno platform is rather restrictive > nowadays: a NOOPT build can be made to fit, but when enabling HTTPS boot > the firmware size becomes far too large even with an optimized DEBUG build. > > Since the size

[edk2-devel] [PATCH v1] MinPlatformPkg: Add Pcd for FADT REVISION and MINOR REVISION to update FADT entries from board package.

2023-04-12 Thread Chen, Aryeh
From: Aryeh Chen REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4409 Add Pcd for FADT REVISION and MINOR REVISION to update FADT entries from board package. Signed-off-by: Aryeh Chen Cc: Chasel Chiu Cc: Nate DeSimone Cc: Isaac Oram Cc: Liming Gao Cc: Eric Dong --- Platform/Intel/MinP

Re: [edk2-devel] [PATCH] OvmfPkg/VirtioMmioDeviceLib: virtio 1.0: Fix SetQueueAlignment.

2023-04-12 Thread Ard Biesheuvel
On Fri, 24 Mar 2023 at 13:30, Gerd Hoffmann wrote: > > On Fri, Mar 24, 2023 at 01:42:17AM +, Jeff Brasen wrote: > > Nothing to do here for virtio 1.0 devices > > > > Signed-off-by: Jeff Brasen > > --- > > .../Library/VirtioMmioDeviceLib/VirtioMmioDeviceFunctions.c | 4 +++- > > 1 file chan

Re: [edk2-devel] [Patch V2 0/8] Use CpuPageTableLib to create and update smm page table

2023-04-12 Thread duntan
Hi Tom, This patch set is to change PiSmmCpuDxeSmm code to use CpuPageTableLib to create and update SMM page table. The Pcd PcdPteMemoryEncryptionAddressOrMask is also used in PiSmmCpuDxeSmm code and the whole range covered by page table is mapped encrypted, which is different from the situatio

[edk2-devel] [PATCH 1/1] SecurityPkg/DxeImageVerificationLib: Add AUTH_SIG_NOT_FOUND Action

2023-04-12 Thread Nhi Pham via groups.io
Add the AUTH_SIG_NOT_FOUND Action to the Image Execution Info Table when the Image is signed but signature is not allowed by DB and the hash of image is not found in DB/DBX. This is documented in the UEFI spec 2.10, table 32.5. This issue is found by the SIE SCT with the error message as follows:

Re: [edk2-devel] [Patch V2 0/8] Use CpuPageTableLib to create and update smm page table

2023-04-12 Thread duntan
Hi Gerd, OvmfPkg/OvmfPkgIa32X64.dsc fails to build with first version patch set is because that CpuPageTableLib is not in OvmfPkg DSC files. The reason why I didn't add CpuPageTableLib into OvmfPkg DSC files is because a previous patch I sent before '[Patch V2 4/8] OvmfPkg: Add CpuPageTableLib

[edk2-devel] [Patch V2 7/8] UefiCpuPkg: Refinement to code about updating smm page table

2023-04-12 Thread duntan
This commit is code refinement to current smm runtime pagetable update code. In InitPaging() function, sort mProtectionMemRange or mSmmCpuSmramRanges at first. If PcdCpuSmmProfileEnable is TRUE, use ConvertMemoryPageAttributes() API to map the range in mProtectionMemRange to the attrbute recorded i

[edk2-devel] [Patch V2 8/8] UefiCpuPkg/PiSmmCpuDxeSmm: Remove unnecessary function

2023-04-12 Thread duntan
Remove unnecessary function SetNotPresentPage(). We can directly use ConvertMemoryPageAttributes to set a range to non-present. Signed-off-by: Dun Tan Cc: Eric Dong Cc: Ray Ni Cc: Rahul Kumar Cc: Gerd Hoffmann --- UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c | 8 ++-- UefiCpuPkg/P

[edk2-devel] [Patch V2 6/8] UefiCpuPkg: Refinement to current smm page table generation code

2023-04-12 Thread duntan
This commit is code refinement to current smm pagetable generation code. Add a new GenSmmPageTable() API to create page table for smm based on the PageTableMap() API in CpuPageTableLib. Caller only needs to specify the paging mode and the PhysicalAddressBits to map. This function can be used to cre

[edk2-devel] [Patch V2 5/8] UefiCpuPkg: Extern mSmmShadowStackSize in PiSmmCpuDxeSmm.h

2023-04-12 Thread duntan
Extern mSmmShadowStackSize in PiSmmCpuDxeSmm.h and remove extern for mSmmShadowStackSize in c files to simplify code. Signed-off-by: Dun Tan Cc: Eric Dong Cc: Ray Ni Cc: Rahul Kumar Cc: Gerd Hoffmann --- UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmmFuncsArch.c | 3 +-- UefiCpuPkg/PiSmmCpuDxeSmm/MpServi

[edk2-devel] [Patch V2 3/8] UefiCpuPkg: Use CpuPageTableLib to convert SMM paging attribute.

2023-04-12 Thread duntan
Simplify the ConvertMemoryPageAttributes API to convert paging attribute by CpuPageTableLib. In the new API, it calls PageTableMap() to update the page attributes of a memory range. With the PageTableMap() API in CpuPageTableLib, we can remove the complicated page table manipulating code. Signed-o

[edk2-devel] [Patch V2 4/8] UefiCpuPkg/PiSmmCpuDxeSmm: Avoid setting non-present range to RO/NX

2023-04-12 Thread duntan
In PiSmmCpuDxeSmm code, SetMemMapAttributes() marks memory ranges in SmmMemoryAttributesTable to RO/NX. There may exist non-present range in these memory ranges. Set other attributes for a non-present range is not permitted in CpuPageTableMapLib. So add code to handle this case. Only map the presen

[edk2-devel] [Patch V2 2/8] UefiPayloadPkg: Add CpuPageTableLib required by PiSmmCpuDxe

2023-04-12 Thread duntan
Add CpuPageTableLib required by PiSmmCpuDxeSmm in UefiPayloadPkg.dsc. Signed-off-by: Dun Tan Cc: Guo Dong Cc: Ray Ni Cc: Sean Rhodes Cc: James Lu Cc: Gua Guo --- UefiPayloadPkg/UefiPayloadPkg.dsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UefiPayloadPkg/UefiPayloadP

[edk2-devel] [Patch V2 1/8] OvmfPkg: Add CpuPageTableLib required by PiSmmCpuDxe

2023-04-12 Thread duntan
Add CpuPageTableLib instance required by PiSmmCpuDxe in corresponding DSC files of OvmfPkg. Signed-off-by: Dun Tan Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Jordan Justen Cc: Gerd Hoffmann Cc: Ray Ni --- OvmfPkg/CloudHv/CloudHvX64.dsc | 2 +- OvmfPkg/OvmfPkgIa32.dsc| 3 ++- OvmfPkg/Ovmf

[edk2-devel] [Patch V2 0/8] Use CpuPageTableLib to create and update smm page table

2023-04-12 Thread duntan
In V2 patch set: 1.In 'Refinement to code about updating smm page table', use QuickSort() in BaseLib instead or PerformQuickSort() in BaseSortLib. 2.Remove the patch to add BaseSortLib in DSC file. 3.Add a new patch to add CpuPageTableLib in UefiCpuPkg.dsc. 4.Add a temp patch to add CpuPageTableLi

Re: [edk2-devel] [PATCH v2] SimicsOpenBoardPkg: Remove duplicated SmmLockBox.inf

2023-04-12 Thread Ni, Ray
Reviewed-by: Ray Ni > -Original Message- > From: Liu, Zhiguang > Sent: Wednesday, April 12, 2023 4:32 PM > To: devel@edk2.groups.io > Cc: Liu, Zhiguang ; Desimone, Nathaniel L > ; Ni, Ray > Subject: [PATCH v2] SimicsOpenBoardPkg: Remove duplicated > SmmLockBox.inf > > Remove SmmLockBox

[edk2-devel] [PATCH v2] SimicsOpenBoardPkg: Remove duplicated SmmLockBox.inf

2023-04-12 Thread Zhiguang Liu
Remove SmmLockBox.inf to fix a build issue, because it is already been included from MinPlatform dsc/fdf file Cc: Nate DeSimone Cc: Ray Ni Signed-off-by: Zhiguang Liu --- .../Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc | 4 .../Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoar

Re: [edk2-devel] [PATCH] SimicsOpenBoardPkg: Remove duplicated SmmLockBox.inf

2023-04-12 Thread Zhiguang Liu
Yes, nice comment Thanks Zhiguang > -Original Message- > From: Ni, Ray > Sent: Wednesday, April 12, 2023 4:04 PM > To: Liu, Zhiguang ; devel@edk2.groups.io > Cc: Desimone, Nathaniel L > Subject: RE: [PATCH] SimicsOpenBoardPkg: Remove duplicated > SmmLockBox.inf > > Zhiguang, > Can you

Re: [edk2-devel] [PATCH] SimicsOpenBoardPkg: Remove duplicated SmmLockBox.inf

2023-04-12 Thread Ni, Ray
Zhiguang, Can you please remove it from Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc? Thanks, Ray > -Original Message- > From: Liu, Zhiguang > Sent: Wednesday, April 12, 2023 2:40 PM > To: devel@edk2.groups.io > Cc: Liu, Zhiguang ; Desimone, Nathaniel L > ; Ni, Ray

Re: [edk2-devel] [PATCH V1 1/1] OvmfPkg/PlatformPei: Skip PlatformInitEmuVariableNvStore in SEV guest

2023-04-12 Thread Gerd Hoffmann
On Tue, Apr 11, 2023 at 01:03:28PM -0500, Tom Lendacky wrote: > On 4/11/23 05:04, Gerd Hoffmann wrote: > > On Fri, Apr 07, 2023 at 12:00:46PM -0500, Tom Lendacky wrote: > > > > > > Thanks for the quick turn-around, but that patch didn't work for me. I've > > > update the bugzilla. > > > > Can you

Re: [edk2-devel] [PATCH v7 2/3] MdePkg: add SBI-based SerialPortLib for RISC-V

2023-04-12 Thread Sunil V L
Thanks, Andrei. Just one nit comment below. Otherwise, LGTM. Reviewed-by: Sunil V L On Fri, Apr 07, 2023 at 04:44:24PM -0500, Andrei Warkentin wrote: > These are implementations of SerialPortLib using SBI console services. > - BaseSerialPortLibRiscVSbiLib is appropriate for SEC/PEI (XIP) environ