Re: [edk2-devel] [PATCH 2/2] UefiCpuPkg/MpInitLib: Copy SEV-ES save area pointer during APIC ID sorting

2023-11-28 Thread Ni, Ray
Reviewed-by: Ray Ni Thanks, Ray > -Original Message- > From: Tom Lendacky > Sent: Tuesday, November 7, 2023 6:46 AM > To: devel@edk2.groups.io > Cc: Dong, Eric ; Ni, Ray ; Kumar, > Rahul R ; Gerd Hoffmann ; > Ard Biesheuvel ; Michael Roth > > Subject: [PATC

Re: [edk2-devel] [PATCH 1/2] UefiCpuPkg/MpInitLib: Use AsmCpuidEx() for CPUID_EXTENDED_TOPOLOGY leaf

2023-11-28 Thread Ni, Ray
Reviewed-by: Ray Ni Thanks, Ray > -Original Message- > From: Tom Lendacky > Sent: Tuesday, November 7, 2023 6:46 AM > To: devel@edk2.groups.io > Cc: Dong, Eric ; Ni, Ray ; Kumar, > Rahul R ; Gerd Hoffmann ; > Ard Biesheuvel ; Michael Roth > > Subject: [PATC

Re: [edk2-devel] [PATCH v5 00/16] Add ImagePropertiesRecordLib and Fix MAT Bugs​

2023-11-28 Thread Ni, Ray
t; ; Wang, Jian J ; Yao, Jiewen > ; Justen, Jordan L ; Leif > Lindholm ; Gao, Liming > ; Kumar, Rahul R ; Ni, > Ray ; Sami Mujawar ; Rhodes, > Sean ; Lazlo Ersek > Subject: Re: [PATCH v5 00/16] Add ImagePropertiesRecordLib and Fix MAT > Bugs​ > > On Mon, 27 Nov 2023 at 19

Re: [edk2-devel] [PATCH v3] UefiCpuPkg/PiSmmCpuDxeSmm: Use NonSmm BSP as default SMM BSP.

2023-11-28 Thread Ni, Ray
Reviewed-by: Ray Ni Thanks, Ray > -Original Message- > From: Liu, Zhiguang > Sent: Thursday, November 23, 2023 11:23 AM > To: devel@edk2.groups.io > Cc: Liu, Zhiguang ; Ni, Ray ; > Kumar, Rahul R ; Gerd Hoffmann > ; Laszlo Ersek > Subject: [PATCH v3] UefiCp

Re: [edk2-devel] [PATCH v2] UefiCpuPkg/PiSmmCpuDxeSmm: Use NonSmm BSP as default SMM BSP.

2023-11-28 Thread Ni, Ray
Reviewed-by: Ray Ni Thanks, Ray > -Original Message- > From: Liu, Zhiguang > Sent: Monday, November 20, 2023 11:10 AM > To: devel@edk2.groups.io > Cc: Liu, Zhiguang ; Ni, Ray ; > Kumar, Rahul R ; Gerd Hoffmann > ; Laszlo Ersek > Subject: [PATCH v2] UefiCpuPkg/Pi

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

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 1/1] StandaloneMmPkg/Core: Restart dispatcher once MmEntryPoint is registered

2023-11-22 Thread Ni, Ray
> + gRequestDispatch = TRUE; > + gDispatcherRunning = FALSE; 1. It's good to set RequestDispatch to TRUE as it exits unconditionally and very likely more drivers can be dispatched later. 2. Since StandaloneMmCore registers a SMI handler, it's possible that some SMM driver ent

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

2023-11-22 Thread Ni, Ray
> VOID > -ShadowMicrocodeUpdatePatch ( > - IN OUT CPU_MP_DATA *CpuMpData > +DumpMicrocodeRevision ( > + IN CPU_MP_DATA *CpuMpData >) > { > - EFI_STATUS Status; > + UINT32 ThreadId; > + UINT32 ExpectedMicrocodeRevision; > + CPU_INFO_IN_HOB *CpuInfoInHob; > + UINT

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

2023-11-22 Thread Ni, Ray
Reviewed-by: Ray Ni Thanks, Ray > -Original Message- > From: Xie, Yuanhao > Sent: Wednesday, November 22, 2023 2:09 PM > To: devel@edk2.groups.io > Cc: Xie, Yuanhao ; Ni, Ray ; > Dong, Eric ; Kumar, Rahul R > ; Tom Lendacky ; > Laszlo Ersek > Subject

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

2023-11-22 Thread Ni, Ray
> > - if (!GetMicrocodePatchInfoFromHob ( > - &CpuMpData->MicrocodePatchAddress, > - &CpuMpData->MicrocodePatchRegionSize > - )) > - { Can you delete the GetMicrocodePathInfoFromHob() in this patch instead of the 3rd patch? -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You

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

2023-11-22 Thread Ni, Ray
> - MicrocodeDetect (CpuMpData, ProcessorNumber); > - // > - // Sync BSP's MTRR table to AP > + // Synchronizing the MTRR table to the AP is always essential. > + // During the DXE phase, it cannot be omitted like loading microcode, > + // as the PEI and DXE may be in different bit modes.

Re: [edk2-devel] [PATCH v3 03/11] MdePkg/Acpi65: Add _PSD/_CPC/State Coordination Types macros

2023-11-21 Thread Ni, Ray
These ACPI methods were there since long ago. Why do you only add the related definitions to 65.h? > Cf. s8.3 Power, Performance, and Throttling State Dependencies What does "Cf. s8.3" mean? Thanks, Ray > -Original Message- > From: devel@edk2.groups.io On Behalf Of > PierreGondois > Sen

Re: [edk2-devel] [Patch V2 1/3] UefiCpuPkg/MpInitLib:Repeat WakeUpAp of loading microcode,Syncing MTRR.

2023-11-20 Thread Ni, Ray
Reviewed-by: Ray Ni Thanks, Ray > -Original Message- > From: Xie, Yuanhao > Sent: Tuesday, November 21, 2023 3:40 PM > To: devel@edk2.groups.io > Cc: Xie, Yuanhao ; Ni, Ray ; > Dong, Eric ; Kumar, Rahul R > ; Tom Lendacky ; > Laszlo Ersek > Subject

Re: [edk2-devel] [PATCH v6 6/6] MdePkg: Use macro CR4_CET_BIT to replace hard code value.

2023-11-20 Thread Ni, Ray
Reviewed-by: Ray Ni Thanks, Ray > -Original Message- > From: Sheng, W > Sent: Tuesday, November 21, 2023 3:03 PM > To: devel@edk2.groups.io > Cc: Dong, Eric ; Ni, Ray ; Laszlo > Ersek ; Wu, Jiaxin ; Tan, Dun > > Subject: [PATCH v6 6/6] MdePkg: Use macro CR4

Re: [edk2-devel] [PATCH v6 5/6] UefiCpuPkg: Backup and Restore MSR IA32_U_CET in SMI handler.

2023-11-20 Thread Ni, Ray
Reviewed-by: Ray Ni Thanks, Ray > -Original Message- > From: Sheng, W > Sent: Tuesday, November 21, 2023 3:03 PM > To: devel@edk2.groups.io > Cc: Dong, Eric ; Ni, Ray ; Laszlo > Ersek ; Wu, Jiaxin ; Tan, Dun > > Subject: [PATCH v6 5/6] UefiCpuPkg: Backup and R

Re: [edk2-devel] [PATCH v6 4/6] UefiCpuPkg: Only change CR4.CET bit for enable and disable CET.

2023-11-20 Thread Ni, Ray
Reviewed-by: Ray Ni Thanks, Ray > -Original Message- > From: Sheng, W > Sent: Tuesday, November 21, 2023 3:03 PM > To: devel@edk2.groups.io > Cc: Dong, Eric ; Ni, Ray ; Laszlo > Ersek ; Wu, Jiaxin ; Tan, Dun > > Subject: [PATCH v6 4/6] UefiCpuPkg: Only change CR

Re: [edk2-devel] [PATCH v6 3/6] UefiCpuPkg: Use CET macro definitions in Cet.inc for SmiEntry.nasm files.

2023-11-20 Thread Ni, Ray
Reviewed-by: Ray Ni Thanks, Ray > -Original Message- > From: Sheng, W > Sent: Tuesday, November 21, 2023 3:03 PM > To: devel@edk2.groups.io > Cc: Dong, Eric ; Ni, Ray ; Laszlo > Ersek ; Wu, Jiaxin ; Tan, Dun > > Subject: [PATCH v6 3/6] UefiCpuPkg: Use CET macr

Re: [edk2-devel] [PATCH v6 2/6] UefiCpuPkg: Use macro CR4_CET_BIT to replace hard code value in Cet.nasm.

2023-11-20 Thread Ni, Ray
Reviewed-by: Ray Ni Thanks, Ray > -Original Message- > From: Sheng, W > Sent: Tuesday, November 21, 2023 3:03 PM > To: devel@edk2.groups.io > Cc: Dong, Eric ; Ni, Ray ; Laszlo > Ersek ; Wu, Jiaxin ; Tan, Dun > > Subject: [PATCH v6 2/6] UefiCpuPkg: Use macr

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

2023-11-20 Thread Ni, Ray
You might need to drop Reviewed-by from Laszlo as the patch content is so different than the reviewed version. Reviewed-by: Ray Ni Thanks, Ray > -Original Message- > From: Sheng, W > Sent: Tuesday, November 21, 2023 3:03 PM > To: devel@edk2.groups.io > Cc: Dong,

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

2023-11-20 Thread Ni, Ray
> --- > MdePkg/Include/Cet.inc | 26 ++ 1. I am not sure adding "Cet.inc" in MdePkg/Include is ok as Cet.inc only contains definitions for x86 CPU. Is it better to add the macros to existing Ia32/Nasm.inc, X64/Nasm.inc? But that would cause duplicated macro definitio

Re: [edk2-devel] [PATCH v2 2/3] UefiCpuPkg/PiSmmCpuDxeSmm: Get processor extended information

2023-11-20 Thread Ni, Ray
Reviewed-by: Ray Ni Thanks, Ray > -Original Message- > From: Wu, Jiaxin > Sent: Wednesday, November 15, 2023 7:16 PM > To: devel@edk2.groups.io > Cc: Laszlo Ersek ; Dong, Eric ; Ni, > Ray ; Kumar, Rahul R ; Gerd > Hoffmann ; Zeng, Star > Subject: [

Re: [edk2-devel] [PATCH v2 1/3] UefiCpuPkg/BaseXApicLib: Fix CPUID_V2_EXTENDED_TOPOLOGY detection

2023-11-20 Thread Ni, Ray
Reviewed-by: Ray Ni Thanks, Ray > -Original Message- > From: Wu, Jiaxin > Sent: Wednesday, November 15, 2023 7:16 PM > To: devel@edk2.groups.io > Cc: Laszlo Ersek ; Dong, Eric ; Ni, > Ray ; Kumar, Rahul R ; Gerd > Hoffmann ; Zeng, Star > Subject: [PATCH v2 1/3]

Re: [edk2-devel] [PATCH] UefiCpuPkg/MpInitLib: Remove the duplicate loading of microcode in DXE.

2023-11-20 Thread Ni, Ray
> + > +if (!GetMicrocodePatchInfoFromHob ( > + &CpuMpData->MicrocodePatchAddress, > + &CpuMpData->MicrocodePatchRegionSize > + )) > +{ > + // > + // The microcode patch information cache HOB does not exist, which > means > + // the microcode patc

Re: [edk2-devel] [Patch V6 1/2] UefiCpuPkg/MpInitLib: Enable execute disable bit.

2023-11-20 Thread Ni, Ray
Reviewed-by: Ray Ni Thanks, Ray > -Original Message- > From: Xie, Yuanhao > Sent: Monday, November 20, 2023 12:55 PM > To: devel@edk2.groups.io > Cc: Xie, Yuanhao ; Laszlo Ersek > ; Dong, Eric ; Ni, Ray > ; Kumar, Rahul R ; Gerd > Hoffmann > Subject: [Patch V

Re: [edk2-devel] [PATCH v1 2/3] EmulatorPkg: Format with Uncrustify 73.0.8

2023-11-19 Thread Ni, Ray
Reviewed-by: Ray Ni Thanks, Ray From: mikub...@linux.microsoft.com Sent: Wednesday, November 15, 2023 4:22 AM To: devel@edk2.groups.io Cc: Andrew Fish ; Ni, Ray Subject: [PATCH v1 2/3] EmulatorPkg: Format with Uncrustify 73.0.8 From: Michael Kubacki Cc

Re: [edk2-devel] [PATCH 3/3] Maintainers.txt: add Laszlo Ersek as a UefiCpuPkg maintainer

2023-11-19 Thread Ni, Ray
: Andrew Fish ; Gerd Hoffmann ; Leif Lindholm ; Kinney, Michael D ; Kumar, Rahul R ; Ni, Ray Subject: [PATCH 3/3] Maintainers.txt: add Laszlo Ersek as a UefiCpuPkg maintainer I intend to assist with the maintenance of the following files and directories: UefiCpuPkg/CpuDxe/ UefiCpuPkg

Re: [edk2-devel] [PATCH v2 3/3] UefiCpuPkg/PiSmmCpuDxeSmm: Use processor extended information

2023-11-19 Thread Ni, Ray
re than 3 layers of scopes. Thanks, Ray From: Laszlo Ersek Sent: Saturday, November 18, 2023 5:05 AM To: devel@edk2.groups.io ; Ni, Ray ; Wu, Jiaxin Cc: Dong, Eric ; Kumar, Rahul R ; Gerd Hoffmann ; Zeng, Star Subject: Re: [edk2-devel] [PATCH v2 3/3] UefiCpuPkg

Re: [edk2-devel] [Patch V4] UefiCpuPkg/MpInitLib: Enable execute disable bit.

2023-11-16 Thread Ni, Ray
ngeInfo.CpuInfo * InitFlag * SevEsIsEnabled * SevSnpIsEnabled * GhcbBase So, I prefer to keep the current change proposed in Yuanhao's patch. Thanks, Ray From: Laszlo Ersek Sent: Tuesday, November 14, 2023 2:02 AM To: devel@edk2.groups.io ; Xie, Yuanhao Cc: Dong, E

Re: [edk2-devel] [PATCH v2 3/3] UefiCpuPkg/PiSmmCpuDxeSmm: Use processor extended information

2023-11-15 Thread Ni, Ray
: Laszlo Ersek ; Dong, Eric ; Ni, Ray ; Kumar, Rahul R ; Gerd Hoffmann ; Zeng, Star Subject: [PATCH v2 3/3] UefiCpuPkg/PiSmmCpuDxeSmm: Use processor extended information This patch changes to use the processor extended information, which can reflect the value from CPUID leaf 1FH. The reasons are

Re: [edk2-devel] [PATCH v2 1/3] UefiCpuPkg/BaseXApicLib: Fix CPUID_V2_EXTENDED_TOPOLOGY detection

2023-11-15 Thread Ni, Ray
Reviewed-by: Ray Ni Thanks, Ray From: Wu, Jiaxin Sent: Wednesday, November 15, 2023 7:15 PM To: devel@edk2.groups.io Cc: Laszlo Ersek ; Dong, Eric ; Ni, Ray ; Kumar, Rahul R ; Gerd Hoffmann ; Zeng, Star Subject: [PATCH v2 1/3] UefiCpuPkg/BaseXApicLib: Fix

Re: [edk2-devel] [PATCH v4 1/5] UefiCpuPkg: Add macro definitions for CET feature for NASM files.

2023-11-14 Thread Ni, Ray
If only CpuSmm driver consumes these macros, can we move the macro definitions into CpuSmm driver folder? Thanks, Ray From: Sheng, W Sent: Monday, November 13, 2023 2:22 PM To: devel@edk2.groups.io Cc: Dong, Eric ; Ni, Ray ; Laszlo Ersek ; Wu, Jiaxin ; Tan

[edk2-devel] [PATCH] IntelFsp2Pkg/FspMultiPhaseLib: Remove EFIAPI for local function

2023-11-12 Thread Ni, Ray
FspMultiPhaseWorker() is a local function that's called from FspMultiPhaseMemInitApiHandler() and FspMultiPhaseSiInitApiHandlerV2(). Remove "EFIAPI" from its function header. Signed-off-by: Ray Ni Cc: Chasel Chiu Cc: Nate DeSimone Cc: Duggapu Chinni B Cc: Ray Han Lim Ng Cc: Star Zeng Cc: Te

Re: [edk2-devel] [PATCH v1 3/7] UefiCpuPkg: Adds SmmCpuSyncLib library class

2023-11-12 Thread Ni, Ray
I provided 4 comments in below, starting with "[Ray". Sorry for the poor new Outlook that I am not able to put ">" in the original email. Thanks, Ray (1) I agree that the internals of the context should be hidden, but (VOID*) is not the right way. Instead, plea

Re: [edk2-devel] [PATCH 0/3] Move gMpInformationHobGuid from StandaloneMmPkg to UefiCpuPkg.

2023-11-12 Thread Ni, Ray
Reviewed-by: Ray Ni Thanks, Ray From: devel@edk2.groups.io on behalf of duntan Sent: Thursday, November 9, 2023 10:51 AM To: devel@edk2.groups.io Subject: [edk2-devel] [PATCH 0/3] Move gMpInformationHobGuid from StandaloneMmPkg to UefiCpuPkg. Move gMpInforma

Re: [edk2-devel] [PATCH v4] UefiCpuPkg/PiSmmCpuDxeSmm: Fix CP Exception when CET enable

2023-11-10 Thread Ni, Ray
merged. Thanks, Ray From: Wu, Jiaxin Sent: Friday, November 10, 2023 8:43 AM To: Kinney, Michael D ; Laszlo Ersek ; devel@edk2.groups.io ; Gao, Liming Cc: Dong, Eric ; Ni, Ray ; Zeng, Star ; Gerd Hoffmann ; Kumar, Rahul R Subject: RE: [edk2-devel] [PATCH v4

Re: [edk2-devel] [PATCH 0/2] Remove string IO instruction in BaseIoLibIntrinsic.inf

2023-11-08 Thread Ni, Ray
Reviewed-by: Ray Ni Thanks for providing the alternative solution that avoids impacting OVMF boot performance. Thanks, Ray From: devel@edk2.groups.io on behalf of duntan Sent: Thursday, November 9, 2023 10:49 AM To: devel@edk2.groups.io Subject: [edk2-devel]

Re: [edk2-devel] [PATCH v4] UefiCpuPkg/PiSmmCpuDxeSmm: Fix CP Exception when CET enable

2023-11-08 Thread Ni, Ray
Reviewed-by: Ray Ni Thanks, Ray From: Wu, Jiaxin Sent: Tuesday, November 7, 2023 9:24 AM To: devel@edk2.groups.io Cc: Dong, Eric ; Ni, Ray ; Zeng, Star ; Gerd Hoffmann ; Kumar, Rahul R ; Laszlo Ersek Subject: [PATCH v4] UefiCpuPkg/PiSmmCpuDxeSmm: Fix CP

Re: [edk2-devel] [PATCH 1/1] MdeModulePkg: Optimize CoreInstallMultipleProtocolInterfaces

2023-11-08 Thread Ni, Ray
Reviewed-by: Ray Ni Thanks, Ray From: Jin, Zhi Sent: Thursday, November 9, 2023 9:46 AM To: devel@edk2.groups.io Cc: Jin, Zhi ; Wang, Jian J ; Gao, Liming ; Bi, Dandan ; Ni, Ray Subject: [PATCH 1/1] MdeModulePkg: Optimize

Re: [edk2-devel] [PATCH v2 2/5] MdeModulePkg/Bus/Pci/PciBusDxe: Fix MISSING_BREAK Coverity issues

2023-11-07 Thread Ni, Ray
Reviewed-by: Ray Ni Thanks, Ray From: Ranbir Singh Sent: Tuesday, November 7, 2023 2:19 PM To: devel@edk2.groups.io ; rsi...@ventanamicro.com Cc: Ni, Ray ; Veeresh Sangolli Subject: [PATCH v2 2/5] MdeModulePkg/Bus/Pci/PciBusDxe: Fix MISSING_BREAK Coverity

Re: [edk2-devel] [PATCH v3] UefiCpuPkg/PiSmmCpuDxeSmm: Fix CP Exception when CET enable

2023-11-06 Thread Ni, Ray
ReadonlyPageWriteProtect(). Thanks, Ray From: Wu, Jiaxin Sent: Monday, November 6, 2023 10:46 AM To: devel@edk2.groups.io Cc: Dong, Eric ; Ni, Ray ; Zeng, Star ; Gerd Hoffmann ; Kumar, Rahul R ; Laszlo Ersek Subject: [PATCH v3] UefiCpuPkg/PiSmmCpuDxeSmm: Fix CP Exception

Re: [edk2-devel] [PATCH v5 01/28] MdeModulePkg: Add DXE and MM Memory Protection Settings Definitions

2023-11-02 Thread Ni, Ray
I don't quite understand the lib interfaces. For GetMemoryProtectionsLib, it only exposes PopulateMpsGlobal(). The comments say it's called by lib constructor. Then can we avoid adding the API? We could just declare it as the lib constructor in INF. For SetMemoryProtectionsLib, it introduces a c

Re: [edk2-devel] [PATCH v1 00/29] Enable LoongArch virtual machine in edk2

2023-11-02 Thread Ni, Ray
:03 AM To: devel@edk2.groups.io Cc: Kinney, Michael D ; Gao, Liming ; Liu, Zhiguang ; Dong, Eric ; Ni, Ray ; Kumar, Rahul R ; Gerd Hoffmann ; Leif Lindholm ; Ard Biesheuvel ; Abner Chang ; Daniel Schaefer ; Sami Mujawar ; Yao, Jiewen ; Justen, Jordan L Subject: [PATCH v1 00/29] Enable

[edk2-devel] [PATCH] IntelFsp2Pkg/PatchFv: Fix syntax issue in markdown manual

2023-11-01 Thread Ni, Ray
According to the markdown language syntax, headings should be after number signs (#). The number of number signs correspond to the heading level. But current PatchFvUserManual.md doesn't insert a space between the number signs and the heading title, resulting the markdown file is not rendered well

Re: [edk2-devel] CpuDeadLoop() is optimized by compiler

2023-10-31 Thread Ni, Ray
Mike, This is not friendly for XIP code. With XIP code, the global variable is not able to be updated as it sits in read-only SPI flash. Thanks, Ray From: Kinney, Michael D Sent: Tuesday, October 31, 2023 11:37 AM To: Ni, Ray ; Andrew (EFI) Fish ; edk2-devel

Re: [edk2-devel] [PATCH] IntelFsp2Pkg/SwitchStack: Reserve 32B when calling C function in 64bit

2023-10-31 Thread Ni, Ray
Sorry, I copied the maintainers from Maintainers.txt but forgot to change all M/R to "Cc". That caused not all the maintainers/reviewers are CCed. I will fix the commit message before merging. Thanks, Ray From: devel@edk2.groups.io on behalf of Ni,

[edk2-devel] [PATCH] IntelFsp2Pkg/SwitchStack: Reserve 32B when calling C function in 64bit

2023-10-31 Thread Ni, Ray
When FSP runs in API mode, it saves the IDTR in its own stack then switches to bootloader's stack before it returns from FspMemoryInit. Next time when the bootloader calls TempRamExit, FSP switches to its own stack and restores IDTR from its stack saved earlier. However, due to a bug in BaseFspSwi

Re: [edk2-devel] CpuDeadLoop() is optimized by compiler

2023-10-30 Thread Ni, Ray
It's been a while. Is there any better solution? Can we go with assembly solution? Thanks, Ray From: Andrew (EFI) Fish Sent: Saturday, May 20, 2023 12:31 AM To: edk2-devel-groups-io ; Rebecca Cran Cc: Ni, Ray ; Kinney, Michael D Subject: Re: [edk2-

Re: [edk2-devel] [PATCH 1/1] Maintainers.txt: Update maintainers list

2023-10-29 Thread Ni, Ray
; Gao, Liming ; Liu, Zhiguang ; Dong, Eric ; Ni, Ray ; Kumar, Rahul R ; Gerd Hoffmann Subject: RE: [PATCH 1/1] Maintainers.txt: Update maintainers list [AMD Official Use Only - General] Acked-by: Abdul Lateef Attar -Original Message- From: Chang, Abner Sent: Thursday, October 19, 2023

Re: [edk2-devel] [PATCH 1/7] MdePkg: Create TdxLibNull.inf instance

2023-10-26 Thread Ni, Ray
Please ignore my comments. That's an existing file for IA32 build. Your patch adds a NULL instance for all archs. Thanks, Ray From: Ni, Ray Sent: Friday, October 27, 2023 1:54 PM To: Tan, Dun ; devel@edk2.groups.io Cc: Kinney, Michael D ; Gao, Liming

Re: [edk2-devel] [PATCH 1/7] MdePkg: Create TdxLibNull.inf instance

2023-10-26 Thread Ni, Ray
TdxLibNull.c is missing in the patch. Thanks, Ray From: Tan, Dun Sent: Friday, October 27, 2023 1:42 PM To: devel@edk2.groups.io Cc: Kinney, Michael D ; Gao, Liming ; Liu, Zhiguang ; Ni, Ray Subject: [PATCH 1/7] MdePkg: Create TdxLibNull.inf instance Create

Re: [edk2-devel] question about cxl device enumeration in pci bus driver

2023-10-26 Thread Ni, Ray
I am not sure which driver is responsible for producing the ACPI tables. + Foster Thanks, Ray From: Yoshinoya Sent: Friday, October 27, 2023 9:29 AM To: devel@edk2.groups.io Cc: jonathan.came...@huawei.com ; Laszlo Ersek ; kra...@redhat.com ; Ni, Ray

Re: [edk2-devel] [PATCH v2 0/1] StandaloneMmCore finds drivers in uncompressed inner fv.

2023-10-26 Thread Ni, Ray
@edk2.groups.io Cc: Xu, Wei6 ; Laszlo Ersek ; Ard Biesheuvel ; Sami Mujawar ; Ni, Ray Subject: [PATCH v2 0/1] StandaloneMmCore finds drivers in uncompressed inner fv. V1: This patch is to fix the issue that StandaloneMmCore fails to detect uncompressed inner FV. PR: https://github.com/tianocore

Re: [edk2-devel] question about cxl device enumeration in pci bus driver

2023-10-25 Thread Ni, Ray
I think CXL device enumeration doesn't require extra logic in today's pci bus driver. But I might be wrong. Can you list any missing logic in pci bus driver? Thanks, Ray From: devel@edk2.groups.io on behalf of Yoshinoya Sent: Wednesday, October 25, 2023 2:01 P

Re: [edk2-devel] [Patch V3] UefiCpuPkg/CpuDxe: Eliminate the unused variable.

2023-10-12 Thread Ni, Ray
Reviewed-by: Ray Ni Thanks, Ray From: Xie, Yuanhao Sent: Thursday, October 12, 2023 10:22 AM To: devel@edk2.groups.io Cc: Ni, Ray ; Xie, Yuanhao ; Dong, Eric ; Kumar, Rahul R ; Gerd Hoffmann Subject: [Patch V3] UefiCpuPkg/CpuDxe: Eliminate the unused

Re: [edk2-devel] [Patch V2] UefiCpuPkg/CpuDxe: Eliminate the unused variable.

2023-10-11 Thread Ni, Ray
Reviewed-by: Ray Ni Thanks, Ray From: Xie, Yuanhao Sent: Wednesday, October 11, 2023 5:08 PM To: devel@edk2.groups.io Cc: Xie, Yuanhao ; Dong, Eric ; Kumar, Rahul R ; Gerd Hoffmann ; Ni, Ray Subject: [Patch V2] UefiCpuPkg/CpuDxe: Eliminate the unused

Re: [edk2-devel] [PATCH 00/16] MtrrLib modules and Unit test Enhancement

2023-10-01 Thread Ni, Ray
Reviewed-by: Ray Ni Thanks, Ray From: devel@edk2.groups.io on behalf of Yuanhao Xie Sent: Wednesday, September 13, 2023 12:26 PM To: devel@edk2.groups.io Subject: [edk2-devel] [PATCH 00/16] MtrrLib modules and Unit test Enhancement Update MtrrLib modules to h

Re: [edk2-devel] [PATCH v1] EmulatorPkg: Fix Source Level Debug on Windows

2023-09-28 Thread Ni, Ray
Thank you Nate! Reviewed-by: Ray Ni -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#109182): https://edk2.groups.io/g/devel/message/109182 Mute This Topic: https://groups.io/mt/101531560/21656 Group Owner: devel+ow...@edk2.groups.io Unsub

Re: [edk2-devel] [PATCH v1] EmulatorPkg: Fix Source Level Debug on Windows

2023-09-26 Thread Ni, Ray
on is based on the current LoadLibrary() implementation. But can you please explicitly mention that assumption in comments? Thanks, Ray From: Desimone, Nathaniel L Sent: Saturday, September 23, 2023 6:49 AM To: devel@edk2.groups.io Cc: Andrew Fish ; Ni, Ray ;

[edk2-devel] Regarding StandaloneMmPkg/Include/Guid/MpInformation.h

2023-09-05 Thread Ni, Ray
All, StandaloneMmPkg/Include/Guid/MpInformation.h contains the MP_INFORMATION_HOB_DATA HOB definition. This HOB is used for transfering MP information collected in non-SMM phase to standalone MM environment. #pragma pack(1) typedef struct { UINT64 NumberOfProcessors; U

Re: [edk2-devel] [PATCH v1 2/2] StandaloneMmPkg: Fix HOB space and heap space conflicted issue

2023-09-05 Thread Ni, Ray
I am a bit confused. The HOB list in standalone MM is read-only. Why could any module call BuildGuidHob() to modify the HOB. I saw Oliver mentioned something about StMM. I don't know what that is. But it seems that's ARM specific. Then, I don't think it's proper to modify code here for a speci

Re: [edk2-devel] [Patch V2 1/5] MdeModulePkg: add MpService2Ppi field in SMM_S3_RESUME_STATE

2023-09-05 Thread Ni, Ray
Reviewed-by: Ray Ni Thanks, Ray From: Tan, Dun Sent: Wednesday, September 6, 2023 11:22 AM To: devel@edk2.groups.io ; Tan, Dun Cc: Ni, Ray ; Wang, Jian J ; Gao, Liming Subject: RE: [edk2-devel] [Patch V2 1/5] MdeModulePkg: add MpService2Ppi field in

Re: [edk2-devel] [Patch V3 5/5] UefiCpuPkg/PiSmmCpuDxe: use MpService2Ppi to wakeup AP in s3

2023-09-05 Thread Ni, Ray
Reviewed-by: Ray Ni Thanks, Ray From: Tan, Dun Sent: Wednesday, August 30, 2023 3:34 PM To: devel@edk2.groups.io Cc: Dong, Eric ; Ni, Ray ; Kumar, Rahul R Subject: [Patch V3 5/5] UefiCpuPkg/PiSmmCpuDxe: use MpService2Ppi to wakeup AP in s3 Use

Re: [edk2-devel] [Patch V3 4/5] UefiCpuPkg/PiSmmCpuDxe: code refinement for CpuS3.c

2023-09-05 Thread Ni, Ray
Reviewed-by: Ray Ni Thanks, Ray From: Tan, Dun Sent: Wednesday, August 30, 2023 3:34 PM To: devel@edk2.groups.io Cc: Dong, Eric ; Ni, Ray ; Kumar, Rahul R Subject: [Patch V3 4/5] UefiCpuPkg/PiSmmCpuDxe: code refinement for CpuS3.c This commit is code logic

Re: [edk2-devel] [Patch V2 3/5] UefiCpuPkg/S3Resume2Pei: assert for invalid excution mode combo

2023-09-05 Thread Ni, Ray
Reviewed-by: Ray Ni Thanks, Ray From: Tan, Dun Sent: Monday, August 21, 2023 10:09 AM To: devel@edk2.groups.io Cc: Dong, Eric ; Ni, Ray ; Kumar, Rahul R Subject: [Patch V2 3/5] UefiCpuPkg/S3Resume2Pei: assert for invalid excution mode combo Add assert for

Re: [edk2-devel] [Patch V2 2/5] UefiCpuPkg/S3Resume2Pei: prepare MpService2Ppi in S3Resume

2023-09-05 Thread Ni, Ray
Reviewed-by: Ray Ni Thanks, Ray From: Tan, Dun Sent: Monday, August 21, 2023 10:09 AM To: devel@edk2.groups.io Cc: Dong, Eric ; Ni, Ray ; Kumar, Rahul R Subject: [Patch V2 2/5] UefiCpuPkg/S3Resume2Pei: prepare MpService2Ppi in S3Resume Prepare MpService2Ppi

Re: [edk2-devel] [PATCH v3] MdeModulePkg: AllocatePages for TranslateBmpToGopBlt

2023-08-31 Thread Ni, Ray
29 PM To: devel@edk2.groups.io Cc: Ck, Chitralekha ; Ni, Ray ; Gao, Zhichao ; S, Ashraf Ali ; Duggapu, Chinni B Subject: [PATCH v3] MdeModulePkg: AllocatePages for TranslateBmpToGopBlt https://bugzilla.tianocore.org/show_bug.cgi?id=4507 AllocatePool limits to allocate memory of 64 KB at most i

Re: [edk2-devel] [Patch V2] MdeModulePkg/DxeCorePerformanceLib:fix smm perf issue

2023-08-30 Thread Ni, Ray
Reviewed-by: Ray Ni Thanks, Ray From: Tan, Dun Sent: Wednesday, August 30, 2023 3:35 PM To: devel@edk2.groups.io Cc: Wang, Jian J ; Gao, Liming ; Ni, Ray Subject: [Patch V2] MdeModulePkg/DxeCorePerformanceLib:fix smm perf issue Fix smm perf issue in

Re: [edk2-devel] [PATCH] MdeModulePkg/DxeCorePerformanceLib:fix smm perf issue

2023-08-28 Thread Ni, Ray
2 comments as follows, starting with "[ray" @@ -73,6 +73,7 @@ UINT8*mPerformancePointer = NULL; UINT8*mBootRecordBuffer= NULL; BOOLEAN mLockInsertRecord = FALSE; CHAR8*mDevicePathString= NULL; +UINTNmBootRecordOffset = 0; [ray.1] How about mSmmBootRecordOffset

Re: [edk2-devel] [PATCH v2] MdeModulePkg/SetupBrowser: Load storage via GetVariable for EfiVarStore

2023-08-03 Thread Ni, Ray
The specific ask is: does the change cause any flexibility lost in HiiConfigAccess implementation? E.g.: something was possible to be done in HiiConfigAccess implementation even for efivarstore but cannot be done with this change. > -Original Message- > From: Ni, Ray > Sen

Re: [edk2-devel] [PATCH v2] MdeModulePkg/SetupBrowser: Load storage via GetVariable for EfiVarStore

2023-08-03 Thread Ni, Ray
+ @Rothman, Michael A who designed UEFI HII. The patch moves the variable access from implementation of ConfigAccess protocol to Setup driver for efivarstore. Is it a valid assumption? Thanks, Ray > -Original Message- > From: devel@edk2.groups.io On Behalf Of Dandan > Bi > Sent: Thursd

Re: [edk2-devel] [PATCH V1 1/1] UefiCpuPkg/ResetVector: Cache Disable should not be set by default in CR0

2023-08-03 Thread Ni, Ray
The patch resolves an issue in Boot Guard enabled system that NEM is already enabled by Boot Guard, disabling cache evicts all cache content which is unexpected. Reviewed-by: Ray Ni > -Original Message- > From: devel@edk2.groups.io On Behalf Of Ni, Ray > Sent: Wednesday

Re: [edk2-devel] [PATCH v2] MdeModulePkg: AllocatePages for TranslateBmpToGopBlt

2023-08-02 Thread Ni, Ray
Please don't mix the two changes in one patch. The two changes are: 1. change to use __func__ 2. AllocatePages > -Original Message- > From: Ck, Chitralekha > Sent: Thursday, August 3, 2023 1:00 PM > To: devel@edk2.groups.io > Cc: Ck, Chitralekha ; Ni, Ray ; > Gao

Re: [edk2-devel] [PATCH 4/5] UefiCpuPkg/PiSmmCpuDxe: code refinement for CpuS3.c

2023-07-28 Thread Ni, Ray
-Original Message- > From: devel@edk2.groups.io On Behalf Of duntan > Sent: Thursday, July 27, 2023 10:21 AM > To: devel@edk2.groups.io > Cc: Dong, Eric ; Ni, Ray ; Kumar, Rahul > R > Subject: [edk2-devel] [PATCH 4/5] UefiCpuPkg/PiSmmCpuDxe: code refinement > for CpuS3.c

Re: [edk2-devel] [PATCH 3/5] UefiCpuPkg/S3Resume2Pei: assert for invalid excution mode combo

2023-07-27 Thread Ni, Ray
Reviewed-by: Ray Ni > -Original Message- > From: Tan, Dun > Sent: Thursday, July 27, 2023 10:21 AM > To: devel@edk2.groups.io > Cc: Dong, Eric ; Ni, Ray ; Kumar, Rahul > R > Subject: [PATCH 3/5] UefiCpuPkg/S3Resume2Pei: assert for invalid excution mode > c

Re: [edk2-devel] [PATCH 2/5] UefiCpuPkg/S3Resume2Pei: prepare MpService2Ppi in S3Resume

2023-07-27 Thread Ni, Ray
> + DEBUG ((DEBUG_INFO, "SMM S3 MpService2Ppi Point = %x\n", > SmmS3ResumeState->MpService2Ppi)); Can you please check PrintLib implementation that "%x" is suitable for a 64bit value? -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#1

Re: [edk2-devel] [PATCH 1/5] MdeModulePkg: add MpService2Ppi field in SMM_S3_RESUME_STATE

2023-07-27 Thread Ni, Ray
Return*** fields as they are a group of fields initialized in S3 boot path? > -Original Message- > From: Tan, Dun > Sent: Thursday, July 27, 2023 10:21 AM > To: devel@edk2.groups.io > Cc: Ni, Ray ; Wang, Jian J ; Gao, > Liming > Subject: [PATCH 1/5] MdeModulePkg: ad

Re: [edk2-devel] [PATCH] Intel/MinPlatformPkg:Add MmSaveStateLib required by PiSmmCpuDxe

2023-07-26 Thread Ni, Ray
Reviewed-by: Ray Ni > -Original Message- > From: Tan, Dun > Sent: Thursday, July 27, 2023 10:22 AM > To: devel@edk2.groups.io > Cc: Ni, Ray ; Chiu, Chasel ; > Desimone, Nathaniel L ; Oram, Isaac W > ; Gao, Liming ; Dong, > Eric > Subject: [PATCH] Intel/MinPla

Re: [edk2-devel] [PATCH] SimicsOpenBoardPkg: Set PcdDxeIplSwitchToLongMode to FALSE

2023-07-26 Thread Ni, Ray
Reviewed-by: Ray Ni > -Original Message- > From: Tan, Dun > Sent: Thursday, July 27, 2023 10:23 AM > To: devel@edk2.groups.io > Cc: Ni, Ray ; Desimone, Nathaniel L > ; Zhiguang Liu > Subject: [PATCH] SimicsOpenBoardPkg: Set PcdDxeIplSwitchToLongMod

Re: [edk2-devel] [PATCH V1 1/1] UefiCpuPkg/ResetVector: Cache Disable should not be set by default in CR0

2023-07-26 Thread Ni, Ray
? Thanks, Ray > -Original Message- > From: xueshengfeng > Sent: Wednesday, July 26, 2023 5:48 PM > To: devel@edk2.groups.io; Dong, Eric ; Ni, Ray > ; Kumar, Rahul R ; > kra...@redhat.com; De, Debkumar ; West, Catharine > > Cc: Wu, MingliangX ; Wu > Subject

Re: [edk2-devel] [Patch V3] UefiCpuPkg: Decouple the SEV-ES functionality.

2023-07-26 Thread Ni, Ray
Reviewed-by: Ray Ni @Tom Lendacky, can you please comment? > -Original Message- > From: Xie, Yuanhao > Sent: Wednesday, July 26, 2023 3:51 PM > To: devel@edk2.groups.io > Cc: Dong, Eric ; Kumar, Rahul R > ; Tom Lendacky ; Ni, > Ray ; Xie, Yuanhao > Subjec

Re: [edk2-devel] [Patch 1/2] EmulatorPkg/Win/Host: Fix RUNTIME_FUNCTION redefinition error

2023-07-23 Thread Ni, Ray
Reviewed-by: Ray Ni > -Original Message- > From: Kinney, Michael D > Sent: Saturday, July 22, 2023 9:06 AM > To: devel@edk2.groups.io > Cc: Gerd Hoffmann ; Rebecca Cran ; > Andrew Fish ; Ni, Ray > Subject: [Patch 1/2] EmulatorPkg/Win/Host: Fix RUNTIME_FUNCTION

Re: [edk2-devel] [Patch V3 4/4] UefiCpuPkg:Wake up APs after power-up or RESET through SIPI.

2023-07-20 Thread Ni, Ray
Reviewed-by: Ray Ni > -Original Message- > From: Xie, Yuanhao > Sent: Thursday, July 20, 2023 3:08 PM > To: devel@edk2.groups.io > Cc: Dong, Guo ; Ni, Ray ; Rhodes, Sean > ; Lu, James ; Guo, Gua > ; Xie, Yuanhao > Subject: [Patch V3 4/4] UefiCpuPkg:Wake up APs

Re: [edk2-devel] [Patch V3 1/4] UefiCpuPkg: Add SendStartupIpiAllExcludingSelf

2023-07-20 Thread Ni, Ray
Reviewed-by: Ray Ni > -Original Message- > From: Xie, Yuanhao > Sent: Thursday, July 20, 2023 3:08 PM > To: devel@edk2.groups.io > Cc: Xie, Yuanhao ; Dong, Guo ; > Ni, Ray ; Rhodes, Sean ; Lu, James > ; Guo, Gua > Subject: [Patch V3 1/4] UefiCpuPkg: Add SendSt

Re: [edk2-devel] [Patch V3 2/4] UefiCpuPkg: Add PcdFirstTimeWakeUpAPsBySipi

2023-07-20 Thread Ni, Ray
Reviewed-by: Ray Ni > -Original Message- > From: Xie, Yuanhao > Sent: Thursday, July 20, 2023 3:08 PM > To: devel@edk2.groups.io > Cc: Dong, Guo ; Ni, Ray ; Rhodes, Sean > ; Lu, James ; Guo, Gua > ; Xie, Yuanhao > Subject: [Patch V3 2/4] UefiCpuPkg: Add Pcd

Re: [edk2-devel] [PATCH v2 0/9] Add ImagePropertiesRecordLib and Fix MAT Bugs

2023-07-20 Thread Ni, Ray
> -Original Message- > From: devel@edk2.groups.io On Behalf Of Taylor Beebe > Sent: Friday, July 21, 2023 2:40 AM > To: devel@edk2.groups.io; Ni, Ray > Cc: Andrew Fish ; Ard Biesheuvel > ; Bi, Dandan ; Dong, Eric > ; Gerd Hoffmann ; Dong, Guo > ; Guo, Gua ; Lu

Re: [edk2-devel] [PATCH v2 0/9] Add ImagePropertiesRecordLib and Fix MAT Bugs

2023-07-19 Thread Ni, Ray
e > Sent: Thursday, July 20, 2023 8:06 AM > To: devel@edk2.groups.io > Cc: Andrew Fish ; Ard Biesheuvel > ; Bi, Dandan ; Dong, Eric > ; Gerd Hoffmann ; Dong, Guo > ; Guo, Gua ; Lu, James > ; Wang, Jian J ; Yao, Jiewen > ; Justen, Jordan L ; Leif > Lindholm ; Gao, Liming

Re: [edk2-devel] [PATCH 2/4] UefiCpuPkg: Add PcdFirstTimeWakeUpAPsBySipi

2023-07-19 Thread Ni, Ray
Reviewed-by: Ray Ni > -Original Message- > From: Xie, Yuanhao > Sent: Wednesday, July 19, 2023 3:45 PM > To: devel@edk2.groups.io > Cc: Dong, Guo ; Ni, Ray ; Rhodes, Sean > ; Lu, James ; Guo, Gua > ; Xie, Yuanhao > Subject: [PATCH 2/4] UefiCpuPkg: Add Pcd

Re: [edk2-devel] [PATCH 1/4] UefiCpuPkg: Add SendStartupIpiAllExcludingSelf

2023-07-19 Thread Ni, Ray
Reviewed-by: Ray Ni > -Original Message- > From: Xie, Yuanhao > Sent: Wednesday, July 19, 2023 3:45 PM > To: devel@edk2.groups.io > Cc: Xie, Yuanhao ; Dong, Guo ; > Ni, Ray ; Rhodes, Sean ; Lu, James > ; Guo, Gua > Subject: [PATCH 1/4] UefiCpuPkg: Add SendSt

Re: [edk2-devel] [PATCH 4/4] UefiCpuPkg:Wake up APs after power-up or RESET through SIPI.

2023-07-19 Thread Ni, Ray
Yuanhao, Can you please mention that the new behavior follows the Intel SDM and include the SDM content in commit message? > -Original Message- > From: devel@edk2.groups.io On Behalf Of Yuanhao Xie > Sent: Wednesday, July 19, 2023 3:45 PM > To: devel@edk2.groups.io > Cc:

Re: [edk2-devel] [PATCH 00/14] Implement Dynamic Memory Protections

2023-07-17 Thread Ni, Ray
Hoffmann ; > Leif Lindholm ; Sami Mujawar > ; Andrew Fish ; Ni, Ray > ; Dong, Eric ; Kumar, Rahul R > ; Dong, Guo ; Rhodes, Sean > ; Lu, James ; Guo, Gua > > Subject: Re: [edk2-devel] [PATCH 00/14] Implement Dynamic Memory > Protections > > On Mon, 17 Jul 2023 at 18

Re: [edk2-devel] [PATCH v1 1/1] UefiCpuPkg: Uses gMmst in MmSaveStateLib

2023-07-17 Thread Ni, Ray
Reviewed-by: Ray Ni > -Original Message- > From: Abdul Lateef Attar > Sent: Wednesday, July 12, 2023 2:24 PM > To: devel@edk2.groups.io > Cc: Abdul Lateef Attar ; Dong, Eric > ; Ni, Ray ; Kumar, Rahul R > ; Gerd Hoffmann ; Abner Chang > > Subject: [PATCH v1

Re: [edk2-devel] Use gMmst from MmServiceTableLib in MmSaveStateLib

2023-07-11 Thread Ni, Ray
k2.groups.io; abdat...@amd.com > Cc: Ni, Ray > Subject: Use gMmst from MmServiceTableLib in MmSaveStateLib > > Hi Abdul, > > In the new MmSaveStateLib created in this patch set, gSmst from > SmmServiceTableLib is used. This causes that only DXE_SMM_DRIVER type > module can con

Re: [edk2-devel] [PATCH 0/4] Remove AP waking vector in Reset Vector

2023-07-09 Thread Ni, Ray
Reviewed-by: Ray Ni > -Original Message- > From: devel@edk2.groups.io On Behalf Of Zhiguang Liu > Sent: Monday, July 10, 2023 11:17 AM > To: devel@edk2.groups.io > Cc: Liu, Zhiguang > Subject: [edk2-devel] [PATCH 0/4] Remove AP waking vector in Reset Vector > > REF: https://bugzilla.ti

Re: [edk2-devel] [PATCH 0/4] Sync BSP's APIC mode to APs in MP init flow

2023-07-07 Thread Ni, Ray
hoose whether to define a "platform-level" PCD to control platform behavior regarding whether to enable X2 APIC in BSP before CPU MP. Comments? Thanks, Ray > -Original Message- > From: devel@edk2.groups.io On Behalf Of Gerd > Hoffmann > Sent: Friday, July 7, 2

[edk2-devel] [PATCH 4/4] UefiCpuPkg/CpuFeatures: Deprecate CPU_FEATURE_X2APIC

2023-07-06 Thread Ni, Ray
Since MpLib supports to sync BSP's initial APIC mode to APs, platform can set BSP to X2 APIC mode before MpLib runs and expect MpLib syncs the X2 APIC mode to all APs. With such capability in MpLib, CpuCommonFeaturesLib's X2 APIC enable logic is dropped for simplificity. Such code removal also rem

[edk2-devel] [PATCH 3/4] UefiCpuPkg/MpInitLib: Skip X2APIC enabling when BSP in X2APIC already

2023-07-06 Thread Ni, Ray
The BSP's APIC mode is synced to all APs in CollectProcessorCount(). So, it's safe to skip the X2 APIC enabling in AutoEnableX2Apic() which runs later when BSP's APIC mode is X2 APIC already. Signed-off-by: Ray Ni Cc: Eric Dong Cc: Rahul Kumar Cc: Gerd Hoffmann --- UefiCpuPkg/Library/MpInitLi

[edk2-devel] [PATCH 2/4] UefiCpuPkg/MpInitLib: Sync BSP's APIC mode to APs in InitConfig path

2023-07-06 Thread Ni, Ray
The change saves the BSP's initial APIC mode and syncs to all APs in first time wakeup. It allows certain platforms to switch to X2 APIC as early as possible and also independent on CpuFeaturePei/Dxe. The platform should switch BSP to X2 APIC mode first before the CpuMpPeim runs. Signed-off-by: Ra

[edk2-devel] [PATCH 0/4] Sync BSP's APIC mode to APs in MP init flow

2023-07-06 Thread Ni, Ray
Ray Ni (4): UefiCpuPkg/MpInitLib: Separate X2APIC enabling to subfunction UefiCpuPkg/MpInitLib: Sync BSP's APIC mode to APs in InitConfig path UefiCpuPkg/MpInitLib: Skip X2APIC enabling when BSP in X2APIC already UefiCpuPkg/CpuFeatures: Deprecate CPU_FEATURE_X2APIC .../Include/Library/Reg

[edk2-devel] [PATCH 1/4] UefiCpuPkg/MpInitLib: Separate X2APIC enabling to subfunction

2023-07-06 Thread Ni, Ray
It's very confusing that auto X2 APIC enabling and APIC ID sorting are all performed inside CollectProcessorCount(). The change is to separate the X2 APIC enabling to AutoEnableX2Apic() and call that from MpInitLibInitialize(). SortApicId() is called from MpInitLibInitialize() as well. Signed-off

<    1   2   3   4   5   6   7   8   9   10   >