Re: [edk2-devel] [PATCH v1] Update Arch. MSR and CPUID to follow latest SDM.

2023-01-12 Thread Ni, Ray
Can you separate to 2 patches? > -Original Message- > From: Wang, William2 > Sent: Friday, January 13, 2023 3:03 PM > To: devel@edk2.groups.io > Cc: Wang, William2 ; Kinney, Michael D > ; Gao, Liming > ; Ni, Ray ; Kuo, Donald > ; Kumar, Chandana C > > Subject: [PATCH v1] Update Arch.

Re: [edk2-devel] [PATCH v2] UefiCpuPkg: Support SMM Relocated SmBase handling

2023-01-12 Thread Ni, Ray
Jiaxin, I know that you will submit v3 patch set to address Laszlo's comments. Let me put my review comments on code logic here so you could take them into account also. 1. I suggest we describe the HOB structure in this header file in file header comments. For example: The default SMBASE for

Re: [edk2-devel] [PATCH v9 0/4] Add safe unaccepted memory behavior

2023-01-12 Thread Yao, Jiewen
This is API between BIOS and OS. I would like to see sign-off from OS side at least, before we can merge to EDKII main. > -Original Message- > From: Gerd Hoffmann > Sent: Friday, January 13, 2023 3:18 PM > To: devel@edk2.groups.io; Yao, Jiewen > Cc: Dionna Glaze ; Ard Biescheuvel >

Re: [edk2-devel] [PATCH v2] UefiCpuPkg: Support SMM Relocated SmBase handling

2023-01-12 Thread Wu, Jiaxin
Drop this patch and refine the format according Laszlo's comment. Please help review the series patches @ https://edk2.groups.io/g/devel/message/98446 https://edk2.groups.io/g/devel/message/98447 https://edk2.groups.io/g/devel/message/98448 https://edk2.groups.io/g/devel/message/98449

Re: [edk2-devel] [PATCH v9 0/4] Add safe unaccepted memory behavior

2023-01-12 Thread Gerd Hoffmann
On Fri, Jan 13, 2023 at 03:46:34AM +, Yao, Jiewen wrote: > Hi Dionna > I think I understand your intention. > I believe we need OS side and UEFI standard sign-off for this > *BZ3987_MEMORY_ACCEPTANCE_PROTOCOL*, because OS is the consumer, right? > If so, I suggest you maintain the work in a

[edk2-devel] [PATCH v1 4/4] OvmfPkg/SmmCpuFeaturesLib: Skip to configure SMBASE

2023-01-12 Thread Wu, Jiaxin
This patch is to aviod configure SMBASE if SmBase relocation has been done. If gSmmBaseHobGuid found, means SmBase info has been relocated and recorded in the SmBase array. No need to do the relocation in SmmCpuFeaturesInitializeProcessor(). Cc: Eric Dong Cc: Ray Ni Cc: Zeng Star Cc: Laszlo

[edk2-devel] [PATCH v1 3/4] UefiCpuPkg/SmmCpuFeaturesLib: Skip to configure SMBASE

2023-01-12 Thread Wu, Jiaxin
This patch is to aviod configure SMBASE if SmBase relocation has been done. If gSmmBaseHobGuid found, means SmBase info has been relocated and recorded in the SmBase array. No need to do the relocation in SmmCpuFeaturesInitializeProcessor(). Cc: Eric Dong Cc: Ray Ni Cc: Zeng Star Cc: Laszlo

[edk2-devel] [PATCH v1 2/4] UefiCpuPkg/PiSmmCpuDxeSmm: Consume SMM Base Hob for SmBase info

2023-01-12 Thread Wu, Jiaxin
SMM CPU driver will retrieve the SMBASE addresses from SMM Base Hob and installs the SMI handler at [SMBASE+8000h] for each processor instead of relocating SMM Base addresses from SMRAM again. With SMM Base Hob, SMM CPU driver does not need the RSM instruction to reload the SMBASE register with

[edk2-devel] [PATCH v1 1/4] UefiCpuPkg/SmmBaseHob.h: Add SMM Base HOB Data

2023-01-12 Thread Wu, Jiaxin
The Smm Base HOB is used to store the relocated SmBase in array for each Processors. If gSmmBaseHobGuid produced, indicate SmBase for each Processors have been relocated. The SmBase address in hob can be guaranteed the SMRAM state save areas for all processors do not overlap. Cc: Eric Dong Cc:

[edk2-devel] [PATCH v1 0/4] Support SMM Relocated SmBase handling

2023-01-12 Thread Wu, Jiaxin
Below serial patches are to support the SMM Relocated SmBase handling. To achieve, new hob interface is procuded, and will be consumed by SMM CPU driver & SmmCpuFeaturesLib to do SmBase initialization: The Smm Base HOB is used to store the relocated SmBase in array for each Processors. If

Re: [edk2-devel] [PATCH edk2-platforms 1/2] QemuOpenBoardPkg: Redo PCI bus initialization

2023-01-12 Thread Gerd Hoffmann
> diff --git a/Platform/Qemu/QemuOpenBoardPkg/PlatformInitPei/Memory.c > b/Platform/Qemu/QemuOpenBoardPkg/PlatformInitPei/Memory.c > index 21705256191b..4f312c36016e 100644 > --- a/Platform/Qemu/QemuOpenBoardPkg/PlatformInitPei/Memory.c > +++

Re: [edk2-devel] [PATCH 1/3] MdeModulePkg/Include: Add IpmiCommandLib header file

2023-01-12 Thread Chang, Abner via groups.io
[AMD Official Use Only - General] Thanks for catching these typos in patches. V2 is sent to address them. Abner > -Original Message- > From: Oram, Isaac W > Sent: Friday, January 13, 2023 8:11 AM > To: devel@edk2.groups.io; Chang, Abner > Cc: Wang, Jian J ; Gao, Liming > ; Nickle Wang

Re: [edk2-devel] [PATCH v2] OvmfPkg/PlatformInitLib: catch QEMU's CPU hotplug reg block regression

2023-01-12 Thread Gerd Hoffmann
Hi, > - QEMU can be configured with other compat properties on the command > line so that "CPU hotplug with SMI" and "CPU hot-unplug with SMI" *not* > be offered to the firmware. Then QEMU will reject hotplug attempts, and > the SMM hotplug code in edk2 will not be triggered by the (virtual) >

[edk2-devel] [PATCH V2 3/3] MdeModulePkg: Add IpmiCommandLib

2023-01-12 Thread Chang, Abner via groups.io
From: Abner Chang Add IpmiCommandLib to MdeModulePkg DEC/DSC files. Signed-off-by: Abner Chang Cc: Jian J Wang Cc: Liming Gao Cc: Nickle Wang Cc: Igor Kulchytskyy Cc: Isaac Oram Cc: Nate DeSimone Reviewed-by: Isaac Oram --- MdeModulePkg/MdeModulePkg.dec | 5 +

[edk2-devel] [PATCH V2 1/3] MdeModulePkg/Include: Add IpmiCommandLib header file

2023-01-12 Thread Chang, Abner via groups.io
From: Abner Chang Add IpmiCommandLib to MdeModulePkg. This header file is copied from edk2-platforms/Features/Intel/OutOfBandManagement/ IpmiFeaturePkg\Include\Library. Having this header file in edk2 to avoid the dependence of edk2 module with edk2-platfrom. The NULL instance of IpmiCommandLib

[edk2-devel] [PATCH V2 2/3] MdeModulePkg/IpmiCommandLib: Add NULL instance library

2023-01-12 Thread Chang, Abner via groups.io
From: Abner Chang The NULL instance of IpmiCommandLib library under MdeModulePkg as the default IpmiCommandLib instance used by the modules under edk2. Signed-off-by: Abner Chang Cc: Jian J Wang Cc: Liming Gao Cc: Nickle Wang Cc: Igor Kulchytskyy Cc: Isaac Oram Cc: Nate DeSimone

[edk2-devel] [PATCH V2 0/3] Add NULL IpmiCommandLib instance

2023-01-12 Thread Chang, Abner via groups.io
From: Abner Chang BZ# 4231 In V2: Address the typos. This patch adds a NULL instance of IpmiCommandLib to remove the dependence between edk2 and edk2-platform packages. Signed-off-by: Abner Chang Cc: Jian J Wang Cc: Liming Gao Cc: Nickle Wang Cc: Igor Kulchytskyy Cc: Isaac Oram Cc: Nate

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

2023-01-12 Thread Nhi Pham via groups.io
From: Vu Nguyen This updates the PCIe modules to add support for Ampere Altra Max processor which features 128 PCIe Gen4 lanes (distributed across eight x16 RCAs) using 32 controllers. Signed-off-by: Nhi Pham --- .../AmpereAltraPkg/Include/NVParamDef.h | 64 ++--

[edk2-devel] [edk2-platforms][PATCH 0/2] Support Ampere Altra Max processor

2023-01-12 Thread Nhi Pham via groups.io
This patchset adds support for Ampere Altra Max processor. Tinh Nguyen (1): JadePkg: ACPI: Support ACPI tables for Ampere Altra Max Vu Nguyen (1): Ampere: PCIe: Add support for Ampere Altra Max .../AmpereAltraPkg/AmpereAltraPkg.dsc.inc |6 +- Platform/Ampere/JadePkg/Jade.dsc

[edk2-devel] [edk2-platforms][PATCH 1/1] AmpereAltraPkg: Update ArmPlatformLib to work with changed ARM_CORE_INFO

2023-01-12 Thread Nhi Pham via groups.io
From: Tinh Nguyen Since the commit 103fa647d159e3d76be2634d2653c2d215dd0d46 instead ("ArmPkg: Replace CoreId and ClusterId with Mpidr in ARM_CORE_INFO struct") has updated the ARM_CORE_INFO structure so the MPIDR is now a single field instead of separate cluster/core fields. This patch updates

Re: [edk2-devel] [PATCH v9 0/4] Add safe unaccepted memory behavior

2023-01-12 Thread Yao, Jiewen
Hi Dionna I think I understand your intention. I believe we need OS side and UEFI standard sign-off for this *BZ3987_MEMORY_ACCEPTANCE_PROTOCOL*, because OS is the consumer, right? If so, I suggest you maintain the work in a edk2-stage area for https://github.com/tianocore/edk2-staging. EDKII

[edk2-devel] [edk2-platforms][PATCH V4 8/8] Platform/Loongson: Enable zero address protection.

2023-01-12 Thread xianglai
Set the 0 page property to unreadable, non-writable, non-executable Cc: Ard Biesheuvel Cc: Bibo Mao Cc: Chao Li Cc: Leif Lindholm Cc: Liming Gao Cc: Michael D Kinney Signed-off-by: xianglai li --- .../LoongArchQemuPkg/Library/MmuLib/MmuBaseLibPei.inf | 2 ++

[edk2-devel] [edk2-platforms][PATCH V4 7/8] Platform/Loongson: Optimize the huge page and page entry conversion.

2023-01-12 Thread xianglai
Optimize the process of converting huge pages to page table entries. Cc: Ard Biesheuvel Cc: Bibo Mao Cc: Chao Li Cc: Leif Lindholm Cc: Liming Gao Cc: Michael D Kinney Signed-off-by: xianglai li --- .../Library/MmuLib/MmuLibCore.c | 109 +-

[edk2-devel] [edk2-platforms][PATCH V4 6/8] Platform/Loongson: Optimize page table entry null determination.

2023-01-12 Thread xianglai
Modify the null judgment condition of page table entries. Cc: Ard Biesheuvel Cc: Bibo Mao Cc: Chao Li Cc: Leif Lindholm Cc: Liming Gao Cc: Michael D Kinney Signed-off-by: xianglai li --- Platform/Loongson/LoongArchQemuPkg/Library/MmuLib/page.h | 2 +- 1 file changed, 1 insertion(+), 1

[edk2-devel] [edk2-platforms][PATCH V4 5/8] Platform/Loongson: Modify the page table entry access priority.

2023-01-12 Thread xianglai
Modify the page table entry access priority When the Page table properties are set. Cc: Ard Biesheuvel Cc: Bibo Mao Cc: Chao Li Cc: Leif Lindholm Cc: Liming Gao Cc: Michael D Kinney Signed-off-by: xianglai li --- Platform/Loongson/LoongArchQemuPkg/Library/MmuLib/MmuLibCore.c | 2 +- 1

[edk2-devel] [edk2-platforms][PATCH V4 4/8] Platform/Loongson: Support pflash for loongarch.

2023-01-12 Thread xianglai
Support pflash for loongarch. Cc: Ard Biesheuvel Cc: Bibo Mao Cc: Chao Li Cc: Leif Lindholm Cc: Liming Gao Cc: Michael D Kinney Signed-off-by: xianglai li --- .../Loongson/LoongArchQemuPkg/Loongson.dsc| 15 ++--- .../Loongson/LoongArchQemuPkg/Loongson.fdf| 3 +-

[edk2-devel] [edk2-platforms][PATCH V4 3/8] Platform/Loongson: Add pflash driver.

2023-01-12 Thread xianglai
Add pflash driver for loongarch. Cc: Ard Biesheuvel Cc: Bibo Mao Cc: Chao Li Cc: Leif Lindholm Cc: Liming Gao Cc: Michael D Kinney Signed-off-by: xianglai li --- .../Library/NorFlashQemuLib/NorFlashQemuLib.c | 141 ++ .../NorFlashQemuLib/NorFlashQemuLib.inf | 43

[edk2-devel] [edk2-platforms][PATCH V4 2/8] Platform/Loongson: Add nvme device driver for loongarch.

2023-01-12 Thread xianglai
Add nvme device driver support loongarch qemu virt machine. Cc: Ard Biesheuvel Cc: Bibo Mao Cc: Chao Li Cc: Leif Lindholm Cc: Liming Gao Cc: Michael D Kinney Signed-off-by: xianglai li --- Platform/Loongson/LoongArchQemuPkg/Loongson.dsc | 5 +

[edk2-devel] [edk2-platforms][PATCH V4 1/8] Platform/Loongson: Add bootmode support.

2023-01-12 Thread xianglai
Add bootmode support in PEI phase. Cc: Ard Biesheuvel Cc: Bibo Mao Cc: Chao Li Cc: Leif Lindholm Cc: Liming Gao Cc: Michael D Kinney Signed-off-by: xianglai li --- Platform/Loongson/LoongArchQemuPkg/PlatformPei/Platform.c | 5 + 1 file changed, 5 insertions(+) diff --git

[edk2-devel] [edk2-platforms][PATCH V4 0/8] Loongarch add flash device.

2023-01-12 Thread xianglai
This is a patch series that contains: 1.Loongarch add flash device driver. 2.Loongarch add nvme device driver. 3.Optimize the mmu lib of loongarch. 4.Enable zero address protection. v4 changes: -Modify the commit messgae of patch1 and patch2. v3 changes: - Split flash driver patch. v2 changes:

Re: [edk2-devel] [PATCH v2] UefiCpuPkg: Support SMM Relocated SmBase handling

2023-01-12 Thread Wu, Jiaxin
> >> v1: > >> - Thread: https://edk2.groups.io/g/devel/message/97748 > >> > >> Change-Id: Iec7bf25166bfeefb44a202285465a35b5debbce4 > > > > (1) Please don't include this in upstream patches. > > I will resubmit the series patches according your below comments. > >> Cc: Eric Dong > >> Cc: Ray

回复: [edk2-devel] 回复: [edk2-devel] 回复: 回复: [edk2-devel] 回复: [edk2-devel] 回复: [edk2-devel] FW: [PATCH] ShellPkg: Displaying SMBIOS Type38 fields in formatted manner

2023-01-12 Thread gaoliming via groups.io
Prakash: Your update looks good. I will help merge it. Thanks Liming 发件人: devel@edk2.groups.io 代表 Prakash K via groups.io 发送时间: 2023年1月10日 12:35 收件人: Prakash K ; devel@edk2.groups.io 主题: Re: [edk2-devel] 回复: [edk2-devel] 回复: 回复: [edk2-devel] 回复: [edk2-devel] 回复: [edk2-devel] FW:

[edk2-devel] [edk2-platforms][PATCH V3 8/8] Platform/Loongson: Enable zero address protection.

2023-01-12 Thread xianglai
Set the 0 page property to unreadable, non-writable, non-executable Cc: Ard Biesheuvel Cc: Bibo Mao Cc: Chao Li Cc: Leif Lindholm Cc: Liming Gao Cc: Michael D Kinney Signed-off-by: xianglai li --- .../LoongArchQemuPkg/Library/MmuLib/MmuBaseLibPei.inf | 2 ++

[edk2-devel] [edk2-platforms][PATCH V3 7/8] Platform/Loongson: Optimize the huge page and page entry conversion.

2023-01-12 Thread xianglai
Optimize the process of converting huge pages to page table entries. Cc: Ard Biesheuvel Cc: Bibo Mao Cc: Chao Li Cc: Leif Lindholm Cc: Liming Gao Cc: Michael D Kinney Signed-off-by: xianglai li --- .../Library/MmuLib/MmuLibCore.c | 109 +-

[edk2-devel] [edk2-platforms][PATCH V3 6/8] Platform/Loongson: Optimize page table entry null determination.

2023-01-12 Thread xianglai
Modify the null judgment condition of page table entries. Cc: Ard Biesheuvel Cc: Bibo Mao Cc: Chao Li Cc: Leif Lindholm Cc: Liming Gao Cc: Michael D Kinney Signed-off-by: xianglai li --- Platform/Loongson/LoongArchQemuPkg/Library/MmuLib/page.h | 2 +- 1 file changed, 1 insertion(+), 1

[edk2-devel] [edk2-platforms][PATCH V3 5/8] Platform/Loongson: Modify the page table entry access priority.

2023-01-12 Thread xianglai
Modify the page table entry access priority When the Page table properties are set. Cc: Ard Biesheuvel Cc: Bibo Mao Cc: Chao Li Cc: Leif Lindholm Cc: Liming Gao Cc: Michael D Kinney Signed-off-by: xianglai li --- Platform/Loongson/LoongArchQemuPkg/Library/MmuLib/MmuLibCore.c | 2 +- 1

[edk2-devel] [edk2-platforms][PATCH V3 4/8] Platform/Loongson: Support pflash for loongarch.

2023-01-12 Thread xianglai
support pflash for loongarch. Cc: Ard Biesheuvel Cc: Bibo Mao Cc: Chao Li Cc: Leif Lindholm Cc: Liming Gao Cc: Michael D Kinney Signed-off-by: xianglai li --- .../Loongson/LoongArchQemuPkg/Loongson.dsc| 15 ++--- .../Loongson/LoongArchQemuPkg/Loongson.fdf| 3 +-

[edk2-devel] [edk2-platforms][PATCH V3 3/8] Platform/Loongson: Add pflash driver.

2023-01-12 Thread xianglai
Add pflash driver for loongarch. Cc: Ard Biesheuvel Cc: Bibo Mao Cc: Chao Li Cc: Leif Lindholm Cc: Liming Gao Cc: Michael D Kinney Signed-off-by: xianglai li --- .../Library/NorFlashQemuLib/NorFlashQemuLib.c | 141 ++ .../NorFlashQemuLib/NorFlashQemuLib.inf | 43

[edk2-devel] [edk2-platforms][PATCH V3 2/8] Platform/Loongson:add nvme device driver for loongarch.

2023-01-12 Thread xianglai
add nvme device driver support loongarch qemu virt machine. Cc: Ard Biesheuvel Cc: Bibo Mao Cc: Chao Li Cc: Leif Lindholm Cc: Liming Gao Cc: Michael D Kinney Signed-off-by: Bibo Mao Signed-off-by: xianglai li --- Platform/Loongson/LoongArchQemuPkg/Loongson.dsc | 5 +

[edk2-devel] [edk2-platforms][PATCH V3 1/8] Platform/Loongson: add bootmode support.

2023-01-12 Thread xianglai
add bootmode support in PEI phase. Cc: Ard Biesheuvel Cc: Bibo Mao Cc: Chao Li Cc: Leif Lindholm Cc: Liming Gao Cc: Michael D Kinney Signed-off-by: xianglai li --- Platform/Loongson/LoongArchQemuPkg/PlatformPei/Platform.c | 5 + 1 file changed, 5 insertions(+) diff --git

[edk2-devel] [edk2-platforms][PATCH V3 0/8] loongarch add flash device.

2023-01-12 Thread xianglai
This is a patch series that contains: 1.loongarch add flash device driver. 2.loongarch add nvme device driver. 3.Optimize the mmu lib of loongarch. 4.Enable zero address protection. v3 changes: - split flash driver patch. v2 changes: - Split the MMU lib-related patches further. - Remove the for

Re: [edk2-devel] [PATCH v4 2/3] ArmPkg: implement EFI_MP_SERVICES_PROTOCOL based on PSCI calls

2023-01-12 Thread Kun Qin
Hi Rebecca, Thanks for working through the feedback as you mentioned on the other thread. But hopefully this email finds you before the v5 gets published. I ran through some more tests and found a few extra comments on this specific patch, which you might have found during v5 preparation. I

Re: [edk2-devel] [PATCH v3 13/14] ArmPkg: Turn off spellcheck audit mode

2023-01-12 Thread Michael Kubacki
On 1/11/2023 11:23 AM, Ard Biesheuvel wrote: Your feedback is still valuable to the wider TianoCore Tools & CI group that meets weekly. It may be able to be addressed there. Those tend to take place in the middle of the night for me, which is why I rarely join those. The meeting time has

Re: [edk2-devel] [PATCH edk2-platforms 2/2] QemuOpenBoardPkg: Trivial code cleanup

2023-01-12 Thread Isaac Oram
Reviewed-by: Isaac Oram -Original Message- From: Pedro Falcato Sent: Thursday, January 12, 2023 3:14 PM To: devel@edk2.groups.io Cc: Pedro Falcato ; Oram, Isaac W ; Theo Jehl Subject: [PATCH edk2-platforms 2/2] QemuOpenBoardPkg: Trivial code cleanup Small cleanups around

Re: [edk2-devel] [PATCH edk2-platforms 1/2] QemuOpenBoardPkg: Redo PCI bus initialization

2023-01-12 Thread Isaac Oram
Reviewed-by: Isaac Oram Minor comments that could be fixed: Platform/Qemu/QemuOpenBoardPkg/PlatformInitPei/Memory.c: 65: We generally don't like includes, defines, etc in the middle of the code. Convention is near the top of the file so easy to find. Also generally good to initialize

Re: [edk2-devel][edk2-platforms][PATCH V1 1/1] Features/Intel: Prepare for edk2-platforms CI

2023-01-12 Thread Isaac Oram
Pushed as 3e0f5b21c9..c227f900f5 -Original Message- From: Chaganty, Rangasai V Sent: Wednesday, January 11, 2023 2:10 PM To: Oram, Isaac W ; devel@edk2.groups.io Cc: Desimone, Nathaniel L ; Gao, Liming ; Dong, Eric ; Bi, Dandan Subject: RE: [edk2-devel][edk2-platforms][PATCH V1 1/1]

Re: [edk2-devel] [PATCH 3/3] MdeModulePkg: Add IpmiCommandLib

2023-01-12 Thread Isaac Oram
Reviewed-by: Isaac Oram -Original Message- From: abner.ch...@amd.com Sent: Tuesday, December 27, 2022 8:59 PM To: devel@edk2.groups.io Cc: Wang, Jian J ; Gao, Liming ; Nickle Wang ; Igor Kulchytskyy ; Oram, Isaac W ; Desimone, Nathaniel L Subject: [PATCH 3/3] MdeModulePkg: Add

Re: [edk2-devel] [PATCH 2/3] MdeModulePkg/IpmiCommandLib: Add NULL instance library

2023-01-12 Thread Isaac Oram
Reviewed-by: Isaac Oram You could change EFI_UNSUPPORTED to RETURN_UNSUPPORTED. I am not sure why patchcheck doesn't complain. There are five instances of "exact size" which oddly has two spaces between the words. Regards, Isaac -Original Message- From: abner.ch...@amd.com Sent:

[edk2-devel] [PATCH v9 4/4] OvmfPkg/PlatformPei: SEV-SNP make >=4GB unaccepted

2023-01-12 Thread Dionna Glaze via groups.io
Instead of eagerly accepting all memory in PEI, only accept memory under the 4GB address. This allows a loaded image to use the MEMORY_ACCEPTANCE_PROTOCOL to disable the accept behavior and indicate that it can interpret the memory type accordingly. This classification is safe since

[edk2-devel] [PATCH v9 3/4] OvmfPkg: Implement AcceptAllUnacceptedMemory in CocoDxe

2023-01-12 Thread Dionna Glaze via groups.io
This protocol implementation disables the accept-all-memory behavior of the BeforeExitBootServices event this driver adds. Cc: Gerd Hoffmann Cc: James Bottomley Cc: Jiewen Yao Cc: Tom Lendacky Cc: Ard Biesheuvel Cc: "Min M. Xu" Cc: Andrew Fish Cc: "Michael D. Kinney" Signed-off-by:

[edk2-devel] [PATCH v9 2/4] MdePkg: Introduce the MemoryAcceptance protocol

2023-01-12 Thread Dionna Glaze via groups.io
The default behavior for unaccepted memory is to accept all memory when ExitBootServices is called. An OS loader can use this protocol to disable this behavior to assume responsibility for memory acceptance and to affirm that the OS can handle the unaccepted memory type. This is a candidate for

[edk2-devel] [PATCH v9 1/4] OvmfPkg: Introduce CocoDxe driver

2023-01-12 Thread Dionna Glaze via groups.io
This driver is meant as a join point for all Confidential Compute technologies to put shared behavior that doesn't belong anywhere else. The first behavior added here is to accept all unaccepted memory at ExitBootServices if the behavior is not disabled. This allows safe upgrades for OS loaders

[edk2-devel] [PATCH v9 0/4] Add safe unaccepted memory behavior

2023-01-12 Thread Dionna Glaze via groups.io
We make eager memory acceptance the default behavior at ExitBootServices by using the standard-enforced behavior that if the call returns an error code, then the map key is incorrect and the caller must re-call GetMemoryMap to ensure the contents are correct. Eager memory acceptance is

Re: [edk2-devel] [PATCH 1/3] MdeModulePkg/Include: Add IpmiCommandLib header file

2023-01-12 Thread Isaac Oram
Reviewed-by: Isaac Oram Typos in SetPowerRestireRequest and SetPowerRestireResponse in function comment block and parameters. 35 instances of successly should perhaps be successfully. 344: NetFnChasis should perhaps be NetFnChassis. Regards, Isaac -Original Message- From:

[edk2-devel][edk2-platforms][PATCH V1 2/2] WhitleyOpenBoardPkg: Update to Whitley FSP 4.2.0.2A

2023-01-12 Thread Isaac Oram
This contains binary interface changes and requires FSP 4.2.0.2A or later Cc: Nate DeSimone Cc: Chasel Chiu Signed-off-by: Isaac Oram --- .../Dxe/PlatformCpuPolicy/PlatformCpuPolicy.c | 2 +- .../AcpiTables/Dsdt/CommonPlatform10nm.asi| 1 + .../Pci/Dxe/PciHostBridge/PciRebalance.c

[edk2-devel][edk2-platforms][PATCH V1 1/2] WhitleySiliconPkg: Update to Whitley FSP 4.2.0.2A

2023-01-12 Thread Isaac Oram
This contains binary interface changes and requires FSP 4.2.0.2A or later Cc: Nate DeSimone Cc: Chasel Chiu Signed-off-by: Isaac Oram --- Silicon/Intel/WhitleySiliconPkg/CpRcPkg.dec | 23 +--- .../Intel/WhitleySiliconPkg/Cpu/CpuRcPkg.dec | 4 ++-

[edk2-devel][edk2-platforms][PATCH V1 0/2] Update Si support

2023-01-12 Thread Isaac Oram
Updates for latest validated FSP, 4.2.0.2A. There are binary incompatible Dispatch mode interface changes necessary. API mode interfaces are unchanged. Cc: Nate DeSimone Cc: Chasel Chiu Isaac Oram (2): WhitleySiliconPkg: Update to Whitley FSP 4.2.0.2A WhitleyOpenBoardPkg: Update to Whitley

[edk2-devel] [PATCH edk2-platforms 2/2] QemuOpenBoardPkg: Trivial code cleanup

2023-01-12 Thread Pedro Falcato
Small cleanups around PlatformInitPei. Signed-off-by: Pedro Falcato Cc: Isaac Oram Cc: Theo Jehl --- .../QemuOpenBoardPkg/PlatformInitPei/Cpu.c| 2 +- .../QemuOpenBoardPkg/PlatformInitPei/Memory.c | 9 ++ .../PlatformInitPei/PlatformInit.h| 28 ++- 3

[edk2-devel] [PATCH edk2-platforms 1/2] QemuOpenBoardPkg: Redo PCI bus initialization

2023-01-12 Thread Pedro Falcato
Rework PCI MMIO space into something more robust and compatible with various QEMU configurations. Also, set up 64-bit memory regions for 64-bit BARs and drop OvmfPkg's PciHostBridgeLib for MinPlatformPkg's PciHostBridgeLibSimple, which does the job just fine. (cc Gerd for possible comments given

[edk2-devel] [PATCH edk2-platforms 0/2] QemuOpenBoardPkg: PCI rework and small fixes

2023-01-12 Thread Pedro Falcato
This patch-set contains a large rework of PCI (including migration to MinPlatformPkg's PCI host bus driver) and trivial code cleanup (some of it included in the PCI patch). More details about the changes themselves in the commit messages and code comments. Cc: Isaac Oram Cc: Theo Jehl Pedro

Re: [edk2-devel] [PATCH 1/1] PciBusDxe: Add PcdPciProbePcieConfig

2023-01-12 Thread Pedro Falcato
On Thu, Jan 12, 2023 at 4:58 PM Laszlo Ersek wrote: > > +Gerd; comment below > > On 1/12/23 17:03, Pedro Falcato wrote: > > Virtualization software like QEMU can introduce interesting impossible > > topologies like PCIe devices on legacy PCI buses. > > > > Add a new PCD PcdPciProbePcieConfig to

Re: [edk2-devel] [PATCH v2] OvmfPkg/PlatformInitLib: catch QEMU's CPU hotplug reg block regression

2023-01-12 Thread Michael Brown
On 12/01/2023 17:58, Laszlo Ersek wrote: The case is that both QEMU and edk2 check for each other's supported features. It's a complex interwoven feature set with security impact, which is exactly why we added feature negotiation at every step -- effectively mutual negotiation wherever

Re: [edk2-devel] MinPlatformPkg question

2023-01-12 Thread Isaac Oram
Garrett, Preface: I don't have a strong objection to moving MinPlatformPkg. I would generally prefer to move silicon/platform/board specific content out of edk2 and into edk2-platforms or elsewhere. I am concerned that moving content could negatively impact current users in a way that would

[edk2-devel] [PATCH v2 2/2] MdePkg: Added Call for AfterReadyToBoot Event

2023-01-12 Thread Robert Phelps via groups.io
In the function EfiSignalEventReadyToBoot, Code was added to also create, signal, and close the AfterReadyToBoot event. Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Signed-off-by: Robert Phelps --- MdePkg/Library/UefiLib/UefiLib.inf| 1 +

[edk2-devel] [PATCH v2 0/2] Added AfterReadyToBoot Event

2023-01-12 Thread Robert Phelps via groups.io
In the UEFI Specification version 2.9 a new Event was added AfterReadyToBoot. This set of patches creates the definitions for the new event and adds the code to trigger this event. Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Signed-off-by: Robert Phelps Robert Phelps (2):

[edk2-devel] [PATCH v2 1/2] MdePkg: Add After Ready To Boot Event Definition from UEFI 2.9

2023-01-12 Thread Robert Phelps via groups.io
Add After Ready To Boot Event Definitions Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Signed-off-by: Robert Phelps --- MdePkg/Include/Guid/EventGroup.h | 5 + MdePkg/MdePkg.dec| 3 +++ 2 files changed, 8 insertions(+) diff --git

Re: [edk2-devel] [PATCH v2] OvmfPkg/PlatformInitLib: catch QEMU's CPU hotplug reg block regression

2023-01-12 Thread Laszlo Ersek
On 1/12/23 09:28, Laszlo Ersek wrote: > In QEMU v5.1.0, the CPU hotplug register block misbehaves: the negotiation > protocol is (effectively) broken such that it suggests that switching from > the legacy interface to the modern interface works, but in reality the > switch never happens. The

Re: [edk2-devel] [PATCH v3 0/8] OvmfPkg: check 64bit mmio window for resource conflicts

2023-01-12 Thread Laszlo Ersek
Hi, On 1/12/23 10:34, Gerd Hoffmann wrote: > v3: > - Add / fix comments, add notes to commit messages. > - Make functions static. > - Logging tweaks. > - Fix windows compiler warnings. > - Add patches (5,6,7) moving MMCONFIG to 0xe000, simplifying code >and reducing differences

Re: [edk2-devel] [PATCH v2] OvmfPkg/PlatformInitLib: catch QEMU's CPU hotplug reg block regression

2023-01-12 Thread Laszlo Ersek
On 1/12/23 18:58, Laszlo Ersek wrote: > Your proposal is entirely justified, from a practical / user > perspective, but I'm not the right person for it. This should do what you propose (untested), but I hate the code myself. diff --git a/OvmfPkg/Library/PlatformInitLib/Platform.c

Re: [edk2-devel] [PATCH v2] OvmfPkg/PlatformInitLib: catch QEMU's CPU hotplug reg block regression

2023-01-12 Thread Laszlo Ersek
On 1/12/23 17:08, Michael Brown wrote: > On 12/01/2023 13:22, Laszlo Ersek wrote: Detect the issue in PlatformMaxCpuCountInitialization(), and print an error message and *hang* if the issue is present. >>> >>> Would this mean that OVMF would refuse to start with all current >>> distro

Re: [edk2-devel] [PATCH 1/1] OvmfPkg/PlatformInitLib: pass through reservations from qemu

2023-01-12 Thread Lendacky, Thomas via groups.io
On 12/6/22 23:32, Gerd Hoffmann via groups.io wrote: qemu uses the etc/e820 fw_cfg file not only for memory, but also for reservations. Handle reservations by adding resource descriptor hobs for them. A typical qemu configuration has a small reservation between lapic and flash: # sudo cat

Re: [edk2-devel] [PATCH 3/3] MdeModulePkg: Notify BeforeExitBootServices in CoreExitBootServices

2023-01-12 Thread Laszlo Ersek
On 1/12/23 16:32, Laszlo Ersek wrote: > ... I've picked up the patches, picked up the pending feedback tags too, > and compared the result against Dionna's latest PR > . > > Beyond the Message-Id tags that git-am picked up on my side, I've found >

Re: [edk2-devel] [PATCH 1/1] PciBusDxe: Add PcdPciProbePcieConfig

2023-01-12 Thread Laszlo Ersek
+Gerd; comment below On 1/12/23 17:03, Pedro Falcato wrote: > Virtualization software like QEMU can introduce interesting impossible > topologies like PCIe devices on legacy PCI buses. > > Add a new PCD PcdPciProbePcieConfig to control PCIe extended configuration > space > probing, given that

[edk2-devel] [PATCH v2 1/1] PciBusDxe: Add PcdPciProbePcieConfig

2023-01-12 Thread Pedro Falcato
Virtualization software like QEMU can introduce interesting impossible topologies like PCIe devices on legacy PCI buses. Add a new PCD PcdPciProbePcieConfig to control PCIe extended configuration space probing, given that currently PCIe config space probing can trigger asserts in BasePciCf8Lib,

Re: [edk2-devel] [PATCH 3/3] MdeModulePkg: Notify BeforeExitBootServices in CoreExitBootServices

2023-01-12 Thread Dionna Glaze via groups.io
Thanks for your explanation and fastidiousness, Laszlo. Much appreciated. On Thu, Jan 12, 2023 at 7:32 AM Laszlo Ersek wrote: > > On 1/12/23 14:38, Ard Biesheuvel wrote: > > On Thu, 12 Jan 2023 at 13:24, Laszlo Ersek wrote: > >> > >> On 1/12/23 00:08, Dionna Glaze via groups.io wrote: > >>> On

Re: [edk2-devel] [PATCH v2] OvmfPkg/PlatformInitLib: catch QEMU's CPU hotplug reg block regression

2023-01-12 Thread Michael Brown
On 12/01/2023 13:22, Laszlo Ersek wrote: Detect the issue in PlatformMaxCpuCountInitialization(), and print an error message and *hang* if the issue is present. Would this mean that OVMF would refuse to start with all current distro versions of qemu (when not using KVM), or am I

Re: [edk2-devel] [PATCH V2] MdeModulePkg/Decompress: Add missing source file to Brotli library

2023-01-12 Thread He, Jiangang via groups.io
[AMD Official Use Only - General] Timothy will answer the question. From: Chang, Abner Sent: Thursday, January 12, 2023 10:05 AM To: Kinney, Michael D ; devel@edk2.groups.io Cc: Bi, Dandan ; Gao, Liming ; Kirkendall, Garrett ; Kinney, Michael D ; He, Jiangang Subject: Re: [edk2-devel] [PATCH

Re: [edk2-devel] [PATCH V2] MdeModulePkg/Decompress: Add missing source file to Brotli library

2023-01-12 Thread Chang, Abner via groups.io
[AMD Official Use Only - General] Hi Mike, CC Jiangang, he can give the clear answer. Thanks Abner Get Outlook for Android From: Kinney, Michael D Sent: Thursday, January 12, 2023 11:23:48 PM To: devel@edk2.groups.io ; Chang, Abner

[edk2-devel] [PATCH 1/1] PciBusDxe: Add PcdPciProbePcieConfig

2023-01-12 Thread Pedro Falcato
Virtualization software like QEMU can introduce interesting impossible topologies like PCIe devices on legacy PCI buses. Add a new PCD PcdPciProbePcieConfig to control PCIe extended configuration space probing, given that currently PCIe config space probing can trigger asserts in BasePciCf8Lib,

Re: [edk2-devel] [PATCH v2 2/4] OvmfPkg/PlatformInitLib: Add PlatformGetLowMemoryCB

2023-01-12 Thread Laszlo Ersek
On 1/12/23 15:03, Gerd Hoffmann wrote: > Hi, > >>> I think it should actually simplify things. All the inconsistencies we >>> have (as you outlined above) due to the hole punching and edk2 >>> supporting only a single range for 32bit mmio should go away, and we >>> will have less address space

[edk2-devel] [PATCH 1/1] OvmfPkg: fix OvmfTpmSecurityStub.dsc.inc include

2023-01-12 Thread Gerd Hoffmann
TPM support is independent from secure boot support. Move the TPM include snipped out of the secure boot !if block. Fixes: b47575801e19 ("OvmfPkg: move tcg configuration to dsc and fdf include files") Bugzilla: https://bugzilla.tianocore.org//show_bug.cgi?id=4290 Signed-off-by: Gerd Hoffmann

Re: [edk2-devel] [PATCH V2] MdeModulePkg/Decompress: Add missing source file to Brotli library

2023-01-12 Thread Michael D Kinney
Hi Abner, What was the failure before this change? This looks like something that would always break the build of source files were missing. Mike > -Original Message- > From: devel@edk2.groups.io On Behalf Of Chang, Abner > via groups.io > Sent: Wednesday, January 11, 2023 9:08 PM >

Re: [edk2-devel] [PATCH 3/3] MdeModulePkg: Notify BeforeExitBootServices in CoreExitBootServices

2023-01-12 Thread Laszlo Ersek
On 1/12/23 14:38, Ard Biesheuvel wrote: > On Thu, 12 Jan 2023 at 13:24, Laszlo Ersek wrote: >> >> On 1/12/23 00:08, Dionna Glaze via groups.io wrote: >>> On Thu, Nov 10, 2022 at 8:55 AM Kinney, Michael D >>> wrote: Hi Dionna,

Re: [edk2-devel] [PATCH V2 1/3] MdePkg/IndustryStandard: Update IPMI definitions

2023-01-12 Thread Chang, Abner via groups.io
[AMD Official Use Only - General] Hi MdePkg/IndustryStandard maintainers, Could you please help to review this patch set and merge it if you have no concern with it? IPMI maintainer already gave it a reviewed-by. Thanks Abner From: manickavasakamk via groups.io Sent: Thursday, January 12,

Re: [edk2-devel] [PATCH V2 1/3] MdePkg/IndustryStandard: Update IPMI definitions

2023-01-12 Thread manickavasakam karpagavinayagam via groups.io
All : When tried to build latest WhilteyOpenboardPkg using latest edk2-platforms, we are seeing build error because of missing IPMI_GET_SYSTEM_UUID_RESPONSE header. https://github.com/tianocore/edk2-platforms/commit/e66b5daecbb3b8715ae686c0a1f105b72341a122 Please let us know when this patch

Re: [edk2-devel] [PATCH v2 2/4] OvmfPkg/PlatformInitLib: Add PlatformGetLowMemoryCB

2023-01-12 Thread Gerd Hoffmann
Hi, > > I think it should actually simplify things. All the inconsistencies we > > have (as you outlined above) due to the hole punching and edk2 > > supporting only a single range for 32bit mmio should go away, and we > > will have less address space layout differences between q35 and pc. >

Re: [edk2-devel] [PATCH 3/3] MdeModulePkg: Notify BeforeExitBootServices in CoreExitBootServices

2023-01-12 Thread Ard Biesheuvel
On Thu, 12 Jan 2023 at 13:24, Laszlo Ersek wrote: > > On 1/12/23 00:08, Dionna Glaze via groups.io wrote: > > On Thu, Nov 10, 2022 at 8:55 AM Kinney, Michael D > > wrote: > >> > >> Hi Dionna, > >> > >> https://github.com/tianocore/tianocore.github.io/wiki/EDK-II-Development-Process > >> > >> I

[edk2-devel] MinPlatformPkg question

2023-01-12 Thread Kirkendall, Garrett via groups.io
[Public] + MinPlatformPkg Maintainers Start the conversation: Some time back there were posts about promoting MinPlatformPkg up to a more generic level. Is there still a desire to implement this and possibly even to promote this more generic MinPlatformPkg to the edk2 repository. Would it be

Re: [edk2-devel] [PATCH v2] OvmfPkg/PlatformInitLib: catch QEMU's CPU hotplug reg block regression

2023-01-12 Thread Laszlo Ersek
On 1/12/23 11:09, Ard Biesheuvel wrote: > On Thu, 12 Jan 2023 at 10:56, Michael Brown wrote: >> >> On 12/01/2023 08:28, Laszlo Ersek wrote: >>> In QEMU v5.1.0, the CPU hotplug register block misbehaves: the negotiation >>> protocol is (effectively) broken such that it suggests that switching from

Re: [edk2-devel] [PATCH v2] OvmfPkg/PlatformInitLib: catch QEMU's CPU hotplug reg block regression

2023-01-12 Thread Laszlo Ersek
On 1/12/23 10:55, Michael Brown wrote: > On 12/01/2023 08:28, Laszlo Ersek wrote: >> In QEMU v5.1.0, the CPU hotplug register block misbehaves: the >> negotiation >> protocol is (effectively) broken such that it suggests that switching >> from >> the legacy interface to the modern interface works,

Re: [edk2-devel] [PATCH v2 0/6] Adds AmdSmmCpuFeaturesLib

2023-01-12 Thread Laszlo Ersek
On 1/11/23 07:15, Abdul Lateef Attar via groups.io wrote: > V2 series addresses review comments from V1. > Adds SmmSmramSaveStateLib library > Removes global references across modules. > drops S3 support patch. > > PR: https://github.com/tianocore/edk2/pull/3882 > > Cc: Paul Grimes > Cc:

Re: [edk2-devel] [PATCH v2] UefiCpuPkg: Support SMM Relocated SmBase handling

2023-01-12 Thread Laszlo Ersek
On 1/12/23 13:37, Laszlo Ersek wrote: > On 1/11/23 09:35, Wu, Jiaxin wrote: >> Mainly changes as below: >> 1. Add Smm Base HOB, which is used to store the information of >> Smm Relocated SmBase array for each Processors; >> 2. Combine 2 SMIs (gcSmmInitTemplate & gcSmiHandlerTemplate) into one >>

Re: [edk2-devel] [PATCH v2] UefiCpuPkg: Support SMM Relocated SmBase handling

2023-01-12 Thread Laszlo Ersek
On 1/11/23 09:35, Wu, Jiaxin wrote: > Mainly changes as below: > 1. Add Smm Base HOB, which is used to store the information of > Smm Relocated SmBase array for each Processors; > 2. Combine 2 SMIs (gcSmmInitTemplate & gcSmiHandlerTemplate) into one > (gcSmiHandlerTemplate), the new SMI handler

Re: [edk2-devel] [PATCH 3/3] MdeModulePkg: Notify BeforeExitBootServices in CoreExitBootServices

2023-01-12 Thread Laszlo Ersek
On 1/12/23 00:08, Dionna Glaze via groups.io wrote: > On Thu, Nov 10, 2022 at 8:55 AM Kinney, Michael D > wrote: >> >> Hi Dionna, >> >> https://github.com/tianocore/tianocore.github.io/wiki/EDK-II-Development-Process >> >> I think you are at step 13. If you have not done so already, please

Re: [edk2-devel] [PATCH] UefiCpuPkg: Fix SMM code hangs when InitPaging

2023-01-12 Thread Zeng, Star
Reviewed-by: Star Zeng -Original Message- From: devel@edk2.groups.io On Behalf Of Zhiguang Liu Sent: Wednesday, January 4, 2023 1:41 PM To: devel@edk2.groups.io Cc: Liu, Zhiguang ; Ni, Ray ; Kumar, Rahul R ; Dong, Eric Subject: [edk2-devel] [PATCH] UefiCpuPkg: Fix SMM code hangs when

Re: [edk2-devel] [PATCH v2 2/4] OvmfPkg/PlatformInitLib: Add PlatformGetLowMemoryCB

2023-01-12 Thread Laszlo Ersek
On 1/11/23 16:23, Gerd Hoffmann wrote: > Some test case complained because the 8000-afff range is io > address space (according to /proc/iomem) but not tagged as uncachable > in mtrr registers. Ah, very interesting! I didn't know there was a test case for this. (And now I'm curious, per

Re: [edk2-devel] [PATCH v2 4/4] OvmfPkg/PlatformInitLib: Add PlatformReservationConflictCB

2023-01-12 Thread Laszlo Ersek
On 1/11/23 09:26, Gerd Hoffmann wrote: > Hi, > >>> +/** >>> + Check whenever the 64bit PCI MMIO window overlaps with a reservation >>> + from qemu. If so move down the MMIO window to resolve the conflict. >>> + >>> + This happens on (virtal) AMD machines with 1TB address space, >>> +

Re: [edk2-devel] [PATCH] OvmfPkg/PlatformInitLib: fix comment about uncacheable MTRRs

2023-01-12 Thread Ard Biesheuvel
On Thu, 12 Jan 2023 at 08:45, Laszlo Ersek wrote: > > In commit 49edde15230a ("OvmfPkg/PlatformPei: set 32-bit UC area at > PciBase / PciExBarBase (pc/q35)", 2019-06-03), I forgot to update the > comment. Do it now. > > Cc: Ard Biesheuvel > Cc: Gerd Hoffmann > Cc: Jiewen Yao > Cc: Jordan

Re: [edk2-devel] [PATCH 1/1] OvmfPkg/VirtNorFlashDxe: map flash memory as uncacheable

2023-01-12 Thread Ard Biesheuvel
On Wed, 11 Jan 2023 at 19:00, Gerd Hoffmann wrote: > > Switching from the ArmPlatformPkg/NorFlashDxe driver to the > OvmfPkg/VirtNorFlashDxe driver had the side effect that flash address > space got registered as EFI_MEMORY_WC instead of EFI_MEMORY_UC. > > That confuses the linux kernel's numa

Re: [edk2-devel] [RFC] Remove PI spec TemporaryRamSupport PPI from PEI Core

2023-01-12 Thread Ni, Ray
Nate, GCC generates assembly code that uses `RBP` to store `Private` local variable for below C code in PeiCore/Dispatcher.c ```c if (StackOffsetPositive) { SecCoreData = (CONST EFI_SEC_PEI_HAND_OFF *)((UINTN)(VOID *)SecCoreData + StackOffset); Private =

  1   2   >