Re: [edk2-devel] [PATCH v4 12/37] UefiCpuPkg: Add CpuMmuLib.h to UefiCpuPkg

2023-12-12 Thread Ni, Ray
Chao, Thanks for providing such a cleaner lib API. Only 2 comments in below: > + > +#define EFI_MEMORY_CACHETYPE_MASK (EFI_MEMORY_UC | \ > +EFI_MEMORY_WC | \ > +EFI_MEMORY_WT | \ > +

Re: [edk2-devel] [PATCH v3 2/6] UefiCpuPkg: Adds SmmCpuSyncLib library class

2023-12-12 Thread Wu, Jiaxin
> > Thanks. This documentation (in the commit message and the lib class > header file) seems really good (especially with the formatting updates > suggested by Ray). > > (1) I think there is one typo: exist <-> exits. > agree, I will fix this. > > +RETURN_STATUS > > +EFIAPI > >

Re: [edk2-devel] [PATCH v4 1/1] MdeModulePkg: Support customized FV Migration Information

2023-12-12 Thread Ni, Ray
Fan, 1. MigrateAll can potentially replace the needs of the existing PCD. So, do you think it's better to locate the HOB always, instead of only when the PCD is TRUE? 2. Is the change in TcgPei necessary? Thanks, Ray > -Original Message- > From: Wang, Fan > Sent: Monday, December 11,

[edk2-devel] [PATCH v4 21/37] OvmfPkg/RiscVVirt: Enable UefiCpuPkg version CpuIo2Dxe

2023-12-12 Thread Chao Li
Since the UefiCpuPkg/CpuIo2Dxe already supports MMIO, it is enabled at this thime. Build-tested only (with "RiscVVirtQemu.dsc"). BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584 Cc: Sunil V L Cc: Andrei Warkentin --- OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc | 4 +++-

Re: [edk2-devel] [PATCH 6/9] RedfishPkg: add Component Name protocols to RedfishConfigHandler driver

2023-12-12 Thread Igor Kulchytskyy via groups.io
Just mistype I guess (see below) -Original Message- From: Mike Maslenkin Sent: Tuesday, December 12, 2023 9:54 AM To: devel@edk2.groups.io Cc: abner.ch...@amd.com; nick...@nvidia.com; Igor Kulchytskyy ; Mike Maslenkin Subject: [EXTERNAL] [PATCH 6/9] RedfishPkg: add Component Name

Re: [edk2-devel] [PATCH V2] DebugLib: Allow -Wunneeded-internal-declaration with clang

2023-12-12 Thread Mike Beaton
> > +#define DEBUG(Expression)\ > > +do { \ > > + _Pragma("GCC diagnostic push") \ > > + _Pragma("GCC diagnostic ignored \"-Wunused-value\"") \ > > + if ((FALSE)) {

Re: [edk2-devel] [PATCH v1 1/1] FatPkg/FatPei: Check array offset before use

2023-12-12 Thread Michael D Kinney
Reviewed-by: Michael D Kinney > -Original Message- > From: devel@edk2.groups.io On Behalf Of Michael > Kubacki > Sent: Tuesday, December 12, 2023 11:24 AM > To: devel@edk2.groups.io > Cc: Ni, Ray > Subject: [edk2-devel] [PATCH v1 1/1] FatPkg/FatPei: Check array offset > before use > >

Re: [edk2-devel] [PATCH V2] DebugLib: Allow -Wunneeded-internal-declaration with clang

2023-12-12 Thread Ard Biesheuvel
On Tue, 12 Dec 2023 at 22:46, Mike Beaton wrote: > > From: Mikhail Krichanov > > Provides a variant of the DEBUG macro for clang when MDEPKG_NDEBUG is > defined, which uses but discards the contained expression. This means > clang can tell that it has optimised away variable usage as part of >

Re: [edk2-devel] [PATCH V2] DebugLib: Allow -Wunneeded-internal-declaration with clang

2023-12-12 Thread Mike Beaton
On Tue, 12 Dec 2023 at 21:45, wrote: > > From: Mikhail Krichanov > > Provides a variant of the DEBUG macro for clang when MDEPKG_NDEBUG is > defined, which uses but discards the contained expression. This means > clang can tell that it has optimised away variable usage as part of > valid debug

[edk2-devel] [PATCH V2] DebugLib: Allow -Wunneeded-internal-declaration with clang

2023-12-12 Thread Mike Beaton
From: Mikhail Krichanov Provides a variant of the DEBUG macro for clang when MDEPKG_NDEBUG is defined, which uses but discards the contained expression. This means clang can tell that it has optimised away variable usage as part of valid debug patterns (such as a STATIC variable which is only

Re: [edk2-devel] [PATCH V2] RedfishPkg/RedfishDicovery: Remedy Redfish service discovery flow

2023-12-12 Thread Mike Maslenkin
On Mon, Dec 11, 2023 at 5:59 PM wrote: > > From: Abner Chang > > Remedy Redfish service discovery flow changes made > in commit 8736b8fd. > > The above fix creates the dependency with SMBIOS 42h record, > which has a problem as SMBIOS 42h may not be created when > RedfishDiscovery.Supported() is

Re: [edk2-devel] [PATCH v3 2/6] UefiCpuPkg: Adds SmmCpuSyncLib library class

2023-12-12 Thread Laszlo Ersek
On 12/6/23 11:01, Wu, Jiaxin wrote: > Intel is planning to provide different SMM CPU Sync implementation > along with some specific registers to improve the SMI performance, > hence need SmmCpuSyncLib Library for Intel. > > This patch is to: > 1.Adds SmmCpuSyncLib Library class in UefiCpuPkg.dec.

Re: [edk2-devel] [PATCH v3 1/6] UefiCpuPkg/PiSmmCpuDxeSmm: Optimize Semaphore Sync between BSP and AP

2023-12-12 Thread Laszlo Ersek
On 12/6/23 11:01, Wu, Jiaxin wrote: > This patch is to define 3 new functions (WaitForBsp & ReleaseBsp & > ReleaseOneAp) used for the semaphore sync between BSP & AP. With the > change, BSP and AP Sync flow will be easy understand as below: > BSP: ReleaseAllAPs or ReleaseOneAp --> AP: WaitForBsp >

[edk2-devel] [PATCH v1 1/1] FatPkg/FatPei: Check array offset before use

2023-12-12 Thread Michael Kubacki
From: Michael Kubacki Move the range check before array access to enforce the bounds as expected. Cc: Ray Ni Signed-off-by: Michael Kubacki --- FatPkg/FatPei/FatLiteApi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FatPkg/FatPei/FatLiteApi.c

Re: [edk2-devel] [edk2-platforms][PATCH V3 1/1] Platform/ARM/N1sdp: Add support to parse NT_FW_CONFIG

2023-12-12 Thread Sami Mujawar
Hi Sahil, Thank you for this patch. I think this patch can be split into 3 or 4 patches. Can you look into that, please? I also have other feedback marked inline as [SAMI]. Regards, Sami Mujawar On 23/08/2023 12:03 pm, sahil wrote: NT_FW_CONFIG DTB contains platform information passed by

Re: [edk2-devel] [PATCH] DebugLib: Allow -Wunneeded-internal-declaration with clang

2023-12-12 Thread Laszlo Ersek
On 12/12/23 16:33, Mike Beaton wrote: > > I believe one way to approach it would be to (a) amend the patch with > >    --author="Marvin Häuser >" > > and (b) have S-o-b's from both Marvin and you at the end of the commit > message. > > > As I

Re: [edk2-devel] [PATCH] DebugLib: Allow -Wunneeded-internal-declaration with clang

2023-12-12 Thread Mike Beaton
> I believe one way to approach it would be to (a) amend the patch with > >--author="Marvin Häuser " > > and (b) have S-o-b's from both Marvin and you at the end of the commit > message. > As I say, I think the code in question is actual by Mikhail, despite appearances, but I should be able

Re: [edk2-devel] [PATCH] DebugLib: Allow -Wunneeded-internal-declaration with clang

2023-12-12 Thread Laszlo Ersek
On 12/12/23 13:57, Mike Beaton wrote: >> You failed to mention where you found this patch. > > It's from https://github.com/acidanthera/audk/commit/dcd0a768b0f > (which actually contains the code described in its commit message, but > I believe some other code, including this specific part, which

Re: [edk2-devel] [PATCH] DebugLib: Allow -Wunneeded-internal-declaration with clang

2023-12-12 Thread Laszlo Ersek
On 12/12/23 11:33, Mike Beaton wrote: >> This seems redundant to me. Either we set the pragma and the compiler >> does not care, or we don't, and rely on the fact that the compiler can >> infer that 'Expression' will never be evaluated at runtime, but won't >> complain about symbols that are only

Re: [edk2-devel] [PATCH v4] ArmVirt: Allow memory attributes protocol to be disabled

2023-12-12 Thread Laszlo Ersek
On 12/12/23 11:42, Ard Biesheuvel wrote: > On Tue, 12 Dec 2023 at 11:08, Gerd Hoffmann wrote: >> >> On Tue, Dec 12, 2023 at 09:36:00AM +0100, Ard Biesheuvel wrote: >>> From: Ard Biesheuvel >>> >>> Shim's PE loader uses the EFI memory attributes protocol in a way that >>> results in an immediate

Re: [edk2-devel] [Patch V3 0/6] Create and consume a new gMpInformationHobGuid2 in UefiCpuPkg.

2023-12-12 Thread Laszlo Ersek
On 12/12/23 02:20, Tan, Dun wrote: > Hi Laszlo, > > Thanks for your reply. Sorry that I didn't add you in the reviewer list from > the beginning of this patch series review. About the patch review, please > take your time. Also take care your body! > > The patch set was reviewed-by Ray last

[edk2-devel] [PATCH 9/9] EmulatorPkg: RedfishPlatformHostInterfaceLib: get rid of unused variable

2023-12-12 Thread Mike Maslenkin
Cc: Abner Chang Cc: Nickle Wang Signed-off-by: Mike Maslenkin --- .../RedfishPlatformHostInterfaceLib.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/EmulatorPkg/Library/RedfishPlatformHostInterfaceLib/RedfishPlatformHostInterfaceLib.c

[edk2-devel] [PATCH 8/9] EmulatorPkg: fix typo. PcdRedfishServie -> PcdRedfishService

2023-12-12 Thread Mike Maslenkin
Cc: Abner Chang Cc: Nickle Wang Signed-off-by: Mike Maslenkin --- EmulatorPkg/EmulatorPkg.dec | 8 .../RedfishPlatformCredentialLib.c | 12 ++-- .../RedfishPlatformCredentialLib.inf | 8 3 files changed, 14

[edk2-devel] [PATCH 7/9] RedfishPkg: add proper initialization of IPMI request

2023-12-12 Thread Mike Maslenkin
All fields of IPMI_CHANNEL_INFO_CHANNEL_NUMBER union must be initialized to avoid error condition on BMC side. Cc: Abner Chang Cc: Nickle Wang Cc: Igor Kulchytskyy Signed-off-by: Mike Maslenkin --- .../PlatformHostInterfaceBmcUsbNicLib.c | 8 +--- 1 file changed, 5

[edk2-devel] [PATCH 6/9] RedfishPkg: add Component Name protocols to RedfishConfigHandler driver

2023-12-12 Thread Mike Maslenkin
Currently there is no description for RedfishConfigHandler driver. This leads to in the "DRIVER NAME" column of a `drivers` command for example. Cc: Abner Chang Cc: Nickle Wang Cc: Igor Kulchytskyy Signed-off-by: Mike Maslenkin --- .../RedfishConfigHandler/ComponentName.c | 216

[edk2-devel] [PATCH 5/9] RedfishPkg: RedfishDiscoverDxe: fix memory leak on error path.

2023-12-12 Thread Mike Maslenkin
Cc: Abner Chang Cc: Nickle Wang Cc: Igor Kulchytskyy Signed-off-by: Mike Maslenkin --- RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c

[edk2-devel] [PATCH 3/9] RedfishPkg: get rid of unused definitions from RedfishCrtLib.h

2023-12-12 Thread Mike Maslenkin
It seems that initial implementation of this header file is based on CrtLibSupport.h from CryptoPkg. But uid, euid, gid, egid and sa_family_t sre not used in RedfishPkg. So remove them. Also take "true" and "false" definition from MdePkg's LibFdtSupport.h header file, that also seems based on a

[edk2-devel] [PATCH 4/9] RedfishPkg: RedfishPlatformConfigDxe: reduce memory allocations

2023-12-12 Thread Mike Maslenkin
It's unclear why the new string is allocated as copy of the original string if its pointer is stored in an array and the original string is released immediately after the copy is created. All data allocated in the same pool. Cc: Abner Chang Cc: Nickle Wang Cc: Igor Kulchytskyy Signed-off-by:

[edk2-devel] [PATCH 1/9] RedfishPkg: fix RedfishPlatformHostInterfaceLib library class name typo.

2023-12-12 Thread Mike Maslenkin
PlatformHostInterfaceBmcUsbNicLib is the library instance name not the class name. Cc: Abner Chang Cc: Nickle Wang Cc: Igor Kulchytskyy Signed-off-by: Mike Maslenkin --- .../PlatformHostInterfaceBmcUsbNicLib.inf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[edk2-devel] [PATCH 2/9] RedfishPkg: fix RedfishPlatformCredentialLib library class name typo.

2023-12-12 Thread Mike Maslenkin
RedfishPlatformCredentialIpmiLib is the library instance name not the class name. Cc: Abner Chang Cc: Nickle Wang Cc: Igor Kulchytskyy Signed-off-by: Mike Maslenkin --- .../RedfishPlatformCredentialIpmiLib.inf| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[edk2-devel] [PATCH 0/9] Redfish related fixes and improvements

2023-12-12 Thread Mike Maslenkin
There is a major change in this set: patch 7/9 "add proper initialization of IPMI request" helps to avoid error condition on BMC side while processing IPMI command. The diffstat for the set is: EmulatorPkg/EmulatorPkg.dec | 8 +-

[edk2-devel] [PATCH] BaseTools: VfrCompiler Adds DefaultValueError Feature

2023-12-12 Thread Yuting Yang
Add --catch_default option Raise a DefaultValueError when encountering VFR default definitions to help remove default variables. S Add --except_list option Exclude packages that don't require enabling the catch_default function. Cc: Rebecca Cran Cc: Liming Gao Cc: Bob Feng Cc: Christine Chen

Re: [edk2-devel] [Patch V2] BaseTools: VfrCompiler Adds DefaultValueError Feature

2023-12-12 Thread Yuting Yang
+Cc Zhang, Zifeng, Chen, Arthur G -Original Message- From: Chen, Christine Sent: Tuesday, December 12, 2023 5:04 PM To: Yang, Yuting2 ; devel@edk2.groups.io Cc: Rebecca Cran ; Gao, Liming ; Feng, Bob C Subject: RE: [Patch V2] BaseTools: VfrCompiler Adds DefaultValueError Feature +Cc

[edk2-devel] [PATCH] [BaseTools] VfrCompiler: Add DefaultValueError Feature

2023-12-12 Thread Yuting Yang
Add --catch_default option Raise a DefaultValueError when encountering VFR default definitions to help remove default variables. Add --except_list option Exclude packages that don't require enabling the catch_default function. Cc: Rebecca Cran Cc: Liming Gao Cc: Bob Feng Signed-off-by:

[edk2-devel] [PATCH V2 1/1] Silicon/Intel/FitGen:FIT change for FBM entry.

2023-12-12 Thread Liqi Liu
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4621 1)Refer to FIT spec change, add a new entry in FIT table - FSP Boot Manifest(Type 0xD) to store the location of FBM. 2)We found that 0xD was occupied by FIT_TABLE_TYPE_BIOS_DATA_AREA. But all FIT specs in archive show record 0xD as

[edk2-devel] [Patch V2] BaseTools: VfrCompiler Adds DefaultValueError Feature

2023-12-12 Thread Yuting Yang
Add --catch_default option Raise a DefaultValueError when encountering VFR default definitions to help remove default variables. Add --except_list option Exclude packages that don't require enabling the catch_default function. Cc: Rebecca Cran Cc: Liming Gao Cc: Bob Feng Cc: Christine Chen

[edk2-devel] [PATCH V1 1/1] Silicon/Intel/FitGen:FIT change for FBM entry.

2023-12-12 Thread Liqi Liu
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4621 1)Refer to FIT spec change, add a new entry in FIT table - FSP Boot Manifest(Type 0xD) to store the location of FBM. 2)We found that 0xD was occupied by FIT_TABLE_TYPE_BIOS_DATA_AREA. But all FIT specs in archive show record 0xD as

[edk2-devel] [PATCH V2 1/1] Silicon/Intel/FitGen:FIT change for FBM entry.

2023-12-12 Thread Liqi Liu
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4621 1)Refer to FIT spec change, add a new entry in FIT table - FSP Boot Manifest(Type 0xD) to store the location of FBM. 2)We found that 0xD was occupied by FIT_TABLE_TYPE_BIOS_DATA_AREA. But all FIT specs in archive show record 0xD as

[edk2-devel] [PATCH V1 1/1] Silicon/Intel/FitGen:FIT change for FBM entry.

2023-12-12 Thread Liqi Liu
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4621 1)Refer to FIT spec change, add a new entry in FIT table - FSP Boot Manifest(Type 0xD) to store the location of FBM. 2)We found that 0xD was occupied by FIT_TABLE_TYPE_BIOS_DATA_AREA. But all FIT specs in archive show record 0xD as

[edk2-devel] [PATCH v4 37/37] OvmfPkg/LoongArchVirt: Add self introduction file

2023-12-12 Thread Chao Li
Add self introduction file for LoongArch virtual machine. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584 Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Jordan Justen Cc: Gerd Hoffmann Signed-off-by: Chao Li --- OvmfPkg/LoongArchVirt/Readme.md | 67 + 1 file

[edk2-devel] [PATCH v4 36/37] OvmfPkg/LoongArchVirt: Add build file

2023-12-12 Thread Chao Li
Add infrastructure files to build edk2 for LoongArch QEMU virtual machine. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584 Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Jordan Justen Cc: Gerd Hoffmann Signed-off-by: Chao Li Co-authored-by: Xianglai Li Co-authored-by: Bibo Mao ---

[edk2-devel] [PATCH v4 35/37] OvmfPkg/LoongArchVirt: Support PEI phase

2023-12-12 Thread Chao Li
Platfrom PEI module for LoongArch platfrom initialization. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584 Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Jordan Justen Cc: Gerd Hoffmann Signed-off-by: Chao Li Co-authored-by: Xianglai Li Co-authored-by: Bibo Mao ---

[edk2-devel] [PATCH v4 34/37] OvmfPkg/LoongArchVirt: Support SEC phase

2023-12-12 Thread Chao Li
Add SEC code for LoongArch virtual machine. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584 Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Jordan Justen Cc: Gerd Hoffmann Signed-off-by: Chao Li Co-authored-by: Xianglai Li Co-authored-by: Bibo Mao ---

[edk2-devel] [PATCH v4 33/37] OvmfPkg/LoongArchVirt: Add reset system library

2023-12-12 Thread Chao Li
This library provides interface related to restart and shudown the LoongArch64 virtual machine. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584 Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Jordan Justen Cc: Gerd Hoffmann Signed-off-by: Chao Li Co-authored-by: Xianglai Li Co-authored-by:

[edk2-devel] [PATCH v4 32/37] OvmfPkg/LoongArchVirt: Add FdtQemuFwCfgLib

2023-12-12 Thread Chao Li
This library for PEI phase, and obtains the QemuFwCfg base address by directly parsing the FDT, reads and writes the data in QemuFwCfg by operating on the QemuFwCfg base address. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584 Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Jordan Justen Cc:

[edk2-devel] [PATCH v4 31/37] OvmfPkg/LoongArchVirt: Add NorFlashQemuLib

2023-12-12 Thread Chao Li
Add NorFlashQemuLib for LoongArch, it is referenced from ArmVirtPkg. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584 Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Jordan Justen Cc: Gerd Hoffmann Signed-off-by: Chao Li Co-authored-by: Xianglai Li Co-authored-by: Bibo Mao ---

[edk2-devel] [PATCH v4 30/37] OvmfPkg/LoongArchVirt: Add real time clock library

2023-12-12 Thread Chao Li
This library is provides real time clock for LoongArch virtual machine. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584 Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Jordan Justen Cc: Gerd Hoffmann Signed-off-by: Chao Li Co-authored-by: Baoqi Zhang Co-authored-by: Xianglai Li ---

[edk2-devel] [PATCH v4 29/37] OvmfPkg/LoongArchVirt: Add the early serial port output library

2023-12-12 Thread Chao Li
Add a early serial port output library into LoongArchVirt that named EarlyFdtSerialPortLib16550, this library is referenced from MdeModulePkg. This library is used in the PEI phase. Since the serial port address can not be saved in memory of the LoongArch QEMU virtual machine in the PEI phase,

[edk2-devel] [PATCH v4 28/37] OvmfPkg/LoongArchVirt: Add serial port hook library

2023-12-12 Thread Chao Li
Add a serial port hook library in LoongArchVirt named Fdt16550SerialProtHookLib, this library is referenced from ArmVirtPkg. LoongArch QEMU virtual machine uses register of LOONGARCH_CSR_KS1 to transfer serial port base addres from the PEI phase to the DXE phase. BZ:

[edk2-devel] [PATCH v4 27/37] OvmfPkg/LoongArchVirt: Add a NULL library named CollectApResouceLibNull

2023-12-12 Thread Chao Li
This Library is used to collect APs resources, but is currently NULL for OvmfPkg, because it is not used by the LoongArch virtual machine. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584 Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Jordan Justen Cc: Gerd Hoffmann Signed-off-by: Chao Li ---

[edk2-devel] [PATCH v4 26/37] OvmfPkg/LoongArchVirt: Add stable timer driver

2023-12-12 Thread Chao Li
Add a CPU timer driver named StableTimerDxe, which proviedes EFI_TIMER_ARCH_PROTOCOL for LoongArch. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584 Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Jordan Justen Cc: Gerd Hoffmann Signed-off-by: Chao Li Co-authored-by: Baoqi Zhang ---

[edk2-devel] [PATCH v4 25/37] ArmVirtPkg: Move PlatformBootManagerLib to OvmfPkg

2023-12-12 Thread Chao Li
Moved the PlatformBootManagerLib to OvmfPkg and renamed to PlatformBootManagerLibLight for easy use by other ARCH. Build-tested only (with "ArmVirtQemu.dsc"). BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584 Cc: Ard Biesheuvel Cc: Leif Lindholm Cc: Sami Mujawar Cc: Gerd Hoffmann Cc:

[edk2-devel] [PATCH v4 24/37] ArmVirtPkg: Move the PcdTerminalTypeGuidBuffer into OvmfPkg

2023-12-12 Thread Chao Li
Move the PcdTerminalTypeGuidBuffer into OvmfPkg so other ARCH can easily use it. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584 Cc: Ard Biesheuvel Cc: Leif Lindholm Cc: Sami Mujawar Cc: Gerd Hoffmann Cc: Jiewen Yao Signed-off-by: Chao Li --- ArmVirtPkg/ArmVirtPkg.dec

[edk2-devel] [PATCH v4 23/37] ArmVirtPkg: Move the FdtSerialPortAddressLib to OvmfPkg

2023-12-12 Thread Chao Li
Move the FdtSerialPortAddressLib to Ovmfpkg so that other ARCH can easily use it. Build-tested only (with "ArmVirtQemu.dsc"). BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584 Cc: Ard Biesheuvel Cc: Leif Lindholm Cc: Sami Mujawar Cc: Gerd Hoffmann Cc: Jiewen Yao Cc: Laszlo Ersek

[edk2-devel] [PATCH v4 22/37] OvmfPkg/RiscVVirt: Remove PciCpuIo2Dxe from RiscVVirt

2023-12-12 Thread Chao Li
CpuIo2Dxe is already used by RiscVVirt, so remove it. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584 Cc: Sunil V L Cc: Andrei Warkentin Signed-off-by: Chao Li --- OvmfPkg/RiscVVirt/PciCpuIo2Dxe/PciCpuIo2Dxe.c | 557 -- .../RiscVVirt/PciCpuIo2Dxe/PciCpuIo2Dxe.inf |

[edk2-devel] [PATCH v4 20/37] ArmVirtPkg: Enable UefiCpuPkg version CpuIo2Dxe

2023-12-12 Thread Chao Li
Since the UefiCpuPkg/CpuIo2Dxe already supports MMIO, it is enabled at this thime. Build-tested only (with "ArmVirtQemu.dsc"). BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584 Cc: Ard Biesheuvel Cc: Leif Lindholm Cc: Sami Mujawar Cc: Gerd Hoffmann Signed-off-by: Chao Li ---

[edk2-devel] [PATCH v4 19/37] UefiCpuPkg: Add MMIO method in CpuIo2Dxe

2023-12-12 Thread Chao Li
CpuIo2Dxe only supports IO to access PCI IO. Some ARCH requires MMIO to access PCI IO, add the MMIO access method in CpuIo2Dxe. The MMIO methods depend on PcdPciIoTranslationIsEnabled and PcdPciIoTransLation. The code is referenced from ArmPkg. Build-tested only (with "OvmfPkgX64.dsc"). BZ:

[edk2-devel] [PATCH v4 18/37] MdePkg: Add a PCD feature flag named PcdPciIoTranslationIsEnabled

2023-12-12 Thread Chao Li
Some ARCH need to use MMIO to access PCI IO, such as ARM AARCH64 RISC-V and LOONGARCH64. In some drivers, a PCD value is added to determine whether to use MMIO. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584 Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Signed-off-by: Chao Li

[edk2-devel] [PATCH v4 17/37] ArmVirtPkg: Move PCD of FDT base address and FDT padding to OvmfPkg

2023-12-12 Thread Chao Li
Moved PcdDeviceTreeInitialBaseAddress and PcdDeviceTreeAllocationPadding to OvmfPkg for easier use by other architectures. Build-tested only (with "ArmVirtQemu.dsc"). BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584 Cc: Ard Biesheuvel Cc: Leif Lindholm Cc: Sami Mujawar Cc: Gerd

[edk2-devel] [PATCH v4 16/37] EmbeddedPkg: Add PcdPrePiCpuIoSize width for LOONGARCH64

2023-12-12 Thread Chao Li
Added LoongArch64 architecture CPU IO width. https://bugzilla.tianocore.org/show_bug.cgi?id=4584 Cc: Leif Lindholm Cc: Ard Biesheuvel Cc: Abner Chang Cc: Daniel Schaefer Signed-off-by: Chao Li Reviewed-by: Leif Lindholm --- EmbeddedPkg/EmbeddedPkg.dec | 3 +++ 1 file changed, 3

[edk2-devel] [PATCH v4 15/37] UefiCpuPkg: Add CpuDxe driver for LoongArch64

2023-12-12 Thread Chao Li
Added a new DXE driver named CpuDxeLoongArch64. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584 Cc: Eric Dong Cc: Ray Ni Cc: Rahul Kumar Cc: Gerd Hoffmann Signed-off-by: Chao Li Co-authored-by: Baoqi Zhang Co-authored-by: Dongyan Qian --- UefiCpuPkg/CpuDxeLoongArch64/CpuDxe.c

[edk2-devel] [PATCH v4 14/37] UefiCpuPkg: Add multiprocessor library for LoongArch64

2023-12-12 Thread Chao Li
Added a new library named LoongArch64MpInitLib. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584 Cc: Eric Dong Cc: Ray Ni Cc: Rahul Kumar Cc: Gerd Hoffmann Signed-off-by: Chao Li Acked-by: Ray Ni --- .../LoongArch64MpInitLib/DxeMpInitLib.inf | 45 +

[edk2-devel] [PATCH v4 13/37] UefiCpuPkg: Add LoongArch64CpuMmuLib to UefiCpuPkg

2023-12-12 Thread Chao Li
Add a new library LoongArch64CpuMmuLib. It provides two-stage MMU library instances, PEI and DXE. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584 Cc: Eric Dong Cc: Ray Ni Cc: Rahul Kumar Cc: Gerd Hoffmann Signed-off-by: Chao Li Co-authored-by: Baoqi Zhang Co-authored-by: Dongyan

[edk2-devel] [PATCH v4 12/37] UefiCpuPkg: Add CpuMmuLib.h to UefiCpuPkg

2023-12-12 Thread Chao Li
Add a new header file CpuMmuLib.h, whitch is referenced from ArmPkg/Include/Library/ArmMmuLib.h. Currently, only support for LoongArch64 is added, and more architectures can be accommodated in the future. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584 Cc: Eric Dong Cc: Ray Ni Cc:

[edk2-devel] [PATCH v4 11/37] UefiCpuPkg: Add CPU exception library for LoongArch

2023-12-12 Thread Chao Li
Added a new library named LoongArch64CpuExceptionHandlerLib, and modified the way LoongArch exceptions are expressed. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584 Cc: Eric Dong Cc: Ray Ni Cc: Rahul Kumar Cc: Gerd Hoffmann Signed-off-by: Chao Li Co-authored-by: Baoqi Zhang ---

[edk2-devel] [PATCH v4 10/37] UefiCpuPkg: Add LoongArch64 CPU Timer library

2023-12-12 Thread Chao Li
Add the LoongArch64 CPU Timer library, using CPUCFG 0x4 and 0x5 for Stable Counter frequency. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584 Cc: Eric Dong Cc: Ray Ni Cc: Rahul Kumar Cc: Gerd Hoffmann Signed-off-by: Chao Li --- .../BaseLoongArch64CpuTimerLib.inf| 29 ++

[edk2-devel] [PATCH v4 09/37] MdePkg: Add a new library named PeiServicesTablePointerLibKs0

2023-12-12 Thread Chao Li
Adding PeiServicesTablePointerLibKs0 for LoongArch64, which provides setting and getting the PEI service table pointer through the CSR KS0 register. The idea of this library is derived from ArmPkg/Library/PeiServicesTablePointerLib/ BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584 Cc:

[edk2-devel] [PATCH v4 08/37] MdePkg: Add IOCSR operation for LoongArch

2023-12-12 Thread Chao Li
Add IoCsrRead8, IoCsrRead16, IoCsrRead32, IoCsrRead64, IoCsrWrite8, IoCsrWrite16, IoCsrWrite32, IoCsrWrite64 to operate the IOCSR registers of LoongArch architecture. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584 Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Signed-off-by:

[edk2-devel] [PATCH v4 07/37] MdePkg: Add CSR operation for LoongArch

2023-12-12 Thread Chao Li
Add CsrRead, CsrWrite and CsrXChg functions for LoongArch, and use them to operate the CSR register of LoongArch architecture. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584 Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Signed-off-by: Chao Li Co-authored-by: Bibo Mao

[edk2-devel] [PATCH v4 06/37] MdePkg: Add read stable counter operation for LoongArch

2023-12-12 Thread Chao Li
Add LoongArch gets stable counter ASM function. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584 Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Signed-off-by: Chao Li Acked-by: Michael D Kinney --- MdePkg/Include/Library/BaseLib.h | 12 ++

[edk2-devel] [PATCH v4 05/37] MdePkg: Add LoongArch Cpucfg function

2023-12-12 Thread Chao Li
Add LoongArch AsmCpucfg function and Cpucfg definitions. Also added Include/Register/LoongArch64/Cpucfg.h to IgnoreFiles of EccCheck. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584 Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Signed-off-by: Chao Li Acked-by: Michael D

[edk2-devel] [PATCH v4 04/37] MdePkg: Add LoongArch64 local interrupt function set into BaseLib

2023-12-12 Thread Chao Li
Adding LoongArch local interrupt function set, which is used to control the opening or closing of the local interrupt when the global interrupt is enabled. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584 Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Signed-off-by: Chao Li

[edk2-devel] [PATCH v4 03/37] MdePkg: Add LoongArch64 exception function set into BaseLib

2023-12-12 Thread Chao Li
Adding SetExceptionBaseAddress and SetTlbRebaseAddress functions for LoongArch64. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584 Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Signed-off-by: Chao Li Acked-by: Michael D Kinney --- MdePkg/Include/Library/BaseLib.h

[edk2-devel] [PATCH v4 02/37] MdePkg: Add LoongArch64 FPU function set into BaseCpuLib

2023-12-12 Thread Chao Li
Adding InitializeFloatingPointUnits, EnableFloatingPointUnits and DisableFloatingPointUnits functions for LoongArch64. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584 Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Signed-off-by: Chao Li Acked-by: Michael D Kinney ---

[edk2-devel] [PATCH v4 01/37] MdePkg: Add the header file named Csr.h for LoongArch64

2023-12-12 Thread Chao Li
Adding Csr.h for LoongArch64, it is use for accessing the CSR registers. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584 Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Signed-off-by: Chao Li Acked-by: Michael D Kinney --- MdePkg/Include/Register/LoongArch64/Csr.h | 263

[edk2-devel] [PATCH v4 00/37] Enable LoongArch virtual machine in edk2

2023-12-12 Thread Chao Li
This patch set will enable LoongArch virtual machine in edk2, the new LoongArch virtual machine is located in OvmfPkg/LoongArchVirt/, it is a generic platform that dose not require any actual hardware. Patch1-Patch14: Submit the common library and driver for LoongArch virtual machine and real

Re: [edk2-devel] [PATCH] DebugLib: Allow -Wunneeded-internal-declaration with clang

2023-12-12 Thread Mike Beaton
> You failed to mention where you found this patch. It's from https://github.com/acidanthera/audk/commit/dcd0a768b0f (which actually contains the code described in its commit message, but I believe some other code, including this specific part, which got squashed in at some point, and I believe

Re: [edk2-devel] [edk2-platforms][PATCH V1 3/5] Platform/ARM/N1Sdp: NOR flash Dxe Driver for N1Sdp

2023-12-12 Thread levi.yun
Hi Sahil! On 16/11/2023 11:45, sahil via groups.io wrote: Add NOR flash DXE driver, this brings up NV storage on QSPI's flash device using FVB protocol. Signed-off-by: sahil --- Platform/ARM/N1Sdp/N1SdpPlatform.dec |5 +-

Re: [edk2-devel] [PATCH v4] ArmVirt: Allow memory attributes protocol to be disabled

2023-12-12 Thread Ard Biesheuvel
On Tue, 12 Dec 2023 at 11:08, Gerd Hoffmann wrote: > > On Tue, Dec 12, 2023 at 09:36:00AM +0100, Ard Biesheuvel wrote: > > From: Ard Biesheuvel > > > > Shim's PE loader uses the EFI memory attributes protocol in a way that > > results in an immediate crash when invoking the loaded image, unless

Re: [edk2-devel] [PATCH] DebugLib: Allow -Wunneeded-internal-declaration with clang

2023-12-12 Thread Mike Beaton
> This seems redundant to me. Either we set the pragma and the compiler > does not care, or we don't, and rely on the fact that the compiler can > infer that 'Expression' will never be evaluated at runtime, but won't > complain about symbols that are only referenced via 'Expression' and > nowhere

Re: [edk2-devel] [PATCH] BaseTools/tools_def: Disable unneeded-internal-declaration warning in CLANGPDB

2023-12-12 Thread Mike Beaton
> I'm running some further tests to confirm that the simple version > proposed above builds in all the Acidanthera test environments, which > is relevant in that it should rule out at least any obvious problems > with it building in all edk-2 environments, too. (I had already run > quick tests for

Re: [edk2-devel] [PATCH] BaseTools/tools_def: Disable unneeded-internal-declaration warning in CLANGPDB

2023-12-12 Thread Mike Beaton
> I have realised that this was already fixed (i.e. allowing keeping the > warning) in Acidanthera fork of EDK-II. Discussed here > https://bugzilla.tianocore.org/show_bug.cgi?id=3704 - includes the fix > in question and other fixes for newer gcc as well. I'll post a new > patch to the list

Re: [edk2-devel] [PATCH v4] ArmVirt: Allow memory attributes protocol to be disabled

2023-12-12 Thread Gerd Hoffmann
On Tue, Dec 12, 2023 at 09:36:00AM +0100, Ard Biesheuvel wrote: > From: Ard Biesheuvel > > Shim's PE loader uses the EFI memory attributes protocol in a way that > results in an immediate crash when invoking the loaded image, unless the > base and size of its executable segment are both aligned

Re: [edk2-devel] [PATCH] EmbeddedPkg/PrePiMemoryAllocationLib: Add ReallocatePool

2023-12-12 Thread Ard Biesheuvel
On Mon, 11 Dec 2023 at 16:48, Jeff Brasen wrote: > > Add implementation of ReallocatePool which is defined in the > MemoryAllocationLib header file to allow components to not > need special handling for PrePi module types. > > Signed-off-by: Jeff Brasen Reviewed-by: Ard Biesheuvel > --- >

Re: [edk2-devel] [PATCH 1/1] BaseTools/Scripts/PatchCheck.py: Check for Change-id

2023-12-12 Thread PierreGondois
Hello BaseTools maintainers, Just a ping in case you have any comment for this patch, Regards, Pierre On 11/29/23 10:37, Sami Mujawar wrote: Hi Ray, On 29/11/2023, 00:56, "Ni, Ray" mailto:ray...@intel.com>> wrote: It's good. But I am curious why --ignore-change-id is needed? [SAMI] This

[edk2-devel] [PATCH v4 2/3] Platform/ARM: Juno: Generate _PSD objects

2023-12-12 Thread PierreGondois
From: Pierre Gondois The SsdtCpuTopologyGenerator can generate _PSD objects. Add _PSD information and handling to the Configuration Manager to generate them. Signed-off-by: Pierre Gondois --- .../ConfigurationManager.c| 98 +-- .../ConfigurationManager.h

[edk2-devel] [PATCH v4 3/3] Platform/ARM: Juno: Generate _CPC objects for JunoR2

2023-12-12 Thread PierreGondois
From: Pierre Gondois The SsdtCpuTopologyGenerator can generate _CPC objects. This is done by querying the SCP for the relevant performance state information through SCMI. CM_ARM_CPC_INFO are then populated and used to generate _CPC objects in the Ssdt Cpu topology. Use the

[edk2-devel] [PATCH v4 1/3] Platform/ARM: Juno: Fix typo

2023-12-12 Thread PierreGondois
From: Pierre Gondois Fix a typo. Signed-off-by: Pierre Gondois --- .../ConfigurationManagerDxe/ConfigurationManager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c

[edk2-devel] [PATCH v4 0/3] Platform/ARM: Enable _CPC/_PSD generation on Juno-r2

2023-12-12 Thread PierreGondois
From: Pierre Gondois v1: - https://edk2.groups.io/g/devel/message/104127 v2: - https://edk2.groups.io/g/devel/message/110048 - Rebase patches on latest version. - Correct frequency values which were advertised in KHz when CPPC spec require them to be in MHz. v3: - Rebase on latest master - Use

[edk2-devel] [PATCH v4 10/10] DynamicTablesPkg: Remove check for _CPC field

2023-12-12 Thread PierreGondois
When generating _CPC objects, some fields are mandatory by spec [1]. Some fields cannot be supported by a the Juno platform, which is used to test the _CPC generation. Therefore, don't prevent the generation of _CPC objects if the fields below are missing, and let the OS handle the missing

[edk2-devel] [PATCH v4 09/10] DynamicTablesPkg: Add DynamicTablesScmiInfoLib

2023-12-12 Thread PierreGondois
The SCP holds some power information that could be advertised through the _CPC object. The communication with the SCP is done through SCMI protocols (c.f. ArmScmiDxe). Use the SCMI protocols to query information and feed it to the DynamicTablesPkg. Acked-by: Leif Lindholm Signed-off-by: Pierre

[edk2-devel] [PATCH v4 08/10] DynamicTablesPkg: Generate _PSD in SsdtCpuTopologyGenerator

2023-12-12 Thread PierreGondois
Make use of the newly added AmlCreatePsdNode() to generate _PSD objects. _PSD objects allow to describe 'performance control, P-state or CPPC, logical processor dependency', Cf. ACPI 6.4, s8.4.5.5 _PSD (P-State Dependency). Signed-off-by: Pierre Gondois --- .../SsdtCpuTopologyGenerator.c

[edk2-devel] [PATCH v4 07/10] DynamicTablesPkg: Add AmlCreatePsdNode() to generate _PSD

2023-12-12 Thread PierreGondois
Add AmlCreatePsdNode() to the AmlLib to generate _PSD objects. _PSD objects allow to describe 'performance control, P-state or CPPC, logical processor dependency', Cf. ACPI 6.5, s8.4.5.5 _PSD (P-State Dependency). Signed-off-by: Pierre Gondois --- .../Include/Library/AmlLib/AmlLib.h |

[edk2-devel] [PATCH v4 06/10] DynamicTablesPkg: Add PsdToken field to CM_ARM_GICC_INFO object

2023-12-12 Thread PierreGondois
The _PSD object (cf. ACPI 6.5, s8.4.5.5 _PSD (P-State Dependency) allows to describe CPU's power state dependencies. Add a PsdToken field to the CM_ARM_GICC_INFO object so that interdependent CPUs can reference the same CM_ARM_PSD_INFO object. Signed-off-by: Pierre Gondois ---

[edk2-devel] [PATCH v4 05/10] DynamicTablesPkg: Add CM_ARM_PSD_INFO object

2023-12-12 Thread PierreGondois
Add an object describing _PSD information, cf. ACPI 6.5, s8.4.5.5 _PSD (P-State Dependency). Also add the corresponding CmObjParser. Signed-off-by: Pierre Gondois --- DynamicTablesPkg/Include/AcpiObjects.h| 20 +++ .../Include/ArmNameSpaceObjects.h | 10

[edk2-devel] [PATCH v4 04/10] DynamicTablesPkg: Rename AmlCpcInfo.h to AcpiObjects.h

2023-12-12 Thread PierreGondois
The DynamicTables framework uses the AmlLib to generate some Aml objects. It is done by using structured known by both frameworks, e.g. the AML_CPC_INFO/CM_ARM_CPC_INFO structures. To prepare adding similar structures (e.g. representing _PSD information), rename AmlCpcInfo.h to AcpiObjects.h.

[edk2-devel] [PATCH v4 03/10] DynamicTablesPkg: Use new CPC revision macro

2023-12-12 Thread PierreGondois
Make use of the newly added CPC revision macro. Signed-off-by: Pierre Gondois --- DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c

[edk2-devel] [PATCH v4 02/10] ArmPkg/ArmScmiDxe: Add PERFORMANCE_DESCRIBE_FASTCHANNEL support

2023-12-12 Thread PierreGondois
The PERFORMANCE_DESCRIBE_FASTCHANNEL Scmi command is available since SCMI v2.0 and allows to query information about the supported fast-channels of the Scmi performance protocol. Add support for this command. Also move SCMI_MESSAGE_ID_PERFORMANCE enum definition up in the file to use it in

[edk2-devel] [PATCH v4 00/10] DynamicTablesPkg: Enable _PSD/_CPC generation using SCMI

2023-12-12 Thread PierreGondois
v1: - https://edk2.groups.io/g/devel/message/104115 v2: - https://edk2.groups.io/g/devel/message/104115 - Rebase patches on latest version. v3: - https://edk2.groups.io/g/devel/message/111567 [PATCH 01/11] ArmPkg/ArmScmiDxe: Rename PERFORMANCE_PROTOCOL_VERSION - Note the referenced spec spec is

[edk2-devel] [PATCH v4 01/10] ArmPkg/ArmScmiDxe: Rename PERFORMANCE_PROTOCOL_VERSION

2023-12-12 Thread PierreGondois
Rename PERFORMANCE_PROTOCOL_VERSION to reflect the different versions of the protocol. The macro is neither used in edk2 nor in edk2-platforms. Reviewed-by: Leif Lindholm Signed-off-by: Pierre Gondois --- .../Include/Protocol/ArmScmiPerformanceProtocol.h | 13 - 1 file changed, 8

  1   2   >