[edk2-devel] [PATCH 0/4] Put APs in 64 bit long-mode before booting to OS.

2022-12-18 Thread Yuanhao Xie
Yuanhao Xie (4): UefiCpuPkg: Duplicated AsmRelocateApLoop as AsmRelocateApLoopAmd UefiCpuPkg: Has APs in 64 bit long-mode before booting to OS. OvmfPkg: Add CpuPageTableLib required by MpInitLib. UefiPayloadPkg: Add CpuPageTableLib required by MpInitLib. OvmfPkg/AmdSev/AmdSevX64.dsc

[edk2-devel] [PATCH 1/4] UefiCpuPkg: Duplicated AsmRelocateApLoop as AsmRelocateApLoopAmd

2022-12-18 Thread Yuanhao Xie
AsmRelocateApLoop is replicated for future Intel Logic Extraction, further brings AP into 64-bit, and enables paging. Signed-off-by: Yuanhao Xie --- UefiCpuPkg/Library/MpInitLib/DxeMpLib.c | 52 +++--- UefiCpuPkg/Library/MpInitLib/MpEqu.inc| 2 + UefiCpuPkg/Library/MpInitLib/MpL

[edk2-devel] [PATCH 2/4] UefiCpuPkg: Has APs in 64 bit long-mode before booting to OS.

2022-12-18 Thread Yuanhao Xie
During the finalization of Mp initialization before booting into the OS, depending on whether Mwait is supported or not, AsmRelocateApLoop places Aps in MWAIT-loop or HLT-loop. Since paging is necessary for long mode, the original implementation of moving APs to 32-bit was to disable paging to e

[edk2-devel] [PATCH 3/4] OvmfPkg: Add CpuPageTableLib required by MpInitLib.

2022-12-18 Thread Yuanhao Xie
Add CpuPageTableLib required by MpInitLib in OvmfPkg. Signed-off-by: Yuanhao Xie --- OvmfPkg/AmdSev/AmdSevX64.dsc | 3 ++- OvmfPkg/CloudHv/CloudHvX64.dsc | 1 + OvmfPkg/IntelTdx/IntelTdxX64.dsc | 4 +++- OvmfPkg/Microvm/MicrovmX64.dsc | 3 ++- OvmfPkg/OvmfPkgIa32X64.dsc | 1 + Ovmf

[edk2-devel] [PATCH 4/4] UefiPayloadPkg: Add CpuPageTableLib required by MpInitLib.

2022-12-18 Thread Yuanhao Xie
Add CpuPageTableLib required by MpInitLib in UefiPayloadPkg. Signed-off-by: Yuanhao Xie --- UefiPayloadPkg/UefiPayloadPkg.dsc | 1 + 1 file changed, 1 insertion(+) diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayloadPkg.dsc index 723a50a422..05d53a85d0 100644 --- a/UefiP

[edk2-devel] Event: Tools, CI, Code base construction meeting series - Monday, December 19, 2022 #cal-reminder

2022-12-18 Thread Group Notification
*Reminder: Tools, CI, Code base construction meeting series* *When:* Monday, December 19, 2022 4:30pm to 5:30pm (UTC-08:00) America/Los Angeles *Where:* https://github.com/tianocore/edk2/discussions/2614 View Event ( https://edk2.groups.io/g/devel/viewevent?eventid=1650223 ) *Description:* Tia

Re: [edk2-devel] [PATCH 4/4] UefiPayloadPkg: Add CpuPageTableLib required by MpInitLib.

2022-12-18 Thread Guo, Gua
Reviewed-by: Gua Guo -Original Message- From: devel@edk2.groups.io On Behalf Of Yuanhao Xie Sent: Monday, December 19, 2022 5:43 AM To: devel@edk2.groups.io Subject: [edk2-devel] [PATCH 4/4] UefiPayloadPkg: Add CpuPageTableLib required by MpInitLib. Add CpuPageTableLib required by MpI

Re: [edk2-devel][PATCH v2 1/2] UefiCpuPkg: Supporting S3 in 64bit PEI

2022-12-18 Thread Ni, Ray
Ted, Can you run uncrustify local? I still see TAB in the patch. > -Original Message- > From: Kuo, Ted > Sent: Friday, December 16, 2022 8:46 PM > To: devel@edk2.groups.io > Cc: Ni, Ray ; Liu, Zhiguang ; Chiu, > Chasel ; Desimone, > Nathaniel L ; Zeng, Star > ; S, Ashraf Ali ; > Duggapu

Re: [edk2-devel] [PATCH 1/4] UefiCpuPkg: Duplicated AsmRelocateApLoop as AsmRelocateApLoopAmd

2022-12-18 Thread Ni, Ray
> +movqword [rcx + MP_ASSEMBLY_ADDRESS_MAP.ModeTransitionOffset], > Flat32Start - RendezvousFunnelProcStart I don't think this is needed in your patch. Can you confirm? -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#97536):

Re: [edk2-devel] [PATCH 2/4] UefiCpuPkg: Has APs in 64 bit long-mode before booting to OS.

2022-12-18 Thread Ni, Ray
> + > +PageTable = CreatePageTable ( > + mReservedTopOfApStack, > + ApSafeBufferSize > + ); > + > +mApPageTable = PageTable; 1. Can you directly assign the CreatePageTable() return value to mApPageTable? So that the local "PageTable"

Re: [edk2-devel] [PATCH 3/4] OvmfPkg: Add CpuPageTableLib required by MpInitLib.

2022-12-18 Thread Ni, Ray
Reviewed-by: Ray Ni > -Original Message- > From: devel@edk2.groups.io On Behalf Of Yuanhao Xie > Sent: Monday, December 19, 2022 5:43 AM > To: devel@edk2.groups.io > Subject: [edk2-devel] [PATCH 3/4] OvmfPkg: Add CpuPageTableLib required by > MpInitLib. > > Add CpuPageTableLib required

Re: [edk2-devel] [PATCH 4/4] UefiPayloadPkg: Add CpuPageTableLib required by MpInitLib.

2022-12-18 Thread Ni, Ray
Reviewed-by: Ray Ni > -Original Message- > From: devel@edk2.groups.io On Behalf Of Yuanhao Xie > Sent: Monday, December 19, 2022 5:43 AM > To: devel@edk2.groups.io > Subject: [edk2-devel] [PATCH 4/4] UefiPayloadPkg: Add CpuPageTableLib > required by MpInitLib. > > Add CpuPageTableLib r

Re: [edk2-devel] [PATCH 1/4] UefiCpuPkg: Duplicated AsmRelocateApLoop as AsmRelocateApLoopAmd

2022-12-18 Thread Ni, Ray
> + > +BITS 64 > +AsmRelocateApLoopEndAmd: > \ No newline at end of file Please add a newline at end of file. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#97540): https://edk2.groups.io/g/devel/message/97540 Mute This Topic: https://gr

Re: [edk2-devel] [PATCH v2] UefiPayloadPkg: Move bdsdxe.inf from DXEFV to BDSFV

2022-12-18 Thread Guo, Gua
Reviewed-by: Gua Guo -Original Message- From: Lin, MarsX Sent: Monday, December 19, 2022 11:21 AM To: devel@edk2.groups.io Cc: Lin, MarsX ; Dong, Guo ; Ni, Ray ; Rhodes, Sean ; Lu, James ; Guo, Gua Subject: [PATCH v2] UefiPayloadPkg: Move bdsdxe.inf from DXEFV to BDSFV From: MarsX

Re: [edk2-devel] [PATCH] UefiPayloadPkg: Remove RTC_INDEX/TARGET from UplBuild macro list

2022-12-18 Thread Guo, Gua
Reviewed-by: Gua Guo Please send two commits into one PR. First commit "PcAtChipsetPkg: Move RTC PCD to dynamic PCD" Second commit "UefiPayloadPkg: Move RTC PCD to dynamic PCD" -Original Message- From: Liu, KasimX Sent: Wednesday, December 14, 2022 4:22 PM To: devel@edk2.groups.io

Re: [edk2-devel] [PATCH] UefiPayloadPkg: Move bdsdxe.inf from DXEFV to BDSFV

2022-12-18 Thread Lu, James
Reviewed-by: James Lu -Original Message- From: Lin, MarsX Sent: Monday, December 19, 2022 11:07 AM To: devel@edk2.groups.io Cc: Lin, MarsX ; Dong, Guo ; Ni, Ray ; Rhodes, Sean ; Lu, James ; Guo, Gua Subject: [PATCH] UefiPayloadPkg: Move bdsdxe.inf from DXEFV to BDSFV From: MarsX Lin

Re: [edk2-devel] [PATCH 3/4] OvmfPkg: Add CpuPageTableLib required by MpInitLib.

2022-12-18 Thread Yao, Jiewen
Acked-by: Jiewen Yao > -Original Message- > From: devel@edk2.groups.io On Behalf Of Ni, Ray > Sent: Monday, December 19, 2022 11:23 AM > To: devel@edk2.groups.io; Xie, Yuanhao > Subject: Re: [edk2-devel] [PATCH 3/4] OvmfPkg: Add CpuPageTableLib > required by MpInitLib. > > Reviewed-by:

Re: [edk2-devel] [PATCH 2/3] MdeModulePkg/XhciDxe/Xhci: Don't check for invalid PSIV

2022-12-18 Thread Wu, Hao A
Reviewed-by: Hao A Wu Best Regards, Hao Wu > -Original Message- > From: Sean Rhodes > Sent: Friday, December 16, 2022 4:58 PM > To: devel@edk2.groups.io > Cc: Matt DeVillier ; Wu, Hao A > ; Ni, Ray ; Rhodes, Sean > > Subject: [PATCH 2/3] MdeModulePkg/XhciDxe/Xhci: Don't check for inval

[edk2-devel] [PATCH 1/1] CryptoPkg: Make Protocol Service API backward compatible

2022-12-18 Thread Li, Yi
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4197 Using older Crypto protocol will be allowed. Each function wrapper will be annotated to require a minimum required version of the crypto protocol and assert if called when the version is not compatible. Ths minimum version difined as the ver

Re: [edk2-devel] [PATCH 1/3] UefiCpuPkg/PiSmmCpuDxeSmm: Introduce page table pool mechanism

2022-12-18 Thread Ni, Ray
> + // > + // If page table memory has been marked as RO, mark the new pool pages as > read-only. > + // > + if (mIsReadOnlyPageTable) { > +AsmWriteCr0 (AsmReadCr0 () & ~CR0_WP); > +SmmSetMemoryAttributes ((EFI_PHYSICAL_ADDRESS)(UINTN)Buffer, > EFI_PAGES_TO_SIZE (PoolPages), > EFI_MEM

Re: [edk2-devel] [PATCH 2/3] UefiCpuPkg: Remove unused API in SmmCpuFeaturesLib.h

2022-12-18 Thread Ni, Ray
Reviewed-by: Ray Ni > -Original Message- > From: Tan, Dun > Sent: Friday, December 16, 2022 11:01 AM > To: devel@edk2.groups.io > Cc: Dong, Eric ; Ni, Ray ; Kumar, > Rahul R > Subject: [PATCH 2/3] UefiCpuPkg: Remove unused API in SmmCpuFeaturesLib.h > > Remove SmmCpuFeaturesAllocatePa

Re: [edk2-devel] [PATCH V2] MdeModulePkg/XhciPei: Unlinked XhciPei memory block

2022-12-18 Thread Wu, Hao A
Hello, My take is that unlike in DXE, the UsbHcFreeMemBlock() implementation in PEI phase does not perform freeing the memory. So I think both the solution: * Provided at https://edk2.groups.io/g/devel/topic/92833071#92165, which aligns with EhciPei * Mentioned at the end of your previous reply

Re: [edk2-devel] [PATCH v2] PcAtChipsetPkg: Move RTC PCD to dynamic PCD

2022-12-18 Thread Ni, Ray
The initial goal was to remove dynamic PCD dependency from bootloader. Is that still the goal? If yes, maybe depending on dynamic PCD is not a good idea. Thanks, Ray > -Original Message- > From: Liu, KasimX > Sent: Monday, December 19, 2022 3:40 PM > To: devel@edk2.groups.io > Cc: Liu, K

Re: [edk2-devel] [PATCH 3/3] MdeModulePkg/Bus/Pci/XhciDxe: Check port is compatible before getting PSIV

2022-12-18 Thread Wu, Hao A
Reviewed-by: Hao A Wu I will make minor modification to: * Function description comment * Input parameter name of XhcCheckUsbPortSpeedUsedPsic() to make the declaration (in .H) and the definition (in .C) match. Best Regards, Hao Wu > -Original Message- > From: devel@edk2.groups.io On

Re: [edk2-devel] [PATCH] ShellPkg: Multiple Coverity issues were found from EDK2 ShellPkg

2022-12-18 Thread Kalaivani P via groups.io
Few Coverity changes were done in the following files ShellProtocol.c and UefiShellLib.c. so, will include those changes and send as V3 patch. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#97552): https://edk2.groups.io/g/devel/message/

Re: [edk2-devel] [PATCH 3/3] UefiCpuPkg: Simplify the code to set smm page table as RO

2022-12-18 Thread Ni, Ray
> + PageTableBase = AsmReadCr3 () & PAGING_4K_ADDRESS_MASK_64; > + > + // > + // ConvertMemoryPageAttributes might update mPageTablePool. It's safer to > + // remember original one in advance. > + // > + HeadPool = mPageTablePool; > + Pool = HeadPool; > + do { > +Address = (EFI_PHY