Re: [edk2-devel] [PATCH v5 20/36] OvmfPkg/RiscVVirt: Enable CpuMmio2Dxe

2023-12-28 Thread Chao Li
Hi Sunil, Sorry, I forget add your review message, I will add it in patches 20 and 21 when V6 is committed or before merging this patch set. Thanks, Chao On 2023/12/28 18:06, Chao Li wrote: CpuMmio2Dxe is supports MMIO, enable it. Build-tested only (with "RiscVVirtQemu.dsc"). BZ:https://bu

[edk2-devel] [PATCH] UefiCpuPkg/CpuMpPei: Parallel get stack base for better performance.

2023-12-28 Thread Zhiguang Liu
Parallel run the function GetStackBase for all APs for better performance. Cc: Ray Ni Cc: Laszlo Ersek Cc: Rahul Kumar Cc: Gerd Hoffmann Cc: Star Zeng Cc: Daoxiang Li Signed-off-by: Zhiguang Liu --- UefiCpuPkg/CpuMpPei/CpuPaging.c | 56 + 1 file changed, 29

Re: [edk2-devel] [RFC][PATCH 0/2] Introduce HTTPS Platform TLS policy

2023-12-28 Thread Michael Brown
On 28/12/2023 23:37, Chang, Abner via groups.io wrote: As far as I am aware, EfiHttpRequest sets up all of the relevant data structures but functions as a non-blocking open. If you reconfigure the TLS session immediately after return from EfiHttpRequest() then this reconfiguration should take ef

Re: [edk2-devel] [RFC][PATCH 0/2] Introduce HTTPS Platform TLS policy

2023-12-28 Thread Chang, Abner via groups.io
[AMD Official Use Only - General] > -Original Message- > From: Michael Brown > Sent: Thursday, December 28, 2023 11:32 PM > To: devel@edk2.groups.io; Chang, Abner > Cc: Saloni Kasbekar ; Zachary Clark-williams > ; Nickle Wang ; Igor > Kulchytskyy > Subject: Re: [edk2-devel] [RFC][PATCH

Re: [edk2-devel] [PATCH] BaseTools/Workspace: Build fail if structure PCD is referred

2023-12-28 Thread Chang, Abner via groups.io
[AMD Official Use Only - General] Ok, please let me know when you merge the fix. Thank you Abner From: Joey Vagedes via groups.io Sent: Friday, December 29, 2023 12:03 AM To: Chang; Chang, Abner ; devel@edk2.groups.io Subject: Re: [edk2-devel] [PATCH] BaseTools/Workspace: Build fail if structur

[edk2-devel] [PATCH v2 3/3] EmbeddedPkg: Add DtPlatformLoaderLib gmock support

2023-12-28 Thread Jeff Brasen via groups.io
Add Google Mock Library for DtPlatformLoaderDtbLib Signed-off-by: Jeff Brasen --- EmbeddedPkg/EmbeddedPkg.dec | 1 + .../MockDtPlatformDtbLoaderLib.inf| 29 + .../Library/MockDtPlatformDtbLoaderLib.h | 31 +++ .../MockDtPlatform

[edk2-devel] [PATCH v2 1/3] EmbeddedPkg/PrePiMemoryAllocationLib: Add ReallocatePool

2023-12-28 Thread Jeff Brasen via groups.io
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 --- .../MemoryAllocationLib.c | 57 +++ 1 file changed, 57 insertio

[edk2-devel] [PATCH v2 2/3] EmbeddedPkg: Add host based dependency to ci

2023-12-28 Thread Jeff Brasen via groups.io
Add UnitTestFrameworkPkg to AcceptableDependencies-HOST_APPLICATION list Signed-off-by: Jeff Brasen --- EmbeddedPkg/EmbeddedPkg.ci.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/EmbeddedPkg/EmbeddedPkg.ci.yaml b/EmbeddedPkg/EmbeddedPkg.ci.yaml index 96a60a6f8b4d..6d0

[edk2-devel] [PATCH v2 0/3] EmbeddedPkg ReallocatePool and Mock changes

2023-12-28 Thread Jeff Brasen via groups.io
Adding Mock support for DtPlatformLoaderLib and changing ci.yaml to support this Adding ReallocatePool support to PrePi Library. Passing CI in https://github.com/tianocore/edk2/pull/5197 Change log v2 - Fix uncrustify errors Fix ci allowed packages entries Fix cast on 32-bit systems Jeff B

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

2023-12-28 Thread Jeff Brasen via groups.io
Looks like I missed an UINTN cast will fix and push a v2. > -Original Message- > From: Ard Biesheuvel > Sent: Thursday, December 21, 2023 7:54 AM > To: Chang, Abner > Cc: Jeff Brasen ; devel@edk2.groups.io; > ardb+tianoc...@kernel.org; quic_llind...@quicinc.com > Subject: Re: [PATCH] Em

Re: [edk2-devel] [PATCH] BaseTools/Workspace: Build fail if structure PCD is referred

2023-12-28 Thread Joey Vagedes via groups.io
I found two other files with similar issues. Here is my patch series to resolve all. [PATCH v1 1/1] BaseTools: Fix raw strings containing valid escape characters (groups.io) ( https://edk2.groups.io/g/devel/message/112986 ) -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent

[edk2-devel] [PATCH v1 1/1] BaseTools: Fix raw strings containing valid escape characters

2023-12-28 Thread Joey Vagedes via groups.io
Fixes raw regex strings that contain valid (and purposeful) escape characters as they are being treated as individual characters rather than the single escaped character they represent (i.e. '\t' is being treated as a '\' and a 't' rather than a single tab character). Signed-off-by: Joey Vagedes

[edk2-devel] [PATCH v1 0/1] Fix raw strings containing valid escape characters

2023-12-28 Thread Joey Vagedes via groups.io
Commit 9f0061a03b61d282fbc0ba5be22155d06a5e64a1 was intended to fix regex strings using invalid escape characters. The regex module suggested way to fix this is to use the raw string modifiler (`r'`). However in doing this, any strings that also contained valid escape characters that were being use

Re: [edk2-devel] Some unpredictable behavior while parsing the FDF file.

2023-12-28 Thread Joey Vagedes via groups.io
Hello. It depends on the actual path that you are trying to include. This is the requirements for an include statement (coming directly from the FDF specification): > > > > The tools look for relative to the directory the FDF file > resides. If the file is not found, and the directory conta

Re: [edk2-devel] [PATCH] BaseTools/Workspace: Build fail if structure PCD is referred

2023-12-28 Thread Joey Vagedes via groups.io
Hello, This is in regard to my recent patch (see commit here: BaseTools: Resolve regex syntax warnings ยท tianocore/edk2@9f0061a (github.com) ( https://github.com/tianocore/edk2/commit/9f0061a03b61d282fbc0ba5be22155d06a5e64a1 ) ) that was resolving the newly introduced syntax warnings (that will

Re: [edk2-devel] [RFC][PATCH 0/2] Introduce HTTPS Platform TLS policy

2023-12-28 Thread Michael Brown
On 28/12/2023 15:04, Chang, Abner via groups.io wrote: With the TLS protocol installed onto the same handle, I don't think you then even need to use RegisterProtocolNotify(). On return from EFI_HTTP_PROTOCOL.Request() you can open the TLS protocol on the handle and immediately call SetSessionDat

Re: [edk2-devel] [RFC][PATCH 0/2] Introduce HTTPS Platform TLS policy

2023-12-28 Thread Chang, Abner via groups.io
[AMD Official Use Only - General] > -Original Message- > From: Michael Brown > Sent: Thursday, December 28, 2023 10:16 PM > To: devel@edk2.groups.io; Chang, Abner > Cc: Saloni Kasbekar ; Zachary Clark-williams > ; Nickle Wang ; Igor > Kulchytskyy > Subject: Re: [edk2-devel] [RFC][PATCH

Re: [edk2-devel] [RFC][PATCH 0/2] Introduce HTTPS Platform TLS policy

2023-12-28 Thread Michael Brown
On 28/12/2023 02:47, Chang, Abner via groups.io wrote: On 26/12/2023 11:28, Chang, Abner via groups.io wrote: Platform developer can provide this protoocl to EFI HTTP driver to configure TLS using TLS conifg data provided by EDKII_HTTPS_TLS_PLATFORM_POLICY_PROTOCOL for the specific HTTP protocol

[edk2-devel] [PATCH v5 36/36] OvmfPkg/LoongArchVirt: Add self introduction file

2023-12-28 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 c

[edk2-devel] [PATCH v5 35/36] OvmfPkg/LoongArchVirt: Add build file

2023-12-28 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 --- OvmfPkg/

[edk2-devel] [PATCH v5 34/36] OvmfPkg/LoongArchVirt: Support PEI phase

2023-12-28 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 --- OvmfPkg/LoongArchVirt/Pl

[edk2-devel] [PATCH v5 33/36] OvmfPkg/LoongArchVirt: Support SEC phase

2023-12-28 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 --- OvmfPkg/LoongArchVirt/Sec/LoongArch64/S

[edk2-devel] [PATCH v5 32/36] OvmfPkg/LoongArchVirt: Add reset system library

2023-12-28 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: Bi

[edk2-devel] [PATCH v5 31/36] OvmfPkg/LoongArchVirt: Add FdtQemuFwCfgLib

2023-12-28 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: Ger

[edk2-devel] [PATCH v5 30/36] OvmfPkg/LoongArchVirt: Add NorFlashQemuLib

2023-12-28 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 --- .../Library/No

[edk2-devel] [PATCH v5 29/36] OvmfPkg/LoongArchVirt: Add real time clock library

2023-12-28 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 --- .../DxeL

[edk2-devel] [PATCH v5 28/36] OvmfPkg/LoongArchVirt: Add the early serial port output library

2023-12-28 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, the

[edk2-devel] [PATCH v5 26/36] OvmfPkg/LoongArchVirt: Add a NULL library named CollectApResouceLibNull

2023-12-28 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 v5 27/36] OvmfPkg/LoongArchVirt: Add serial port hook library

2023-12-28 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: https://bugzilla.tianocore.or

[edk2-devel] [PATCH v5 25/36] OvmfPkg/LoongArchVirt: Add stable timer driver

2023-12-28 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 --- .../Drive

[edk2-devel] [PATCH v5 24/36] ArmVirtPkg: Move PlatformBootManagerLib to OvmfPkg

2023-12-28 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: J

[edk2-devel] [PATCH v5 23/36] ArmVirtPkg: Move PcdTerminalTypeGuidBuffer and PcdUninstallMemAttrProtocol into OvmfPkg

2023-12-28 Thread Chao Li
Move the PcdTerminalTypeGuidBuffer and PcdUninstallMemAttrProtocol 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 --- ArmVirt

[edk2-devel] [PATCH v5 22/36] ArmVirtPkg: Move the FdtSerialPortAddressLib to OvmfPkg

2023-12-28 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 Sign

[edk2-devel] [PATCH v5 21/36] OvmfPkg/RiscVVirt: Remove PciCpuIo2Dxe from RiscVVirt

2023-12-28 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 v5 20/36] OvmfPkg/RiscVVirt: Enable CpuMmio2Dxe

2023-12-28 Thread Chao Li
CpuMmio2Dxe is supports MMIO, enable it. 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 | 2 +- OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf | 2 +- 2 files changed, 2 inse

[edk2-devel] [PATCH v5 19/36] ArmVirtPkg: Enable CpuMmio2Dxe

2023-12-28 Thread Chao Li
CpuMmio2Dxe is supports MMIO, enable 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 Signed-off-by: Chao Li --- ArmVirtPkg/ArmVirtCloudHv.dsc| 2 +- ArmVi

[edk2-devel] [PATCH v5 18/36] UefiCpuPkg: Add a new CPU IO 2 driver named CpuMmio2Dxe

2023-12-28 Thread Chao Li
CpuIo2Dxe only supports IO to access to CPU IO. Some ARCHs that do not implement ports for CPU IO require MMIO to access PCI IO, and they pretty much put the IO devices under the LPC bus, which is usually under the PCIe/PCI bus. CpuMmio2Dxe was added to meet these needs. CpuMmio2Dxe depends on Pcd

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

2023-12-28 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 Hoffman

[edk2-devel] [PATCH v5 16/36] EmbeddedPkg: Add PcdPrePiCpuIoSize width for LOONGARCH64

2023-12-28 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 insertions(

[edk2-devel] [PATCH v5 15/36] UefiCpuPkg: Add CpuDxe driver for LoongArch64

2023-12-28 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 Acked-by: Ray Ni --- UefiCpuPkg/CpuDxeLoongAr

[edk2-devel] [PATCH v5 14/36] UefiCpuPkg: Add multiprocessor library for LoongArch64

2023-12-28 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 + .../LoongArch64MpInitLib/Dx

[edk2-devel] [PATCH v5 13/36] UefiCpuPkg: Add LoongArch64CpuMmuLib to UefiCpuPkg

2023-12-28 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 Qia

[edk2-devel] [PATCH v5 12/36] UefiCpuPkg: Add CpuMmuLib.h to UefiCpuPkg

2023-12-28 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: Rahul

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

2023-12-28 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 Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Sign

[edk2-devel] [PATCH v5 10/36] UefiCpuPkg: Add LoongArch64 CPU Timer library

2023-12-28 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 Acked-by: Ray Ni --- .../BaseLoongArch64CpuTimerLib.inf

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

2023-12-28 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: Mic

[edk2-devel] [PATCH v5 08/36] MdePkg: Add IOCSR operation for LoongArch

2023-12-28 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: Cha

[edk2-devel] [PATCH v5 07/36] MdePkg: Add CSR operation for LoongArch

2023-12-28 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 Acked-by

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

2023-12-28 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 ++ MdePkg/Library/Ba

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

2023-12-28 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 Acked

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

2023-12-28 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 v5 02/36] MdePkg: Add LoongArch64 FPU function set into BaseCpuLib

2023-12-28 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 --- MdePkg/In

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

2023-12-28 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 v5 00/36] Enable LoongArch virtual machine in edk2

2023-12-28 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 hard