Re: [edk2-devel] [edk2-platforms][PATCH V2 1/1] Platform/Loongson: Set Dxe common page size to 16k

2023-05-31 Thread xianglai
There has been no response for a long time, welcome to give me some suggestions for this patch. On 5/12/23 10:42 AM, xianglai wrote: The loongarch qemu tcg code section is 16K aligned by default. When UEFI keep 4K alignment, the code section and data section of UEFI are loaded into the same pa

Re: [edk2-devel] [PATCH 0/5] ArmVirt: add VirtioSerialDxe

2023-05-31 Thread Gerd Hoffmann
On Fri, May 12, 2023 at 04:23:01PM +0200, Gerd Hoffmann wrote: > > Gerd Hoffmann (5): > ArmVirt: add VirtioSerialDxe to ArmVirtQemu builds > ArmVirt/PlatformBootManagerLib: factor out IsVirtio() > ArmVirt/PlatformBootManagerLib: factor out IsVirtioPci() > ArmVirt/PlatformBootManagerLib: se

Re: [edk2-devel] [PATCH v1] UefiCpuPkg: Get processor extended information for SmmCpuServiceProtocol

2023-05-31 Thread Gerd Hoffmann
On Mon, May 29, 2023 at 02:39:38PM +0800, Zhang, Hongbin1 wrote: > Some features like RAS need to use processor extended information > under smm, So add code to support it Acked-by: Gerd Hoffmann -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply

[edk2-devel] [PATCH v2 1/1] OvmfPkg/QemuFlashFvbServicesRuntimeDxe: refine flash detection

2023-05-31 Thread Gerd Hoffmann
Flash can be write-protected in qemu (which is usually the case for code). In case the variable store flash block is configured read-only ovmf wouldn't be able to store EFI variables there, so not setting up fvb in that case (and fallhack to emulation) is the better option. It'll avoid problems la

[edk2-devel] [RFC] Introduce new status code for ManageabilityPkg and Redfish*Pkg

2023-05-31 Thread Nickle Wang via groups.io
Hi edk2 community, I like to introduce EFI_COMPUTING_UNIT_MANAGEABILITY status code to PiStatusCode.h. EFI_COMPUTING_UNIT_MANAGEABILITY will be used in edk2 RedfishPkg and edk2-redfish-client RedfishClientPkg to report Redfish operation errors. It will also be used to report errors in edk2-plat

[edk2-devel] [PATCH] UnitTestFrameworkPkg: Add UnitTestPeiServicesTablePointerLib

2023-05-31 Thread Zhiguang Liu
This library supports a PeiServicesTablePointerLib implementation that allows code dependent upon PeiServicesTable to operate in an isolated execution environment such as within the context of a host-based unit test framework. The unit test should initialize the PeiServicesTable database with any

Re: [edk2-devel] [PATCH v1] UefiCpuPkg: Get processor extended information for SmmCpuServiceProtocol

2023-05-31 Thread Ni, Ray
Reviewed-by: Ray Ni > -Original Message- > From: Wu, Jiaxin > Sent: Thursday, June 1, 2023 9:31 AM > To: Zhang, Hongbin1 ; devel@edk2.groups.io > Cc: Dong, Eric ; Ni, Ray ; Kumar, > Rahul R ; Gerd Hoffmann ; > Zeng, Star > Subject: RE: [PATCH v1] UefiCpuPkg: Get processor extended infor

Re: [edk2-devel] [PATCH v1] UefiCpuPkg: Get processor extended information for SmmCpuServiceProtocol

2023-05-31 Thread Wu, Jiaxin
Reviewed-by: Jiaxin Wu > -Original Message- > From: Zhang, Hongbin1 > Sent: Monday, May 29, 2023 2:40 PM > To: devel@edk2.groups.io > Cc: Zhang, Hongbin1 ; Dong, Eric > ; Ni, Ray ; Kumar, Rahul R > ; Gerd Hoffmann ; Zeng, > Star ; Wu, Jiaxin > Subject: [PATCH v1] UefiCpuPkg: Get process

Re: [edk2-devel] [PATCH v1 1/1] MdeModulePkg/VariableSmm.c: add Ap rendezvous check before SmmSetVariable.

2023-05-31 Thread Wu, Jiaxin
Thanks Jiewen & Ray. Zhihao, could you try the suggestion from Jiewen? You can sync with me for detail. Thanks, Jiaxin > -Original Message- > From: Ni, Ray > Sent: Thursday, June 1, 2023 9:07 AM > To: Yao, Jiewen ; devel@edk2.groups.io; Wu, Jiaxin > ; Li, Zhihao ; Gao, Liming > ; kra.

Re: [edk2-devel] [Patch V4 05/15] UefiCpuPkg: Use CpuPageTableLib to convert SMM paging attribute.

2023-05-31 Thread Ni, Ray
> diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c > b/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c > index 3deb1ffd67..a25a96f68c 100644 > --- a/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c > +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c > @@ -1,7 +1,7 @@ > /** @file > Page Fault (#PF) handler for X

Re: [edk2-devel] [PATCH v1 1/1] MdeModulePkg/VariableSmm.c: add Ap rendezvous check before SmmSetVariable.

2023-05-31 Thread Ni, Ray
Jiewen, Good suggestionšŸ˜Š. This also resolve's Jiaxin's comments that check if the variable is non-volatile. Thanks, Ray > -Original Message- > From: Yao, Jiewen > Sent: Thursday, June 1, 2023 9:06 AM > To: devel@edk2.groups.io; Wu, Jiaxin ; Li, Zhihao > ; Gao, Liming ; Ni, Ray > ; kra..

Re: [edk2-devel] [PATCH v1 1/1] MdeModulePkg/VariableSmm.c: add Ap rendezvous check before SmmSetVariable.

2023-05-31 Thread Yao, Jiewen
Disabling flash is a silicon behavior. Can we do SmmWaitForAllProcessor() in FVB driver, or SPI driver ? Thank you Yao, Jiewen > -Original Message- > From: devel@edk2.groups.io On Behalf Of Wu, Jiaxin > Sent: Thursday, June 1, 2023 9:03 AM > To: devel@edk2.groups.io; Li, Zhihao ; Gao,

Re: [edk2-devel] [PATCH v1 1/1] MdeModulePkg/VariableSmm.c: add Ap rendezvous check before SmmSetVariable.

2023-05-31 Thread Wu, Jiaxin
Hi All, I think we need this patch: There is a requirement that all CPU threads must in SMM for Non-Volatile variable. Because the SMM will disables the flash protection. Before that, we must guarantee all CPU threads are in SMM to avoid the non-smm mode cpus modify the flash. Zhihao, I th

Re: [edk2-devel] [RFC PATCH 09/10] MdeModulePkg/DxeIpl: Use memory attribute PPI to remap the stack NX

2023-05-31 Thread Ard Biesheuvel
On Wed, 31 May 2023 at 21:04, Tom Lendacky wrote: > > On 5/30/23 20:29, Ni, Ray via groups.io wrote: > > +@Abner Chang and @Tom Lendacky > > > >> -Original Message- > >> From: Tan, Dun > >> Sent: Tuesday, May 30, 2023 6:25 PM > >> To: Ni, Ray ; Ard Biesheuvel ; > >> devel@edk2.groups.io >

Re: [edk2-devel] [PATCH v1 1/1] UnitTestFrameworkPkg: UnitTestPersistenceLib: Save Unit Test Cache to Drive

2023-05-31 Thread Michael D Kinney
Would it be more flexible for unit tests apps to support an optional command line arg to specify the volume to write results? Mike > -Original Message- > From: Kun Qin > Sent: Wednesday, May 31, 2023 12:14 PM > To: devel@edk2.groups.io > Cc: Sean Brogan ; Michael Kubacki > ; Kinney, M

[edk2-devel] [PATCH v1 1/1] UnitTestFrameworkPkg: UnitTestPersistenceLib: Save Unit Test Cache to Drive

2023-05-31 Thread Kun Qin
From: kuqin12 <42554914+kuqi...@users.noreply.github.com> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4467 Current implementation of UnitTestFrameworkPkg for shell-based unit test will save the unit test cache to the same volume as the test application itself. This works as long as the te

[edk2-devel] [PATCH v1 0/1] Add support for running shell test application in an immutable volume

2023-05-31 Thread Kun Qin
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4467 Current implementation of UnitTestFrameworkPkg for shell-based unit test will save the unit test cache to the same file system as the test application itself. This works as long as the test application is on a writable volume, such as USB or

Re: [edk2-devel] [RFC PATCH 09/10] MdeModulePkg/DxeIpl: Use memory attribute PPI to remap the stack NX

2023-05-31 Thread Lendacky, Thomas via groups.io
On 5/30/23 20:29, Ni, Ray via groups.io wrote: +@Abner Chang and @Tom Lendacky -Original Message- From: Tan, Dun Sent: Tuesday, May 30, 2023 6:25 PM To: Ni, Ray ; Ard Biesheuvel ; devel@edk2.groups.io Cc: Yao, Jiewen ; Gerd Hoffmann ; Taylor Beebe ; Oliver Smith- Denny ; Bi, Dandan ; G

Re: [edk2-devel] [Patch v2 1/3] MdePkg/Include/IndustryStandard: Add Operator and Xor field names

2023-05-31 Thread Michael D Kinney
> -Original Message- > From: Pedro Falcato > Sent: Wednesday, May 31, 2023 11:17 AM > To: Kinney, Michael D > Cc: devel@edk2.groups.io; Gao, Liming ; Liu, > Zhiguang ; Oliver Smith-Denny > ; Pop, Aaron > Subject: Re: [Patch v2 1/3] MdePkg/Include/IndustryStandard: Add Operator > and Xo

Re: [edk2-devel] [Patch v2 1/3] MdePkg/Include/IndustryStandard: Add Operator and Xor field names

2023-05-31 Thread Pedro Falcato
On Tue, May 30, 2023 at 7:53ā€ÆPM Michael D Kinney wrote: > > Update Tpm12.h and Tpm20.h and not use c++ reserved keywords > operator and xor in C structures to support use of these > include files when building with a C++ compiler. > > This patch temporarily introduces an anonymous union to add > O

Re: [edk2-devel] [PATCH] MinPlatform: Add CpuPageTableLib required by CpuMpPeim

2023-05-31 Thread Chiu, Chasel
Reviewed-by: Chasel Chiu Thanks, Chasel > -Original Message- > From: Ni, Ray > Sent: Wednesday, May 31, 2023 2:18 AM > To: devel@edk2.groups.io > Cc: Chiu, Chasel ; Desimone, Nathaniel L > ; Oram, Isaac W ; > Gao, Liming ; Dong, Eric > Subject: [PATCH] MinPlatform: Add CpuPageTable

Re: [edk2-devel] [PATCH v1 1/1] UefiCpuPkg/CpuService.c:check cpu sync mode in SmmCpuRendezvous()

2023-05-31 Thread Wu, Jiaxin
Reviewed-by: Jiaxin Wu > -Original Message- > From: devel@edk2.groups.io On Behalf Of Ni, Ray > Sent: Wednesday, May 10, 2023 4:42 PM > To: Li, Zhihao ; devel@edk2.groups.io > Cc: Dong, Eric > Subject: Re: [edk2-devel] [PATCH v1 1/1] UefiCpuPkg/CpuService.c:check > cpu sync mode in SmmC

Re: [edk2-devel] [edk2-redfish-client][PATCH 2/2] RedfishClientPkg: Use DEBUG_MANAGEABILITY

2023-05-31 Thread Chang, Abner via groups.io
[AMD Official Use Only - General] Merged, thanks! > -Original Message- > From: Nickle Wang > Sent: Wednesday, May 31, 2023 8:39 PM > To: Chang, Abner ; devel@edk2.groups.io > Cc: Igor Kulchytskyy > Subject: RE: [edk2-redfish-client][PATCH 2/2] RedfishClientPkg: Use > DEBUG_MANAGEABILITY

Re: [edk2-devel] [PATCH v2 1/1] UefiCpuPkg/PiSmmCpuDxeSmm:add Ap Rendezvous check in PerformRemainingTasks.

2023-05-31 Thread Wu, Jiaxin
> > +if (EFI_ERROR (SmmCpuRendezvous (NULL, TRUE))) { > > + DEBUG ((DEBUG_ERROR, "PerformRemainingTasks: fail to wait for all AP > check in SMM!\n")); If error happen, do we should return directly or continue the executing? Thanks, Jiaxin > > +} > > + > > // > > //

[edk2-devel] [PATCH] ShellPkg\SmbiosView: SmBiosView does not print correct Slot ID information

2023-05-31 Thread Adrian Sperber via groups.io
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4469 SlotType related check only supports PcieGen3 checks within DisplaySystemSlotId. SmbiosView will print: Slot Id: undefined Slot Id Updating this check to Gen6andBeyond which fixes the problem: Slot Id: the value present in the Slot Number fi

[edk2-devel] [PATCH] IntelFsp2Pkg/Tools: PatchFv: Handle 32-bit address in GCC map

2023-05-31 Thread Jiaqing Zhao
Some versions of ld (like 2.40 in Ubuntu 23.04) uses 32-bit address when generating map files for IA32 build. This patch enables PatchFv.py to parse these 32-bit addresses in GCC map properly. Signed-off-by: Jiaqing Zhao --- IntelFsp2Pkg/Tools/PatchFv.py | 5 +++-- 1 file changed, 3 insertions(+

Re: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in AhciPei PEIM

2023-05-31 Thread He, Jiangang via groups.io
[AMD Official Use Only - General] We did crisis recovery and Opal HD password unlock from S3 resume from SATA HD test on two different version of AHCI host controllers. Thanks, Jiangang -Original Message- From: Wu, Hao A Sent: Tuesday, May 30, 2023 10:30 PM To: devel@edk2.groups.io; Hsu

[edk2-devel] Event: TianoCore edk2-test Bug Triage Meeting - Thursday, June 1, 2023 #cal-reminder

2023-05-31 Thread Group Notification
*Reminder: TianoCore edk2-test Bug Triage Meeting* *When:* Thursday, June 1, 2023 10:00pm to 11:00pm (UTC+08:00) Asia/Shanghai *Where:* https://armltd.zoom.us/j/91247522013?pwd=ei9nUndTbG9oWEROS2M1aVREZkpiQT09&from=addon *Organizer:* Edhaya Chandran edhaya.chand...@arm.com ( edhaya.chand...@arm

Re: [edk2-devel] [edk2-redfish-client][PATCH 2/2] RedfishClientPkg: Use DEBUG_MANAGEABILITY

2023-05-31 Thread Nickle Wang via groups.io
Reviewed-by: Nickle Wang Regards, Nickle > -Original Message- > From: abner.ch...@amd.com > Sent: Tuesday, May 30, 2023 3:42 PM > To: devel@edk2.groups.io > Cc: Nickle Wang ; Igor Kulchytskyy > Subject: [edk2-redfish-client][PATCH 2/2] RedfishClientPkg: Use > DEBUG_MANAGEABILITY > > E

[edk2-devel] [PATCH V2 6/6] MdeModulePkg/SmmCorePerformanceLib: Disable perf-logging at runtime

2023-05-31 Thread Ni, Ray
Because SMM perf-logging is migrated to non-SMRAM at ReadyToBoot by DxeCorePerformanceLib, the perf-logging after ExitBS is useless and impact the SMI latency at runtime. Hence the SmmCorePerformanceLib is updated to disable perf-logging after ExitBS. Cc: Jiaxin Wu Cc: Dandan Bi Cc: Liming Gao

[edk2-devel] [PATCH V2 5/6] MdeModulePkg/SmmPerformanceLib: Disable perf-logging after ExitBS

2023-05-31 Thread Ni, Ray
Because SMM perf-logging is migrated to non-SMRAM at ReadyToBoot by DxeCorePerformanceLib, the perf-logging after ExitBS is useless and impact the SMI latency at runtime. Hence the SmmPerformanceLib is updated to disable perf-logging after ExitBS. Cc: Jiaxin Wu Cc: Dandan Bi Cc: Liming Gao Cc:

[edk2-devel] [PATCH V2 4/6] MdeModulePkg/SmmCore: Add perf-logging for SmmDriverDispatchHandler

2023-05-31 Thread Ni, Ray
SmmDriverDispatchHandler is the routine that dispatches SMM drivers from FV. It's a time-consuming routine. Add perf-logging for this routine. Signed-off-by: Ray Ni Cc: Jian J Wang Cc: Liming Gao Cc: Jiaxin Wu --- MdeModulePkg/Core/PiSmmCore/Dispatcher.c | 5 - 1 file changed, 4 insertion

[edk2-devel] [PATCH V2 3/6] MdeModulePkg/SmmCore: Add perf-logging for time-consuming procedures

2023-05-31 Thread Ni, Ray
Following procedures are perf-logged: * SmmReadyToBootHandler * SmmReadyToLockHandler * SmmEndOfDxeHandler * SmmEntryPoint (It's the main routine run in BSP when SMI happens.) * SmiManage Cc: Jian J Wang Cc: Liming Gao Cc: Jiaxin Wu --- MdeModulePkg/Core/PiSmmCore/PiSmmCore.c | 14 ++

[edk2-devel] [PATCH V2 2/6] UefiCpuPkg/CpuSmm: Add perf-logging for MP procedures

2023-05-31 Thread Ni, Ray
MP procedures are those procedures that run in every CPU thread. The EDKII perf infra is not MP safe so it doesn't support to be called from those MP procedures. The patch adds SMM MP perf-logging support in SmmMpPerf.c. The following procedures are perf-logged: * SmmInitHandler * SmmCpuFeaturesRe

[edk2-devel] [PATCH V2 1/6] UefiCpuPkg/CpuSmm: Add perf-logging for time-consuming BSP procedures

2023-05-31 Thread Ni, Ray
The patch adds perf-logging for the following potential time-consuming BSP procedures: * PiCpuSmmEntry - SmmRelocateBases * ExecuteFirstSmiInit * BSPHandler - SmmWaitForApArrival - PerformRemainingTasks * InitPaging * SetMemMapAttributes * SetUefiMemMapAttributes * SetPag

[edk2-devel] [PATCH V2 0/6] Enable perf-logging in SMM environment

2023-05-31 Thread Ni, Ray
Ray Ni (6): UefiCpuPkg/CpuSmm: Add perf-logging for time-consuming BSP procedures UefiCpuPkg/CpuSmm: Add perf-logging for MP procedures MdeModulePkg/SmmCore: Add perf-logging for time-consuming procedures MdeModulePkg/SmmCore: Add perf-logging for SmmDriverDispatchHandler MdeModulePkg/S

Re: [edk2-devel] RDTSC is not a serializing instruction

2023-05-31 Thread Wu, Jiaxin
It does has the impact, I have observed the phenomenon due to speculation execution. Thanks, Jiaxin > -Original Message- > From: Ni, Ray > Sent: Thursday, May 25, 2023 2:11 PM > To: devel@edk2.groups.io > Cc: Ni, Ray ; Wu, Jiaxin ; Wu, Hao A > > Subject: RDTSC is not a serializing inst

Re: [edk2-devel] [RFC PATCH 05/10] MdeModulePkg: Define memory attribute PPI

2023-05-31 Thread Ard Biesheuvel
On Wed, 31 May 2023 at 10:56, Ni, Ray wrote: > > > > > > 2. > > > > > When a memory region is marked from not-present to present, > > PageTableLib > > > > expects > > > > > caller to supply all memory attributes (including RW, NX, etc.) as > > > > > the lib > > > > implementation doesn't > > > >

[edk2-devel] [PATCH] MinPlatform: Add CpuPageTableLib required by CpuMpPeim

2023-05-31 Thread Ni, Ray
The patch moves the CpuPageTableLib reference from CoreDxeLib.dsc to CoreCommonLib.dsc since now not only DxeMpInitLib but also CpuMpPei depends on it. Signed-off-by: Ray Ni Cc: Chasel Chiu Cc: Nate DeSimone Cc: Isaac Oram Cc: Liming Gao Cc: Eric Dong --- Platform/Intel/MinPlatformPkg/Inclu

Re: [edk2-devel] [RFC PATCH 05/10] MdeModulePkg: Define memory attribute PPI

2023-05-31 Thread Ni, Ray
> > > > 2. > > > > When a memory region is marked from not-present to present, > PageTableLib > > > expects > > > > caller to supply all memory attributes (including RW, NX, etc.) as the > > > > lib > > > implementation doesn't > > > > want to carry any default attributes.. > > > > Do you think th

Re: [edk2-devel] [edk2-platforms][PATCH 2/2] ManageabilityPkg: Use DEBUG_MANAGEABILITY

2023-05-31 Thread Chang, Abner via groups.io
[AMD Official Use Only - General] Merged. Thanks Abner > -Original Message- > From: Attar, AbdulLateef (Abdul Lateef) > Sent: Tuesday, May 30, 2023 4:48 PM > To: Chang, Abner ; devel@edk2.groups.io > Cc: Isaac Oram ; Nickle Wang > ; Tinh Nguyen > > Subject: RE: [edk2-platforms][PATCH 2

Re: [edk2-devel] [RFC PATCH 08/11] MdeModulePkg/DxeIpl: Relocate and remap XIP capable DXE drivers

2023-05-31 Thread Marvin HƤuser
Hi Ray,This is handled by GenFw. For ELF-based toolchains, this is done as part of the conversion [1]. For others, a ā€œGenFw post-processingā€ step takes care of it [2]. Though you are right, this is not obvious and external tools may forget this step (but still produce valid XIP-alike PEs). Conseque

Re: [edk2-devel] [RFC PATCH 05/10] MdeModulePkg: Define memory attribute PPI

2023-05-31 Thread Ard Biesheuvel
On Wed, 31 May 2023 at 09:34, Ni, Ray wrote: > > > > > -Original Message- > > From: Ard Biesheuvel > > Sent: Tuesday, May 30, 2023 3:32 PM > > To: Ni, Ray > > Cc: devel@edk2.groups.io; Yao, Jiewen ; Gerd > > Hoffmann ; Taylor Beebe ; Oliver > > Smith-Denny ; Bi, Dandan ; > > Gao, Liming

Re: [edk2-devel] [Patch 1/1] OvmfPkg/VirtIoSerialDxe: Update for VS2015x86 compatibility

2023-05-31 Thread Gerd Hoffmann
On Fri, May 26, 2023 at 04:17:34PM -0700, Michael D Kinney wrote: > Move initialization of local variable structure from declaration > to statements to fix VS2015x86 build break. Acked-by: Gerd Hoffmann take care, Gerd -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent t

Re: [edk2-devel] [RFC PATCH 05/10] MdeModulePkg: Define memory attribute PPI

2023-05-31 Thread Ni, Ray
> -Original Message- > From: Ard Biesheuvel > Sent: Tuesday, May 30, 2023 3:32 PM > To: Ni, Ray > Cc: devel@edk2.groups.io; Yao, Jiewen ; Gerd > Hoffmann ; Taylor Beebe ; Oliver > Smith-Denny ; Bi, Dandan ; > Gao, Liming ; Kinney, Michael D > ; Leif Lindholm ; > Sunil V L ; Warkentin, A

Re: [edk2-devel] [RFC PATCH 09/10] MdeModulePkg/DxeIpl: Use memory attribute PPI to remap the stack NX

2023-05-31 Thread Gerd Hoffmann
Hi, > However, I must admit that the X64 PEI logic is confusing to me, so I > may have missed something here. It seems to me that creating an > entirely new set of page tables in DxeIpl is both redundant (as PEI > already executes in long mode, and therefore uses page tables) Well, there is the

Re: [edk2-devel] [RFC PATCH 08/11] MdeModulePkg/DxeIpl: Relocate and remap XIP capable DXE drivers

2023-05-31 Thread Ni, Ray
When a PE has a global large variable, there could be a .bss section whose actual size is 0 or very small but the eventual size when loading to memory will be larger. Can XIP work with this section? @Liu, Zhiguang brought this question when discussing with me offli