Re: [edk2-devel] [Patch V3 2/6] UefiCpuPkg: Duplicate AsmRelocateApLoopAmd.

2023-02-23 Thread Gerd Hoffmann
On Fri, Feb 24, 2023 at 02:05:31AM +0800, Yuanhao Xie wrote: > Duplicate AsmRelocateApLoopAmd for non-SEV-ES enabled processors. > > Cc: Guo Dong > Cc: Ray Ni > Cc: Sean Rhodes > Cc: James Lu > Cc: Gua Guo > Signed-off-by: Yuanhao Xie > Test-by: Yuanhao Xie > --- >

[edk2-devel] [edk2-staging][PATCH 2/2] CryptoPkg: fix wrong name in tls 1.2 cipher suite

2023-02-23 Thread Li, Yi
Keep cipher name consistent with openssl. Cc: Zhichao Gao Cc: Ming Tan Cc: Heng Luo Signed-off-by: Yi Li --- CryptoPkg/Library/TlsLib/TlsConfig.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CryptoPkg/Library/TlsLib/TlsConfig.c

[edk2-devel] [edk2-staging][PATCH 1/2] CryptoPkg: update openssl to 1.1.1t

2023-02-23 Thread Li, Yi
Pick up bugfixes from the latest openssl release. Cc: Zhichao Gao Cc: Ming Tan Cc: Heng Luo Signed-off-by: Yi Li --- CryptoPkg/Library/OpensslLib/OpensslLib.inf | 1 + CryptoPkg/Library/OpensslLib/openssl| 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git

[edk2-devel] [edk2-staging][PATCH 0/2] CryptoPkg: openssl submodule update

2023-02-23 Thread Li, Yi
Patch 1: update openssl to 1.1.1t Patch 2: fix wrong name in tls 1.2 cipher suite Cc: Zhichao Gao Cc: Ming Tan Cc: Heng Luo Signed-off-by: Yi Li Yi Li (2): CryptoPkg: update openssl to 1.1.1t CryptoPkg: fix wrong name in tls 1.2 cipher suite CryptoPkg/Library/OpensslLib/OpensslLib.inf

Re: [edk2-devel] [edk2-platforms][PATCH 2/2] JadePkg: ACPI: Support ACPI tables for Ampere Altra Max

2023-02-23 Thread Nhi Pham via groups.io
Hi Leif, On 2/15/2023 7:03 PM, Leif Lindholm via groups.io wrote: On Fri, Jan 13, 2023 at 11:25:17 +0700, Nhi Pham via groups.io wrote: From: Tinh Nguyen This adds ACPI DSDT tables and updates ACPI MADT table to support Ampere Altra Max processor. Signed-off-by: Nhi Pham Ideally, I would

Re: [edk2-devel] [edk2-platforms][PATCH 1/2] Ampere: PCIe: Add support for Ampere Altra Max

2023-02-23 Thread Nhi Pham via groups.io
Hi Leif, Thanks for your reviewing. Most of your feedback is valid. I will fix them. There is a comment that need your more explanation. Please see the inline reply for more details. On 2/15/2023 6:59 PM, Leif Lindholm wrote: On Fri, Jan 13, 2023 at 11:25:16 +0700, Nhi Pham wrote: From: Vu

Re: [edk2-devel] [Patch V3 0/6] Put APs in 64 bit mode before handoff to OS.

2023-02-23 Thread Yuanhao Xie
Hi Ray, The first patch(v2) are separated into 2 patches(v3). Regards, Yuanhao -Original Message- From: Ni, Ray Sent: Friday, February 24, 2023 8:27 AM To: devel@edk2.groups.io; Xie, Yuanhao Subject: RE: [edk2-devel] [Patch V3 0/6] Put APs in 64 bit mode before handoff to OS.

Re: [edk2-devel] [PATCH v2 0/1] MdeModulePkg: Improve formatting of DEBUG messages in UsbBusDxe

2023-02-23 Thread Rebecca Cran
I forgot to mention my personal PR: https://github.com/tianocore/edk2/pull/4068 On 2/23/23 5:18 PM, Rebecca Cran wrote: Changes from v1 to v2: Changed other DEBUG messages to add a hyphen between the message and the EFI_STATUS code, since when I was seeing the USB messages when running the

Re: [edk2-devel] [PATCH 1/1] Ext4Pkg: Move unicode collation initialization to Start()

2023-02-23 Thread Pedro Falcato
On Tue, Feb 21, 2023 at 7:37 PM Marvin Häuser wrote: > > > On 21. Feb 2023, at 20:25, Pedro Falcato wrote: > > Marvin, > > Do you want me to spin up a quick v2 without the > Ext4IsCollationInitialized? Just doing the check internally in > Ext4InitialiseUnicodeCollation. > > > It'd be my

Re: [edk2-devel] [Patch V3 0/6] Put APs in 64 bit mode before handoff to OS.

2023-02-23 Thread Ni, Ray
Yuanhao, What changes have been made in V3 comparing against V2? > -Original Message- > From: devel@edk2.groups.io On Behalf Of > Yuanhao Xie > Sent: Friday, February 24, 2023 2:05 AM > To: devel@edk2.groups.io > Subject: [edk2-devel] [Patch V3 0/6] Put APs in 64 bit mode before handoff

[edk2-devel] [PATCH v2 1/1] MdeModulePkg: Improve formatting of DEBUG messages in UsbBusDxe

2023-02-23 Thread Rebecca Cran
Improve the formatting of DEBUG messages in UsbBusDxe by adding a hyphen to separate the EFI_STATUS code. Signed-off-by: Rebecca Cran --- MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c| 12 ++-- MdeModulePkg/Bus/Usb/UsbBusDxe/UsbDesc.c | 6 +++---

[edk2-devel] [PATCH v2 0/1] MdeModulePkg: Improve formatting of DEBUG messages in UsbBusDxe

2023-02-23 Thread Rebecca Cran
Changes from v1 to v2: Changed other DEBUG messages to add a hyphen between the message and the EFI_STATUS code, since when I was seeing the USB messages when running the UsbNetworkPkg code, I found it a bit confusing. Rebecca Cran (1): MdeModulePkg: Improve formatting of DEBUG messages in

[edk2-devel] [PATCH 7/7] [PATCH v2] UefiCpuPkg: BaseRiscV64CpuExceptionHandlerLib: clean up exception handling

2023-02-23 Thread Andrei Warkentin
RegisterCpuInterruptHandler did not allow setting exception handlers for anything beyond the timer IRQ. Beyond that, it didn't meet the spec around handling of inputs. RiscVSupervisorModeTrapHandler now will invoke set handlers for both exceptions and interrupts. Two arrays of handlers are

[edk2-devel] [PATCH 6/7] [PATCH v2] UefiCpuPkg: CpuTimerDxeRiscV64: fix tick duration accounting

2023-02-23 Thread Andrei Warkentin
The TimerDxe implementation doesn't account for the physical time passed due to timer handler execution or (perhaps even more importantly) time spent with interrupts masked. Other implementations (e.g. like the Arm one) do. If the timer tick is always incremented at a fixed rate, then you can

[edk2-devel] [PATCH 5/7] MdeModulePkg: Dxe: add RISCV64 to mMachineTypeInfo

2023-02-23 Thread Andrei Warkentin
This fixes messages like: "Image type AARCH64 can't be loaded on UEFI system" Cc: Daniel Schaefer Cc: Liming Gao Cc: Jian J Wang Reviewed-by: Sunil V L Signed-off-by: Andrei Warkentin --- MdeModulePkg/Core/Dxe/Image/Image.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[edk2-devel] [PATCH 4/7] MdePkg: BaseCpuLib: Fix RISCV CpuSleep symbol name.

2023-02-23 Thread Andrei Warkentin
CpuSleep, not _CpuSleep. Cc: Daniel Schaefer Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Reviewed-by: Sunil V L Signed-off-by: Andrei Warkentin --- MdePkg/Library/BaseCpuLib/RiscV/Cpu.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[edk2-devel] [PATCH 3/7] MdePkg: BaseLib: don't log in RISCV InternalSwitchStack

2023-02-23 Thread Andrei Warkentin
InternalSwitchStack may be called with a TPL high enough for a DebugLib implementation to assert. Other arch implementations don't log either. Cc: Daniel Schaefer Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Reviewed-by: Sunil V L Signed-off-by: Andrei Warkentin ---

[edk2-devel] [PATCH 2/7] MdePkg: BasePeCoffLib: Allow AArch64 and x64 images in ImageFormatSupported

2023-02-23 Thread Andrei Warkentin
ARM64 and X64 may allow such foreign images to be used when driver implementing EDKII_PECOFF_IMAGE_EMULATOR_PROTOCOL is present. Cc: Sunil V L Cc: Daniel Schaefer Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Signed-off-by: Andrei Warkentin ---

[edk2-devel] [PATCH 1/7] OvmfPkg: RiscVVirt: add SATA support

2023-02-23 Thread Andrei Warkentin
Tested with a PCIe pass-thru'd AHCI controller. Cc: Sunil V L Cc: Jiewen Yao Cc: Ard Biesheuvel Signed-off-by: Andrei Warkentin --- OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc | 7 +++ OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf | 7 +++ 2 files changed, 14 insertions(+) diff --git

[edk2-devel] [PATCH 0/7] Assorted fixes to core RISC-V and RiscVVirt

2023-02-23 Thread Andrei Warkentin
Dear all, Please find the following patches for your reviewing pleasure. Sunil suggested I put these into a single patch set, instead of sending out these separately. This patch set is also available at https://github.com/andreiw/edk2-rv-wip Andrei Warkentin (7): OvmfPkg: RiscVVirt: add SATA

Re: [edk2-devel] [PATCH 1/1] MdeModulePkg: Improve formatting of warning DEBUG in UsbSelectConfig

2023-02-23 Thread Rebecca Cran
Thanks, I think that's a good format. I'll send out a v2 patch with more of lines updated. -- Rebecca Cran On 2/22/23 6:39 PM, Wu, Hao A wrote: If you think the format modification is valuable, please at least keep it aligned within the driver level. A search of the keyword '%r' in

[edk2-devel] [Patch V3 6/6] UefiCpuPkg: Put APs in 64 bit mode before handoff to OS.

2023-02-23 Thread Yuanhao Xie
Only keep 4GB limitation of memory allocation for the case APs still need to be transferred to 32-bit mode before OS. Remove the unused arguments of AsmRelocateApLoopStart, updated the stack offset. Create PageTable for the allocated reserved memory. Cc: Guo Dong Cc: Ray Ni Cc: Sean Rhodes

[edk2-devel] [Patch V3 3/6] UefiCpuPkg: Contiguous memory allocation and code clean-up.

2023-02-23 Thread Yuanhao Xie
This patch includes the code refactoring to eliminate the duplication, non-descriptive variable, etc. The memory is calculated taking into account the size difference of RelocateApLoopFunc under different cases. Allocate the memory for stacks and APs loop at contiguous address. Cc: Guo Dong

[edk2-devel] [Patch V3 5/6] UefiPayloadPkg: Add CpuPageTableLib required by MpInitLib.

2023-02-23 Thread Yuanhao Xie
Add CpuPageTableLib required by MpInitLib in UefiPayloadPkg. Cc: Guo Dong Cc: Ray Ni Cc: Sean Rhodes Cc: James Lu Cc: Gua Guo Signed-off-by: Yuanhao Xie --- UefiPayloadPkg/UefiPayloadPkg.dsc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[edk2-devel] [Patch V3 4/6] OvmfPkg: Add CpuPageTableLib required by MpInitLib.

2023-02-23 Thread Yuanhao Xie
Add CpuPageTableLib required by MpInitLib in OvmfPkg. Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Jordan Justen Cc: Gerd Hoffmann Signed-off-by: Yuanhao Xie --- OvmfPkg/AmdSev/AmdSevX64.dsc | 3 ++- OvmfPkg/CloudHv/CloudHvX64.dsc | 3 ++- OvmfPkg/IntelTdx/IntelTdxX64.dsc | 4 +++-

[edk2-devel] [Patch V3 2/6] UefiCpuPkg: Duplicate AsmRelocateApLoopAmd.

2023-02-23 Thread Yuanhao Xie
Duplicate AsmRelocateApLoopAmd for non-SEV-ES enabled processors. Cc: Guo Dong Cc: Ray Ni Cc: Sean Rhodes Cc: James Lu Cc: Gua Guo Signed-off-by: Yuanhao Xie Test-by: Yuanhao Xie --- UefiCpuPkg/Library/MpInitLib/DxeMpLib.c | 68

[edk2-devel] [Patch V3 1/6] UefiCpuPkg: Move AsmRelocateApLoop to AmdSev.nasm.

2023-02-23 Thread Yuanhao Xie
AMD processors with SEV-ES enabled follow the original logic, for the other cases the APs will be put in 64-bit mode before handing off the boot process to the OS. In order to do so, in this patch, AsmRelocateApLoop is moved to AmdSev.nasm. Cc: Guo Dong Cc: Ray Ni Cc: Sean Rhodes Cc: James Lu

[edk2-devel] [Patch V3 0/6] Put APs in 64 bit mode before handoff to OS.

2023-02-23 Thread Yuanhao Xie
The purpose of this patch series is to put the AP in 64-bit mode before handing off the boot process to the OS. To do this, duplicate relocateApLoop for processors with SEV-ES, allocate contiguous memory, then create page tables and keep AP in 64-bit mode. Ref:

Re: [edk2-devel] [RESEND] [PATCH v2 2/2] OvmfPkg/ResetVector: Exclude SEV launch secrets page from pre-validation

2023-02-23 Thread Dov Murik
On 23/02/2023 16:58, Dov Murik wrote: > > > On 21/02/2023 11:38, Gerd Hoffmann wrote: >> On Mon, Feb 20, 2023 at 08:44:23AM -0600, Tom Lendacky wrote: >>> On 2/20/23 02:49, Dov Murik wrote: In order to allow the VMM (such as QEMU) to add a page with hashes of kernel/initrd/cmdline

Re: [edk2-devel] [RESEND] [PATCH v2 2/2] OvmfPkg/ResetVector: Exclude SEV launch secrets page from pre-validation

2023-02-23 Thread Dov Murik
On 21/02/2023 11:38, Gerd Hoffmann wrote: > On Mon, Feb 20, 2023 at 08:44:23AM -0600, Tom Lendacky wrote: >> On 2/20/23 02:49, Dov Murik wrote: >>> In order to allow the VMM (such as QEMU) to add a page with hashes of >>> kernel/initrd/cmdline for measured direct boot on SNP, this page must >>>

Re: [edk2-devel] [Patch V2 2/5] UefiCpuPkg: Contiguous memory allocation and code clean-up.

2023-02-23 Thread Ard Biesheuvel
On Thu, 23 Feb 2023 at 06:53, Yuanhao Xie wrote: > > Hi, > > Set "Address= BASE_4GB - 1" first is to ensure the maximum address value > is 4GB, since APs will be switched to 32 bit before OS, I mean in the > original implementation. > By the way, in patch 5, only SEV-ES processor keep this