[edk2-devel] [PATCH v2 10/10] OvmfPkg/ResetVector: wire up 5-level paging for SEV

2024-02-29 Thread Gerd Hoffmann
Turn the GetSevCBitMaskAbove31 OneTimeCall into a macro because we need that twice (for 4-level and 5-level paging). Change include order to allow AmdSev.asm macros being used in PageTables64.asm. Signed-off-by: Gerd Hoffmann --- OvmfPkg/ResetVector/Ia32/AmdSev.asm | 16

[edk2-devel] [PATCH v2 08/10] OvmfPkg/ResetVector: wire up 5-level paging for TDX

2024-02-29 Thread Gerd Hoffmann
BSP workflow is quite simliar to the non-coco case. TDX_WORK_AREA_PGTBL_READY is used to record the paging mode: 1 == 4-level paging 2 == 5-level paging APs will look at TDX_WORK_AREA_PGTBL_READY to figure whenever they should enable 5-level paging or not. Signed-off-by: Gerd Hoffmann ---

[edk2-devel] [PATCH v2 09/10] OvmfPkg/ResetVector: leave SEV VC handler installed longer

2024-02-29 Thread Gerd Hoffmann
When running in SEV mode keep the VC handler installed. Add a function to uninstall it later. This allows using the cpuid instruction in SetCr3ForPageTables64, which is needed to check for la57 & 1G page support. Signed-off-by: Gerd Hoffmann --- OvmfPkg/ResetVector/Ia32/AmdSev.asm | 12

[edk2-devel] [PATCH v2 07/10] OvmfPkg/ResetVector: print post codes for 4/5 level paging

2024-02-29 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Reviewed-by: Laszlo Ersek --- OvmfPkg/ResetVector/Ia32/PageTables64.asm | 8 1 file changed, 8 insertions(+) diff --git a/OvmfPkg/ResetVector/Ia32/PageTables64.asm b/OvmfPkg/ResetVector/Ia32/PageTables64.asm index 2d7fd523e4b1..e15945da0476 100644 ---

[edk2-devel] [PATCH v2 06/10] OvmfPkg/ResetVector: add 5-level paging support

2024-02-29 Thread Gerd Hoffmann
Add macros to check for 5-level paging and gigabyte page support. Enable 5-level paging for the non-confidential-computing case. Signed-off-by: Gerd Hoffmann --- OvmfPkg/ResetVector/ResetVector.inf | 1 + OvmfPkg/ResetVector/Ia32/PageTables64.asm | 100 ++

[edk2-devel] [PATCH v2 05/10] OvmfPkg/ResetVector: split SEV and non-CoCo workflows

2024-02-29 Thread Gerd Hoffmann
Use separate control flows for SEV and non-CoCo cases. SevClearPageEncMaskForGhcbPage and GetSevCBitMaskAbove31 will now only be called when running in SEV mode, so the SEV check in these functions is not needed any more. No functional change. Signed-off-by: Gerd Hoffmann Reviewed-by: Laszlo

[edk2-devel] [PATCH v2 04/10] OvmfPkg/ResetVector: split TDX BSP workflow

2024-02-29 Thread Gerd Hoffmann
Create a separate control flow for TDX BSP. TdxPostBuildPageTables will now only be called when running in TDX mode, so the TDX check in that function is not needed any more. No functional change. Signed-off-by: Gerd Hoffmann Reviewed-by: Laszlo Ersek ---

[edk2-devel] [PATCH v2 00/10] OvmfPkg/ResetVector: cleanup and add 5-level paging support.

2024-02-29 Thread Gerd Hoffmann
So I ran with the suggestion by Laszlo to move the page table setup into macros and untangle the non-CoCo / TDX / SEV code paths. The first five patches of the series are doing that (without functional changes). Support for 5-level paging is added by the following five patches. This way it is

[edk2-devel] [PATCH v2 02/10] OvmfPkg/ResetVector: add ClearOvmfPageTables macro

2024-02-29 Thread Gerd Hoffmann
Move code to clear the page tables to a nasm macro. No functional change. Signed-off-by: Gerd Hoffmann Reviewed-by: Laszlo Ersek --- OvmfPkg/ResetVector/Ia32/PageTables64.asm | 35 --- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git

[edk2-devel] [PATCH v2 03/10] OvmfPkg/ResetVector: add CreatePageTables4Level macro

2024-02-29 Thread Gerd Hoffmann
Move code to create 4-level page tables to a nasm macro. No functional change. Signed-off-by: Gerd Hoffmann Reviewed-by: Laszlo Ersek --- OvmfPkg/ResetVector/Ia32/PageTables64.asm | 70 +-- 1 file changed, 39 insertions(+), 31 deletions(-) diff --git

[edk2-devel] [PATCH v2 01/10] OvmfPkg/ResetVector: improve page table flag names

2024-02-29 Thread Gerd Hoffmann
Add comments, rename some of the PAGE_* flags and combined attributes. Specifically use "LARGEPAGE" instead of "2M" because that bit is used for both 2M and 1G large pages. Signed-off-by: Gerd Hoffmann Reviewed-by: Laszlo Ersek --- OvmfPkg/ResetVector/Ia32/PageTables64.asm | 39

[edk2-devel] [PATCH v1] MdeModulePkg/Core/Pei: Improve the copy performance

2024-02-29 Thread Li, Zhihao
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4697 EvacuateTempRam function will copy the temporary memory context to the rebased pages and the raw pages. Migrations of rebased PEIMs is from cache to memory, while raw PEIMs is from memory to memory. So the migrations of raw PEIMs is slower

Re: [edk2-devel] [PATCH v1 1/1] MdeModulePkg/AcpiTableDxe: Select ACPI memory type by PCD

2024-02-29 Thread Ni, Ray
Aaron, Can you share more background of this change? Thanks, Ray > -Original Message- > From: devel@edk2.groups.io On Behalf Of Aaron Li > Sent: Friday, March 1, 2024 2:04 PM > To: devel@edk2.groups.io > Cc: Liu, Zhiguang ; Bi, Dandan > ; Liming Gao ; Liu, Yun Y > > Subject:

[edk2-devel] [PATCH v1 1/1] MdeModulePkg/AcpiTableDxe: Select ACPI memory type by PCD

2024-02-29 Thread Aaron Li
UEFI spec defined ACPI Tables at boot time can be contained in memory of type EfiACPIReclaimMemory or EfiAcpiMemoryNVS, although InstallAcpiTable with AcpiTableProtocol will only allocate memory with type EfiACPIReclaimMemory (Except FACS). This patch provides an optional method controlled by PCD

Re: [edk2-devel] [PATCH v3 4/4] StandaloneMmPkg: Disallow unregister MMI handler in other MMI handler

2024-02-29 Thread Ni, Ray
Reviewed-by: Ray Ni Thanks, Ray > -Original Message- > From: Liu, Zhiguang > Sent: Friday, March 1, 2024 11:02 AM > To: devel@edk2.groups.io > Cc: Liu, Zhiguang ; Liming Gao > ; Wu, Jiaxin ; Ni, Ray > ; Laszlo Ersek ; Ard Biesheuvel > ; Sami Mujawar > Subject: [PATCH v3 4/4]

Re: [edk2-devel] [PATCH v3 2/4] MdeModulePkg/SMM: Disallow unregister SMI handler in other SMI handler

2024-02-29 Thread Ni, Ray
Reviewed-by: Ray Ni Thanks, Ray > -Original Message- > From: Liu, Zhiguang > Sent: Friday, March 1, 2024 11:02 AM > To: devel@edk2.groups.io > Cc: Liu, Zhiguang ; Liming Gao > ; Wu, Jiaxin ; Ni, Ray > ; Laszlo Ersek > Subject: [PATCH v3 2/4] MdeModulePkg/SMM: Disallow unregister SMI >

Re: [edk2-devel] [PATCH 2/2] MdeModulePkg/DxeCore: Fix stack overflow issue due to nested interrupts

2024-02-29 Thread Ni, Ray
I think we are all aligned on the purpose. It's to avoid enabling the interrupts in the end of RestoreTPL (HIGH->non-HIGH) in the interrupt context. The discussion is about how to implement it. Michael Brown's idea is to avoid changing DxeCore but add a customized RaiseTpl/RestoreTpl

[edk2-devel] [PATCH v3 4/4] StandaloneMmPkg: Disallow unregister MMI handler in other MMI handler

2024-02-29 Thread Zhiguang Liu
In last patch, we add code support to unregister MMI handler inside itself. However, the code doesn't support unregister MMI handler insider other MMI handler. While this is not a must-have usage. So add check to disallow unregister MMI handler in other MMI handler. Cc: Liming Gao Cc: Jiaxin Wu

[edk2-devel] [PATCH v3 3/4] StandaloneMmPkg: Support to unregister MMI handler inside MMI handler

2024-02-29 Thread Zhiguang Liu
To support unregister MMI handler inside MMI handler itself, get next node before MMI handler is executed, since LIST_ENTRY that Link points to may be freed if unregister MMI handler in MMI handler itself. Cc: Liming Gao Cc: Jiaxin Wu Reviewed-by: Ray Ni Reviewed-by: Laszlo Ersek Cc: Ard

[edk2-devel] [PATCH v3 2/4] MdeModulePkg/SMM: Disallow unregister SMI handler in other SMI handler

2024-02-29 Thread Zhiguang Liu
In last patch, we add code support to unregister SMI handler inside itself. However, the code doesn't support unregister SMI handler insider other SMI handler. While this is not a must-have usage. So add check to disallow unregister SMI handler in other SMI handler. Cc: Liming Gao Cc: Jiaxin Wu

[edk2-devel] [PATCH v3 1/4] MdeModulePkg/SMM: Support to unregister SMI handler inside SMI handler

2024-02-29 Thread Zhiguang Liu
To support unregister SMI handler inside SMI handler itself, get next node before SMI handler is executed, since LIST_ENTRY that Link points to may be freed if unregister SMI handler in SMI handler itself. Cc: Liming Gao Cc: Jiaxin Wu Reviewed-by: Ray Ni Reviewed-by: Laszlo Ersek

[edk2-devel] [PATCH v3 0/4] Support to unregister SMI handler inside SMI handler

2024-02-29 Thread Zhiguang Liu
This patch set is to support to unregister SMI handler inside SMI handler, also add check to not allow unregister SMI handler in other SMI handler. This patch set also have the same logic in StandaloneMmPkg. Because no change on the first patch, I kept the R-B for it. V3: Minor change on patch #2

[edk2-devel] [PATCH] BaseTools: PcdValueInit enhancement

2024-02-29 Thread Yuting Yang
Enhance PcdValueInit for storage saving Cc: Rebecca Cran rebe...@bsdio.com Cc: Liming Gao gaolim...@byosoft.com.cn Cc: Bob Feng bob.c.f...@intel.com Signed-off-by: Yuting Yang --- .../Source/Python/Workspace/DscBuildData.py | 43 ++- 1 file changed, 33 insertions(+), 10

[edk2-devel] [PATCH v3 3/3] OvmfPkg/RiscVVirt: Disable Svpbmt extension

2024-02-29 Thread Tuan Phan
Disable Svpbmt extension as QEMU not enables it in default config. Cc: Andrei Warkentin Cc: Ard Biesheuvel Cc: Gerd Hoffmann Cc: Jiewen Yao Cc: Sunil V L Reviewed-by: Laszlo Ersek Signed-off-by: Tuan Phan --- OvmfPkg/RiscVVirt/RiscVVirt.dsc.inc | 2 +- 1 file changed, 1 insertion(+), 1

[edk2-devel] [PATCH v3 2/3] UefiCpuPkg: RISC-V: MMU: Support Svpbmt extension

2024-02-29 Thread Tuan Phan
The GCD EFI_MEMORY_UC and EFI_MEMORY_WC memory attributes will be supported when Svpbmt extension available. Cc: Gerd Hoffmann Cc: Laszlo Ersek Cc: Rahul Kumar Cc: Ray Ni Signed-off-by: Tuan Phan --- .../Library/BaseRiscVMmuLib/BaseRiscVMmuLib.c | 101 +++---

[edk2-devel] [PATCH v3 1/3] MdePkg.dec: RISC-V: Define override bit for Svpbmt extension

2024-02-29 Thread Tuan Phan
Define the BIT 2 as the override bit for Svpbmt extension. This will be used by RISC-V MMU library to support EFI_MEMORY_UC and EFI_MEMORY_WC. Cc: Liming Gao Cc: Michael D Kinney Cc: Zhiguang Liu Reviewed-by: Laszlo Ersek Signed-off-by: Tuan Phan --- MdePkg/MdePkg.dec | 2 ++ 1 file

[edk2-devel] [PATCH v3 0/3] RISC-V: Support Svpbmt extension

2024-02-29 Thread Tuan Phan
This series adds support for RISC-V Svpbmt extension. The GCD EFI_MEMORY_UC and EFI_MEMORY_WC attributes will be mapped to IO and NC mode defined in PBMT field. v3: - Addressed Laszlo's comments. v2: - Generated patch for each package. Tuan Phan (3): MdePkg.dec: RISC-V: Define override

Re: [edk2-devel] [edk2-redfish-client][PATCH 00/13] use Redfish HTTP protocol

2024-02-29 Thread Nickle Wang via groups.io
Hi Mike, > May I know why didn't you remove > RedfishClientPkg/PrivateLibrary/RedfishLib completely? Yes, Abner and I had discussed this before. RedfishLib brings some difficulty to maintain because it is private library in two separated repositories. Before we go and remove it, we like

Re: [edk2-devel] [RFC PATCH 1/1] ArmPkg,MdePkg: move ArmLib.h to MdePkg

2024-02-29 Thread Yao, Jiewen
Sure. When we say "dependency", what we really mean is the dependency in INF file, not "dependency" in DSC file. >From package release perspective, only INF is the interface to other package. The DSC is only the package internal stuff, you can create multiple DSCs or add/remove DSC freely.

Re: [edk2-devel] [PATCH 2/2] MdeModulePkg/DxeCore: Fix stack overflow issue due to nested interrupts

2024-02-29 Thread Paolo Bonzini
On Thu, Feb 29, 2024 at 2:04 PM Ray Ni wrote: > @@ -134,9 +262,9 @@ CoreRestoreTpl ( >} > >// > - // Set the new value > + // Set the new TPL with interrupt disabled. >// > - > + CoreSetInterruptState (FALSE); >gEfiCurrentTpl = NewTpl; > >// > @@ -144,7 +272,22 @@

Re: [edk2-devel] [edk2-redfish-client][PATCH 00/13] use Redfish HTTP protocol

2024-02-29 Thread Mike Maslenkin
Good work, Nickle! On Thu, Feb 29, 2024 at 11:53 AM Nickle Wang via groups.io wrote: > > Redfish HTTP protocol is introduced to edk2 RedfishPkg. Update > RedfishClientPkg to use RedfishHttpLib. And remove the use of > RedfishHttpCacheLib. > > I also replace several functions from RedfishLib with

Re: [edk2-devel] [PATCH 2/2] MdeModulePkg/DxeCore: Fix stack overflow issue due to nested interrupts

2024-02-29 Thread Paolo Bonzini
On 2/29/24 20:22, Michael Brown wrote: The design of NestedInterruptTplLib is that each nested interrupt must increase the TPL, but if I understand correctly there is a hole here: // // Call RestoreTPL() to allow event notifications to be // dispatched. This will implicitly re-enable

Re: [edk2-devel] [PATCH 2/2] MdeModulePkg/DxeCore: Fix stack overflow issue due to nested interrupts

2024-02-29 Thread Paolo Bonzini
On 2/29/24 20:16, Kinney, Michael D wrote: -Original Message- From: Paolo Bonzini Sent: Thursday, February 29, 2024 11:04 AM To: Ni, Ray ; devel@edk2.groups.io Cc: Kinney, Michael D ; Liming Gao ; Laszlo Ersek ; Michael Brown Subject: Re: [PATCH 2/2] MdeModulePkg/DxeCore: Fix stack

Re: [edk2-devel] [PATCH 2/2] MdeModulePkg/DxeCore: Fix stack overflow issue due to nested interrupts

2024-02-29 Thread Michael Brown
On 29/02/2024 19:26, Michael D Kinney wrote: I think one advantage of this new proposal is to prevent an extra level of nesting and use of stack resources in that extra level. I think that's a negligible benefit. In the scenario as I outlined for NestedInterruptTplLib, there is potentially

Re: [edk2-devel] [PATCH 2/2] MdeModulePkg/DxeCore: Fix stack overflow issue due to nested interrupts

2024-02-29 Thread Michael Brown
On 29/02/2024 19:09, Michael D Kinney wrote: "When the DXE Foundation is notified that the EFI_CPU_ARCH_PROTOCOL has been installed, then the full version of the Boot Service RestoreTPL() can be made available. When an attempt is made to restore the TPL level to level below EFI_TPL_HIGH_LEVEL,

Re: [edk2-devel] [PATCH 2/2] MdeModulePkg/DxeCore: Fix stack overflow issue due to nested interrupts

2024-02-29 Thread Michael D Kinney
I think one advantage of this new proposal is to prevent an extra level of nesting and use of stack resources in that extra level. The nesting depth is then both predictable and minimized for a given set of supported TPL levels. Mike > -Original Message- > From: Michael Brown > Sent:

Re: [edk2-devel] [PATCH 2/2] MdeModulePkg/DxeCore: Fix stack overflow issue due to nested interrupts

2024-02-29 Thread Michael Brown
On 29/02/2024 19:04, Paolo Bonzini wrote: On 2/29/24 14:02, Ray Ni wrote: In the end, it will lower the TPL to TPL_APPLICATION with interrupt enabled. However, it's possible that another timer interrupt happens just in the end of RestoreTPL() function when TPL is TPL_APPLICATION. How do

Re: [edk2-devel] [PATCH 2/2] MdeModulePkg/DxeCore: Fix stack overflow issue due to nested interrupts

2024-02-29 Thread Michael D Kinney
> -Original Message- > From: Paolo Bonzini > Sent: Thursday, February 29, 2024 11:04 AM > To: Ni, Ray ; devel@edk2.groups.io > Cc: Kinney, Michael D ; Liming Gao > ; Laszlo Ersek ; Michael > Brown > Subject: Re: [PATCH 2/2] MdeModulePkg/DxeCore: Fix stack overflow issue > due to nested

Re: [edk2-devel] [PATCH 2/2] MdeModulePkg/DxeCore: Fix stack overflow issue due to nested interrupts

2024-02-29 Thread Michael D Kinney
> -Original Message- > From: Michael Brown > Sent: Thursday, February 29, 2024 9:39 AM > To: Kinney, Michael D ; > devel@edk2.groups.io; Ni, Ray > Cc: Liming Gao ; Laszlo Ersek > ; Paolo Bonzini > Subject: Re: [edk2-devel] [PATCH 2/2] MdeModulePkg/DxeCore: Fix stack > overflow issue due

Re: [edk2-devel] [PATCH 2/2] MdeModulePkg/DxeCore: Fix stack overflow issue due to nested interrupts

2024-02-29 Thread Michael D Kinney
Hi Paolo, The proposed change does not disable interrupts at TPL below TPL_HIGH_LEVEL when processing event handlers. It only prevents interrupts being enabled in the window from the last event processed in a timer interrupt and the return from the timer interrupt handler. This is a window

Re: [edk2-devel] [PATCH 2/2] MdeModulePkg/DxeCore: Fix stack overflow issue due to nested interrupts

2024-02-29 Thread Paolo Bonzini
On 2/29/24 14:02, Ray Ni wrote: In the end, it will lower the TPL to TPL_APPLICATION with interrupt enabled. However, it's possible that another timer interrupt happens just in the end of RestoreTPL() function when TPL is TPL_APPLICATION. How do non-OVMF platforms solve the issue? Do they

Re: [edk2-devel] [PATCH v2] SecurityPkg/SecureBootConfigDxe: Update UI according to UEFI spec

2024-02-29 Thread Felix Polyudov via groups.io
Reviewed-by: Felix Polyudov -Original Message- From: Tan, Ming Sent: Wednesday, February 28, 2024 10:32 PM To: Yao, Jiewen ; devel@edk2.groups.io; Pingle, Sneha S ; Felix Polyudov ; Bi, Dandan Cc: Xu, Min M Subject: [EXTERNAL] RE: [PATCH v2] SecurityPkg/SecureBootConfigDxe: Update

Re: [edk2-devel] [PATCH 2/2] MdeModulePkg/DxeCore: Fix stack overflow issue due to nested interrupts

2024-02-29 Thread Paolo Bonzini
Il gio 29 feb 2024, 17:45 Kinney, Michael D ha scritto: > Hi Michael, > > Can you provide a pointer to the UEFI Spec statement this breaks? > The spec does say that interrupts are disabled for TPL_HIGH_LEVEL, but indeed it doesn't say they are always enabled at lower levels. However, if the

Re: [edk2-devel] [PATCH 2/2] MdeModulePkg/DxeCore: Fix stack overflow issue due to nested interrupts

2024-02-29 Thread Michael Brown
On 29/02/2024 16:43, Kinney, Michael D wrote: Hi Michael, Can you provide a pointer to the UEFI Spec statement this breaks? II-9.7.1.3 RestoreTPL(): "When the DXE Foundation is notified that the EFI_CPU_ARCH_PROTOCOL has been installed, then the full version of the Boot Service RestoreTPL()

Re: [edk2-devel] [PATCH 2/2] MdeModulePkg/DxeCore: Fix stack overflow issue due to nested interrupts

2024-02-29 Thread Michael D Kinney
Hi Michael, Can you provide a pointer to the UEFI Spec statement this breaks? Thanks, Mike > -Original Message- > From: Michael Brown > Sent: Thursday, February 29, 2024 5:23 AM > To: devel@edk2.groups.io; Ni, Ray > Cc: Kinney, Michael D ; Liming Gao > ; Laszlo Ersek ; Paolo >

Re: [edk2-devel] [PATCH 09/10] OvmfPkg/ResetVector: leave SEV VC handler installed longer

2024-02-29 Thread Lendacky, Thomas via groups.io
On 2/22/24 05:54, Gerd Hoffmann wrote: When running in SEV mode keep the VC handler installed. Add a function to uninstall it later. This allows using the cpuid instruction in SetCr3ForPageTables64, which is needed to check for la57 & 1G page support. Signed-off-by: Gerd Hoffmann Looks

[edk2-devel] [PATCH 0/3] RISC-V Edk2 Server Platform Reference board

2024-02-29 Thread Chai, Evan
1. Create qemu-based server reference board. 2. Fixed the hotkeys not working in SCT UI. Evan Chai (3): RISC-V/PlatformBootManagerLib: add terminal interaction interface RiscVPlatformPkg: introduce more Pcds for PCI initialization RiscVQemuServerPlatform: create qemu-based server reference

[edk2-devel] [PATCH 2/3] RiscVPlatformPkg: introduce more Pcds for PCI initialization

2024-02-29 Thread Chai, Evan
It is assumed that the current system only supports a single RC model. Cc: Andrei Warkentin Cc: Sunil V L Cc: Yong Li Signed-off-by: Evan Chai --- Platform/RISC-V/PlatformPkg/RiscVPlatformPkg.dec | 16 1 file changed, 16 insertions(+) diff --git

[edk2-devel] [PATCH 1/3] RISC-V/PlatformBootManagerLib: add terminal interaction interface

2024-02-29 Thread Chai, Evan
Fixed the hotkey not wokring in SCT(like F5, F6, F9, etc...), causing all SCT tests to be run only through the command line. This change provides a standard terminal interaction interface in the UEFI environment. Cc: Andrei Warkentin Cc: Sunil V L Cc: Yong Li Signed-off-by: Evan Chai ---

[edk2-devel] [PATCH 0/3] RISC-V Edk2 Server Platform Reference board

2024-02-29 Thread Chai, Evan
1. Create qemu-based server reference board. 2. Fixed the hotkeys not working in SCT UI. Evan Chai (3): RISC-V/PlatformBootManagerLib: add terminal interaction interface RiscVPlatformPkg: introduce more Pcds for PCI initialization RiscVQemuServerPlatform: create qemu-based server reference

Re: [edk2-devel] [PATCH v2 00/23] Provide SEV-SNP support for running under an SVSM

2024-02-29 Thread Lendacky, Thomas via groups.io
On 2/29/24 08:06, Yao, Jiewen wrote: Below: -Original Message- From: Tom Lendacky Sent: Thursday, February 29, 2024 12:20 AM To: Yao, Jiewen ; devel@edk2.groups.io Cc: Ard Biesheuvel ; Aktas, Erdem ; Gerd Hoffmann ; Laszlo Ersek ; Liming Gao ; Kinney, Michael D ; Xu, Min M ; Liu,

Re: [edk2-devel] [PATCH v2 00/23] Provide SEV-SNP support for running under an SVSM

2024-02-29 Thread Yao, Jiewen
Below: > -Original Message- > From: Tom Lendacky > Sent: Thursday, February 29, 2024 12:20 AM > To: Yao, Jiewen ; devel@edk2.groups.io > Cc: Ard Biesheuvel ; Aktas, Erdem > ; Gerd Hoffmann ; Laszlo Ersek > ; Liming Gao ; Kinney, Michael > D ; Xu, Min M ; Liu, > Zhiguang ; Kumar, Rahul R

Re: [edk2-devel] [PATCH 2/2] MdeModulePkg/DxeCore: Fix stack overflow issue due to nested interrupts

2024-02-29 Thread Michael Brown
On 29/02/2024 13:02, Ni, Ray wrote: A ideal solution is to not keep the interrupt disabled when RestoreTPL(TPL_HIGH -> not TPL_HIGH) is executed in the timer interrupt context because the interrupt handler will re-enable the interrupt with arch specific instructions (e.g.: IRET for x86). The

[edk2-devel] [PATCH 2/2] MdeModulePkg/DxeCore: Fix stack overflow issue due to nested interrupts

2024-02-29 Thread Ni, Ray
Assuming the current TPL is TPL_APPLICATION, RaiseTPL (TPL_APPLICATION -> HIGH) and RestoreTPL (TPL_HIGH -> TPL_APPLICATION) are called in the timer interrupt context. RestoreTPL() will lower the TPL from TPL_HIGH to TPL_NOTIFY first, enable the interrupts and dispatch pending events associated

[edk2-devel] [PATCH 0/2] Fix stack overflow issue due to nested interrupts

2024-02-29 Thread Ni, Ray
Ray Ni (2): UefiCpuPkg/CpuDxe: Return correct interrupt state MdeModulePkg/DxeCore: Fix stack overflow issue due to nested interrupts MdeModulePkg/Core/Dxe/Event/Tpl.c | 151 +- UefiCpuPkg/CpuDxe/CpuDxe.c| 10 +- 2 files changed, 150 insertions(+), 11

[edk2-devel] [PATCH 1/2] UefiCpuPkg/CpuDxe: Return correct interrupt state

2024-02-29 Thread Ni, Ray
CpuDxe driver uses a global C variable to record the interrupt state. The state variable is updated every time CpuArch.EnableInterrupt() or CpuArch.DisableInterrupt() is called. CpuArch.GetInterruptState() simply returns the state variable. But when CpuArch.GetInterruptState() is called in the

Re: [edk2-devel] [PATCH v2 1/4] MdeModulePkg/SMM: Support to unregister SMI handler inside SMI handler

2024-02-29 Thread Ni, Ray
Reviewed-by: Ray Ni Thanks, Ray > -Original Message- > From: Liu, Zhiguang > Sent: Wednesday, February 28, 2024 10:28 AM > To: devel@edk2.groups.io > Cc: Liu, Zhiguang ; Liming Gao > ; Wu, Jiaxin ; Ni, Ray > ; Laszlo Ersek > Subject: [PATCH v2 1/4] MdeModulePkg/SMM: Support to

Re: [edk2-devel] [PATCH v2 3/4] StandaloneMmPkg: Support to unregister MMI handler inside MMI handler

2024-02-29 Thread Ni, Ray
Reviewed-by: Ray Ni Thanks, Ray > -Original Message- > From: Laszlo Ersek > Sent: Wednesday, February 28, 2024 4:47 PM > To: devel@edk2.groups.io; Liu, Zhiguang > Cc: Liming Gao ; Wu, Jiaxin > ; Ni, Ray ; Ard Biesheuvel > ; Sami Mujawar > Subject: Re: [edk2-devel] [PATCH v2 3/4]

Re: [edk2-devel] Peims are not gettting Dispatched in EagleStream Platform

2024-02-29 Thread memristor2 via groups.io
I solved my issue it seems that I fo got to add the crucial PcdPei.inf peim (yes all this fuss for a simple mistake) to my fdf file thank you for your help Sent with Proton Mail secure email. On Saturday, February 24th, 2024 at 5:41 PM, memristor2 wrote: > > > > > > Sent with Proton

Re: [edk2-devel] [edk2-platforms][PATCH V2 1/1] Platform/ARM/N1Sdp: Route the Debug Serial Port to IOFPGA UART1

2024-02-29 Thread Sami Mujawar
Hi Sahil, Thank you for this patch. Reviewed-by: Sami Mujawar Regards, Sami Mujawar -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#116161): https://edk2.groups.io/g/devel/message/116161 Mute This Topic:

Re: [edk2-devel] The API in BaseCryptLib can't seed the pseudorandom number generator properly

2024-02-29 Thread Li, Yi
Hi Eddie, There will be build error if you didn’t include OpensslLib*.inf but consume openssl BaseCryptLib, are you using BaseCryptLibOnProtocolPpi? This sounds strange, CryptRand should work fine in non-XIP environments, could you send me .map file of your application? Regards, Yi From:

Re: [edk2-devel] [PATCH v2 1/1] UefiCpuPkg/MpInitLib: add struct MP_HAND_OFF_CONFIG

2024-02-29 Thread Laszlo Ersek
On 2/28/24 12:48, Gerd Hoffmann wrote: > Move the WaitLoopExecutionMode and StartupSignalValue fields to a > separate HOB with the new struct. > > WaitLoopExecutionMode and StartupSignalValue are independent of > processor index ranges; they are global to MpInitLib (i.e., the entire > system).

Re: [edk2-devel] 回复: [PATCH] BaseTools/AutoGen: declare ProcessLibraryConstructorList() for SEC modules

2024-02-29 Thread Laszlo Ersek
On 2/25/24 04:32, gaoliming via groups.io wrote: > Laszlo: > Thanks for your work to make sure this issue be fixed. I agree this change. > Reviewed-by: Liming Gao Thanks; merged as commit bac9c74080cf, via . -=-=-=-=-=-=-=-=-=-=-=- Groups.io

Re: [edk2-devel] [PATCH v4 0/3] OvmfPkg: Add support for 5-level paging

2024-02-29 Thread Laszlo Ersek
On 2/22/24 11:54, Gerd Hoffmann wrote: > Patch #1 + #2 fix MdeModulePkg/DxeIplPeim to not assert in case a > 5-level enabled build runs in 4-level paging mode. > > Patch #3 updates PlatformInitLib for 5-level paging support (update > PhysBits calculation). > > v4: > - drop OvmfPkg/ResetVecor

Re: [edk2-devel] The API in BaseCryptLib can't seed the pseudorandom number generator properly

2024-02-29 Thread eddie wang
Hi and many thanks to all of you, I'm not entirely sure if it's running in a XIP environment, but I think not. Our application executed on UEFI interactive shell and it was put in an USB device(as the FS0 showed in the screenshot). And here's another question as well, because I found that the drbg

Re: [edk2-devel] [edk2-redfish-client][PATCH 00/13] use Redfish HTTP protocol

2024-02-29 Thread Nickle Wang via groups.io
Hi Laszlo, Thanks for your reminder. I enable sendemail.thread now. Regards, Nickle > -Original Message- > From: Laszlo Ersek > Sent: Thursday, February 29, 2024 5:04 PM > To: devel@edk2.groups.io; Nickle Wang > Cc: Abner Chang ; Igor Kulchytskyy > Subject: Re: [edk2-devel]

Re: [edk2-devel] [edk2-redfish-client][PATCH 00/13] use Redfish HTTP protocol

2024-02-29 Thread Laszlo Ersek
Hi Nickle, On 2/29/24 09:52, Nickle Wang via groups.io wrote: > Redfish HTTP protocol is introduced to edk2 RedfishPkg. Update > RedfishClientPkg to use RedfishHttpLib. And remove the use of > RedfishHttpCacheLib. > > I also replace several functions from RedfishLib with the function >

[edk2-devel] [edk2-redfish-client][PATCH 13/13] RedfishClientPkg/MemoryCollectionDxe: ues RedfishHttpLib

2024-02-29 Thread Nickle Wang via groups.io
Use EDK2 RedfishHttpLib to replace RedfishHttpCacheLib and RedfishLib Signed-off-by: Nickle Wang Cc: Abner Chang Cc: Igor Kulchytskyy --- .../MemoryCollectionDxe/MemoryCollectionDxe.inf | 3 +-- .../MemoryCollectionDxe/MemoryCollectionDxe.c | 15 ++- 2 files changed, 3

[edk2-devel] [edk2-redfish-client][PATCH 12/13] RedfishClientPkg/MemoryDxe: ues RedfishHttpLib

2024-02-29 Thread Nickle Wang via groups.io
Use EDK2 RedfishHttpLib to replace RedfishHttpCacheLib and RedfishLib Signed-off-by: Nickle Wang Cc: Abner Chang Cc: Igor Kulchytskyy --- .../Features/Memory/V1_7_1/Dxe/MemoryDxe.inf | 3 +- .../Memory/V1_7_1/Common/MemoryCommon.c | 86 ++

[edk2-devel] [edk2-redfish-client][PATCH 11/13] RedfishClientPkg/ComputerSystemCollectionDxe: ues RedfishHttpLib

2024-02-29 Thread Nickle Wang via groups.io
Use EDK2 RedfishHttpLib to replace RedfishHttpCacheLib and RedfishLib Signed-off-by: Nickle Wang Cc: Abner Chang Cc: Igor Kulchytskyy --- .../ComputerSystemCollectionDxe.inf | 3 +-- .../ComputerSystemCollectionDxe.c | 15 ++- 2 files changed, 3

[edk2-devel] [edk2-redfish-client][PATCH 10/13] RedfishClientPkg/ComputerSystemDxe: ues RedfishHttpLib

2024-02-29 Thread Nickle Wang via groups.io
Use EDK2 RedfishHttpLib to replace RedfishHttpCacheLib and RedfishLib Signed-off-by: Nickle Wang Cc: Abner Chang Cc: Igor Kulchytskyy --- .../v1_13_0/Dxe/ComputerSystemDxe.inf | 3 +- .../v1_5_0/Dxe/ComputerSystemDxe.inf | 3 +- .../v1_13_0/Common/ComputerSystemCommon.c

[edk2-devel] [edk2-redfish-client][PATCH 08/13] RedfishClientPkg/BootOptionDxe: ues RedfishHttpLib

2024-02-29 Thread Nickle Wang via groups.io
Use EDK2 RedfishHttpLib to replace RedfishHttpCacheLib and RedfishLib Signed-off-by: Nickle Wang Cc: Abner Chang Cc: Igor Kulchytskyy --- .../BootOption/v1_0_4/Dxe/BootOptionDxe.inf | 5 +- .../v1_0_4/Common/BootOptionCommon.c | 45 ++

[edk2-devel] [edk2-redfish-client][PATCH 09/13] RedfishClientPkg/BootOptionCollectionDxe: ues RedfishHttpLib

2024-02-29 Thread Nickle Wang via groups.io
Use EDK2 RedfishHttpLib to replace RedfishHttpCacheLib and RedfishLib Signed-off-by: Nickle Wang Cc: Abner Chang Cc: Igor Kulchytskyy --- .../BootOptionCollectionDxe.inf | 5 ++-- .../BootOptionCollectionDxe.c | 26 --- 2 files changed, 7

[edk2-devel] [edk2-redfish-client][PATCH 07/13] RedfishClientPkg/BiosDxe: ues RedfishHttpLib

2024-02-29 Thread Nickle Wang via groups.io
Use EDK2 RedfishHttpLib to replace RedfishHttpCacheLib and RedfishLib Signed-off-by: Nickle Wang Cc: Abner Chang Cc: Igor Kulchytskyy --- .../Features/Bios/v1_0_9/Dxe/BiosDxe.inf | 3 +- .../Features/Bios/v1_0_9/Common/BiosCommon.c | 92 +++---

[edk2-devel] [edk2-redfish-client][PATCH 06/13] RedfishClientPkg/RedfishVersionLib: ues RedfishHttpLib

2024-02-29 Thread Nickle Wang via groups.io
Use EDK2 RedfishHttpLib to replace RedfishHttpCacheLib and RedfishLib Signed-off-by: Nickle Wang Cc: Abner Chang Cc: Igor Kulchytskyy --- .../RedfishVersionLib/RedfishVersionLib.inf | 3 +-- .../RedfishVersionLib/RedfishVersionLib.c | 24 +++ 2 files changed, 4

[edk2-devel] [edk2-redfish-client][PATCH 05/13] RedfishClientPkg/RedfishFeatureUtilityLib: ues RedfishHttpLib

2024-02-29 Thread Nickle Wang via groups.io
- Remove RedfishHttpCacheLib and use EDK2 RedfishHttpLib. - Remove RedfishLib. - Remove CreatePayloadToPostResource and CreatePayloadToPatchResource because we no longer need them. Signed-off-by: Nickle Wang Cc: Abner Chang Cc: Igor Kulchytskyy --- .../RedfishFeatureUtilityLib.inf

[edk2-devel] [edk2-redfish-client][PATCH 04/13] RedfishClientPkg/RedfishResourceConfigLib: ues RedfishHttpLib

2024-02-29 Thread Nickle Wang via groups.io
Remove RedfishHttpCacheLib and use EDK2 RedfishHttpLib. Signed-off-by: Nickle Wang Cc: Abner Chang Cc: Igor Kulchytskyy --- .../EdkIIRedfishResourceConfigLib.inf | 2 +- .../Include/Library/EdkIIRedfishResourceConfigLib.h | 4 ++--

[edk2-devel] [edk2-redfish-client][PATCH 03/13] RedfishClientPkg: ues RedfishHttpLib

2024-02-29 Thread Nickle Wang via groups.io
Use EDK2 RedfishHttpLib to replace RedfishHttpCacheLib and RedfishLib Signed-off-by: Nickle Wang Cc: Abner Chang Cc: Igor Kulchytskyy --- RedfishClientPkg/Include/RedfishCollectionCommon.h | 3 +-- RedfishClientPkg/Include/RedfishResourceCommon.h | 3 +-- 2 files changed, 2 insertions(+), 4

[edk2-devel] [edk2-redfish-client][PATCH 02/13] RedfishClientPkg: remove RedfishHttpCacheLib

2024-02-29 Thread Nickle Wang via groups.io
Remove RedfishHttpCacheLib and use EDK2 RedfishHttpLib. Signed-off-by: Nickle Wang Cc: Abner Chang Cc: Igor Kulchytskyy --- RedfishClientPkg/RedfishClientPkg.dec | 1 - RedfishClientPkg/RedfishClientLibs.dsc.inc| 2 +- RedfishClientPkg/RedfishClientPkg.dsc | 1 -

[edk2-devel] [edk2-redfish-client][PATCH 01/13] RedfishClientPkg/.github: do not run uncrustify to deleted file.

2024-02-29 Thread Nickle Wang via groups.io
Check to see if file exists or not before running uncrustify. The file in change list may be a deleted file. Signed-off-by: Nickle Wang Cc: Abner Chang Cc: Igor Kulchytskyy --- .github/workflows/uncrustify-check.sh | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff

[edk2-devel] [edk2-redfish-client][PATCH 00/13] use Redfish HTTP protocol

2024-02-29 Thread Nickle Wang via groups.io
Redfish HTTP protocol is introduced to edk2 RedfishPkg. Update RedfishClientPkg to use RedfishHttpLib. And remove the use of RedfishHttpCacheLib. I also replace several functions from RedfishLib with the function provided in RedfishHttpLib. In this way, there is no dependency on RedfishLib

Re: [edk2-devel] [PATCH v2 1/1] UefiCpuPkg/MpInitLib: add struct MP_HAND_OFF_CONFIG

2024-02-29 Thread Laszlo Ersek
On 2/28/24 12:48, Gerd Hoffmann wrote: > Move the WaitLoopExecutionMode and StartupSignalValue fields to a > separate HOB with the new struct. > > WaitLoopExecutionMode and StartupSignalValue are independent of > processor index ranges; they are global to MpInitLib (i.e., the entire > system).

Re: [edk2-devel] CI: GCC13 and lcov problem

2024-02-29 Thread Laszlo Ersek
On 2/28/24 14:59, Oliver Steffen wrote: > Hi, > > I am working on switching the Linux CI jobs over to the Fedora 39 image > which comes with gcc 13. > > Unfortunately, some jobs fail due to some error related to lcov / > geninfo, see below. > > Does anybody know from the top of the head what