Re: [edk2-devel] [PATCH v6 1/6] MdePkg: Add macro definitions for CET feature for NASM files.

2023-11-23 Thread Ni, Ray
> How about this: unify the macro definitions in a single file, but call > that file: > > MdePkg/Include/X86Cet.inc > I don't have concerns on using one unified file: X86Cet.inc. @Kinney, Michael D, any comments? -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to th

[edk2-devel] [PATCH] [Patch V2]IntelFsp2Pkg\Tools\ConfigEditor: Added new USF config workstream.

2023-11-23 Thread Arun Sura
Config Editor utility addition/changes: Support to enable config editor tool to have a new feature that can load and view the configuration data of compiled VFR or HFR in form of YAML. This can help users to understand and track the configuration data when modifications are made. Requires compiled

Re: [edk2-devel] [Patch V4 0/3] UefiCpuPkg/MpInitLib: Eliminate redundant microcode loading in DXE.

2023-11-23 Thread Ni, Ray
Reviewed-by: Ray Ni Thanks, Ray > -Original Message- > From: devel@edk2.groups.io On Behalf Of Yuanhao > Xie > Sent: Friday, November 24, 2023 10:57 AM > To: devel@edk2.groups.io > Cc: Xie, Yuanhao > Subject: [edk2-devel] [Patch V4 0/3] UefiCpuPkg/MpInitLib: Eliminate > redundant microc

Re: [edk2-devel] [Patch V3 1/3] UefiCpuPkg/MpInitLib: Eliminate redundant microcode loading in DXE.

2023-11-23 Thread Yuanhao Xie
Hi Ray, In V4, the GetMicrocodePathInfoFromHob() removal is in patch 1 instead of the patch 3. Comments of MTRRs syncing is a updated. Thanks Yuanhao -Original Message- From: Ni, Ray Sent: Thursday, November 23, 2023 9:18 AM To: Xie, Yuanhao ; devel@edk2.groups.io Cc: Dong, Eric ; Kuma

Re: [edk2-devel] [Patch V3 3/3] UefiCpuPkg/MpInitLib: Extract Dump Microcode Revision as function.

2023-11-23 Thread Yuanhao Xie
Hi Ray, In v4, DEBUG_CODE_BEGIN/END() from DumpMicrocodeRevision() is removed, and calling is updated as: DEBUG_CODE ( DumpMicrocodeRevision (); ); Thanks a lot for the feedback! Regards, Yunahao -Original Message- From: Ni, Ray Sent: Thursday, November 23, 2023 9:24 AM To: Xie, Y

Re: [edk2-devel] [Patch V2 3/3] UefiCpuPkg/MpInitLib: Eliminate redundant microcode loading in DXE.

2023-11-23 Thread Yuanhao Xie
Hi Laszlo, Thanks a lot for the feedback! - (1) This patch seems great, functionally speaking, but I *think* the above part (the elimination of the GetMicrocodePatchInfoFromHob() call, and the dependent ShadowMicrocodeUpdatePatch() call) should be split to a separate patch -- perhaps before, p

[edk2-devel] [Patch V4 3/3] UefiCpuPkg/MpInitLib: Extract Dump Microcode Revision as function.

2023-11-23 Thread Yuanhao Xie
There is no functional changes, only extract DumpMicrocodeRevision since only in PEI BSP will detect, apply microcode, and APs will sync microcode. Cc: Ray Ni Cc: Eric Dong Cc: Rahul Kumar Cc: Tom Lendacky Cc: Laszlo Ersek Signed-off-by: Yuanhao Xie --- UefiCpuPkg/Library/MpInitLib/Microcod

[edk2-devel] [Patch V4 2/3] UefiCpuPkg/MpInitLib: Store MTRRs settings only when CpuCount>1

2023-11-23 Thread Yuanhao Xie
Store BSP's MTRR setting only when CpuCount>1. Reviewed-by: Ray Ni Cc: Ray Ni Cc: Eric Dong Cc: Rahul Kumar Cc: Tom Lendacky Cc: Laszlo Ersek Signed-off-by: Yuanhao Xie --- UefiCpuPkg/Library/MpInitLib/MpLib.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Uef

[edk2-devel] [Patch V4 1/3] UefiCpuPkg/MpInitLib: Eliminate redundant microcode loading in DXE.

2023-11-23 Thread Yuanhao Xie
The DXE stage's Microcode loading process has been elimincated by: 1. Let ShadowMicrocodeUpdatePatch and MicrocodeDetect for BSP performed only during the PEI phase. DXE skip those actions. 2. BSP in DXE WakeUpAp only for synchronizing MTRR settings, not loading microcode. Synchronizing the MTRRs

[edk2-devel] [Patch V4 0/3] UefiCpuPkg/MpInitLib: Eliminate redundant microcode loading in DXE.

2023-11-23 Thread Yuanhao Xie
The DXE stage's Microcode loading process has been eliminated. Store BSP's MTRR setting only when CpuCount>1. Extract Dump Microcode Revision as a function Compare with V3, this version updates the comments, Move GetMicrocodePatchInfoFromHob removal from patch 3 to patch 1 on xieyuanh (3): Uefi

Re: [edk2-devel] [PATCH 1/1] StandaloneMmPkg/Core: Restart dispatcher once MmEntryPoint is registered

2023-11-23 Thread Xu, Wei6
Thanks a lot for the review. Replied inline. BR, Wei >-Original Message- >From: Laszlo Ersek >Sent: Wednesday, November 22, 2023 7:46 PM >To: devel@edk2.groups.io; Xu, Wei6 >Cc: Ard Biesheuvel ; Sami Mujawar >; Ni, Ray >Subject: Re: [edk2-devel] [PATCH 1/1] StandaloneMmPkg/Core: Restar

[edk2-devel] [PATCH 0/7] Add VirtMmCommunication driver, enable for OVMF and ArmVirt.

2023-11-23 Thread Gerd Hoffmann
This is the edk2 side of the qemu patch series posted last week to qemu-devel: https://lists.gnu.org/archive/html/qemu-devel/2023-11/msg03714.html The driver forwards MM calls to the virtualization host instead of the MM code running in SMM (x64) or el3 (arm) mode. The functionality traditional

[edk2-devel] [PATCH 4/7] OvmfPkg: add PcdQemuVarsRequire

2023-11-23 Thread Gerd Hoffmann
Add PcdQemuVarsRequire FeaturePcd, so firmware code can figure whenever the given build is supposed to use the qemu uefi variable service. Skip the emulated variable store setup in case PcdQemuVarsRequire is true. This is needed to make secure boot work. Signed-off-by: Gerd Hoffmann --- OvmfPk

[edk2-devel] [PATCH 7/7] ArmVirtPkg/ArmVirtQemu: add QEMU_VARS option

2023-11-23 Thread Gerd Hoffmann
Add config option to use qemu variable service, via VirtMmCommunicationDxe. Default is FALSE, build using '-D QEMU_VARS=TRUE' to enable. Signed-off-by: Gerd Hoffmann --- ArmVirtPkg/ArmVirt.dsc.inc | 3 +++ ArmVirtPkg/ArmVirtQemu.dsc | 11 +++ ArmVirtPkg/ArmVirtQemuK

[edk2-devel] [PATCH 6/7] OvmfPkg/VirtMmCommunicationDxe: add arm support

2023-11-23 Thread Gerd Hoffmann
Add support for arm. Lookup the "qemu-uefi-vars" device in the device tree, talk to it via mmio, otherwise identical to the x64 variant. Signed-off-by: Gerd Hoffmann --- .../VirtMmCommunication.inf | 15 ++ OvmfPkg/VirtMmCommunicationDxe/QemuFdt.c | 208 +

[edk2-devel] [PATCH 5/7] OvmfPkg/VirtMmCommunicationDxe: stop on init failure

2023-11-23 Thread Gerd Hoffmann
Print an error and stop in case VirtMmCommunicationDxe initialization fails. Signed-off-by: Gerd Hoffmann --- OvmfPkg/VirtMmCommunicationDxe/VirtMmCommunication.inf | 1 + OvmfPkg/VirtMmCommunicationDxe/VirtMmCommunication.c | 10 ++ 2 files changed, 11 insertions(+) diff --git a/Ovm

[edk2-devel] [PATCH 3/7] OvmfPkg/OvmfPkgX64: add QEMU_VARS option

2023-11-23 Thread Gerd Hoffmann
Add config option to use qemu variable service, via VirtMmCommunicationDxe. Default is FALSE, build using '-D QEMU_VARS=TRUE' to enable. Signed-off-by: Gerd Hoffmann --- OvmfPkg/OvmfPkgX64.dsc| 15 ++- OvmfPkg/OvmfPkgX64.fdf| 1

[edk2-devel] [PATCH 2/7] OvmfPkg: add new VirtMmCommunicationDxe driver

2023-11-23 Thread Gerd Hoffmann
EFI driver implementing the MmCommunication2Protocol, but instead of trapping to MM mode (SMM on x86, el3 on arm) trap to the host, using a virtual device. Moving the efi variable management to the host allows to have persistent efi variables without flash storage, and it also allows to have secur

[edk2-devel] [PATCH 1/7] OvmfPkg: add IndustryStandard/QemuUefiVars.h

2023-11-23 Thread Gerd Hoffmann
Add header file for the qemu uefi variable service device. This defines the registers of the device, the location in io address space (x86) and the device tree name (arm). Signed-off-by: Gerd Hoffmann --- .../Include/IndustryStandard/QemuUefiVars.h | 41 +++ 1 file changed, 41

[edk2-devel] [edk2-redfish-client][PATCH 6/6] RedfishClientPkg/RedfishFeatureUtilityLib: add string NULL check

2023-11-23 Thread Nickle Wang via groups.io
Add string NULL check in attribute comparison function and prevent NULL string assertion. This is not supposed to happen in normal condition so add error output for debugging purpose. Signed-off-by: Nickle Wang Cc: Abner Chang Cc: Igor Kulchytskyy Cc: Nick Ramirez --- .../RedfishFeatureUtilit

[edk2-devel] [edk2-redfish-client][PATCH 5/6] RedfishClientPkg/Features: fix NULL cached handler issue.

2023-11-23 Thread Nickle Wang via groups.io
EdkIIRedfishResourceSetConfigureLang() uses cached handler to locate protocol. However, if EdkIIRedfishResourceSetConfigureLang() is called at non-collection driver, the cached handler is NULL because cached handler is initialized by collection driver. Since EdkIIRedfishResourceSetConfigureLang() i

[edk2-devel] [edk2-redfish-client][PATCH 4/6] RedfishClientPkg/ConverterLib: fix empty attribute value issue

2023-11-23 Thread Nickle Wang via groups.io
When attribute is empty string, converter library creates NULL attribute value in C structure instead of empty string. Signed-off-by: Nickle Wang Cc: Abner Chang Cc: Igor Kulchytskyy Cc: Nick Ramirez --- RedfishClientPkg/ConverterLib/src/RedfishCsCommon.c | 4 1 file changed, 4 insertion

[edk2-devel] [edk2-redfish-client][PATCH 3/6] RedfishClientPkg: feature driver enhancement.

2023-11-23 Thread Nickle Wang via groups.io
-Fix typo (include function RedfisSetRedfishUri and parameter MaxLengthConfigLang) -Add more debug message. -Do not save ETag to variable every time when new ETag is created in SetEtagWithUri(). -Introduce SetEtagFromUri() to get ETag from BMC and save it in variable. -Introduce GetPendingSettings(

[edk2-devel] [edk2-redfish-client][PATCH 2/6] RedfishClientPkg/RedfishConfigLangMapDxe: fix issue and enhancement.

2023-11-23 Thread Nickle Wang via groups.io
-Fix typo (replace Listheader to ListHeader). -Replace "%a," to "%a:". -Add more debug message. -Fix issue of assigning ASCII character to Unicode string pointer. -Remove the exit-boot-service callback since data is saved at after-provisioning event. There is no need to save data to variable again.

[edk2-devel] [edk2-redfish-client][PATCH 1/6] RedfishClientPkg/RedfishETagDxe: fix issue and enhancement.

2023-11-23 Thread Nickle Wang via groups.io
-Fix typo (replace Listheader to ListHeader). -Replace "%a," to "%a:". -Add more debug message. -Remove the exit-boot-service event and use after-provisioning event to save ETag data. Variable may not be writable during exit-boot-service callback. Signed-off-by: Nickle Wang Cc: Abner Chang Cc: I

[edk2-devel] [edk2-redfish-client][PATCH 0/6] Feature driver fix and

2023-11-23 Thread Nickle Wang via groups.io
There are several bug fix and enhancement to Redfish feature driver. I also fix typo in comments, variable and function name. A pull request is created here for ease of review: https://github.com/tianocore/edk2-redfish-client/pull/60 Signed-off-by: Nickle Wang Cc: Abner Chang Cc: Igor Kulchytsk

[edk2-devel] [edk2-redfish-client][PATCH] RedfishClientPkg/ComputerSystemCollectionDxe: handle more scenarios

2023-11-23 Thread Nickle Wang via groups.io
This change defines two more error returns and allow feature driver to handle the scenarios while 1) the resource is not owned by feature driver. 2) feature driver owns this resource but there is nothing to manage on this resource now. Detail changes are: - Use "%a:" instead of "%a," in debug macro

Re: [edk2-devel] [Proposed Fix][PATCH v1 1/1] MdeModulePkg/DxeCapsuleLibFmp: Fix crash with VirtualAddressMap omitted

2023-11-23 Thread Nhi Pham via groups.io
On 11/23/2023 3:36 PM, Ard Biesheuvel wrote: On Thu, 23 Nov 2023 at 05:49, Nhi Pham wrote: If the SetVirtualAddressMap() is not called, mIsVirtualAddrConverted is FALSE and the kernel crash occurs in IsNestedFmpCapsule() when executing gBS->LocateProtocol () in the else case. To serve the omi

Re: [edk2-devel] [PATCH v3 11/39] UefiCpuPkg: Add LoongArch64 CPU Timer library

2023-11-23 Thread Chao Li
Hi Laszlo, Thanks so carefully to review this patch, I'm guessing it took your a long time. :) Thanks, Chao On 2023/11/23 00:12, Laszlo Ersek wrote: On 11/17/23 11:00, Chao Li wrote: Add the LoongArch64 CPU Timer library, using CPUCFG 0x4 and 0x5 for Stable Counter frequency. BZ:https://bu

Re: [edk2-devel] [edk2-platforms PATCH 1/2] WhitleyOpenBoardPkg: remove references

2023-11-23 Thread Laszlo Ersek
Hi Chasel, On 11/21/23 03:17, Chiu, Chasel wrote: > > Hi Laszlo, > > I think you have to clone all the required repos. > edk2 repository > git clone https://github.com/tianocore/edk2.git > > edk2-platforms repository > git clone https://github.com/tianocore/edk2-platforms.git > > edk2-non-osi

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

2023-11-23 Thread Laszlo Ersek
On 11/20/23 23:57, Taylor Beebe wrote: > I missed this message before heading out on vacation, sorry :) > > Let me know if you have more questions. I've also split the MAT fixes into > > separate patches for the v5 version and will wait to hear back from you > > before sending to ensure the upda

Re: [edk2-devel] [Proposed Fix][PATCH v1 1/1] MdeModulePkg/DxeCapsuleLibFmp: Fix crash with VirtualAddressMap omitted

2023-11-23 Thread Ard Biesheuvel
On Thu, 23 Nov 2023 at 05:49, Nhi Pham wrote: > > If the SetVirtualAddressMap() is not called, mIsVirtualAddrConverted > is FALSE and the kernel crash occurs in IsNestedFmpCapsule() when > executing gBS->LocateProtocol () in the else case. > > To serve the omitted SetVirtualAddressMap() call, we c