From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from loongson.cn (loongson.cn [114.242.206.163]) by mx.groups.io with SMTP id smtpd.web08.36790.1665975683999401735 for ; Sun, 16 Oct 2022 20:01:24 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: loongson.cn, ip: 114.242.206.163, mailfrom: lixianglai@loongson.cn) Received: from [10.20.42.66] (unknown [10.20.42.66]) by localhost.localdomain (Coremail) with SMTP id AQAAf8DxReJ7xUxjZGEwAA--.39889S3; Mon, 17 Oct 2022 11:01:15 +0800 (CST) Subject: [edk2-devel] [edk2-platforms][PATCH V3 00/16] Platform: Add Loongson support. References: <171DD399EA15F359.10474@groups.io> To: devel@edk2.groups.io Cc: quic_llindhol@quicinc.com, michael.d.kinney@intel.com, kraxel@redhat.com, ardb@kernel.org, maobibo@loongson.cn From: "xianglai" X-Forwarded-Message-Id: <171DD399EA15F359.10474@groups.io> Message-ID: Date: Mon, 17 Oct 2022 11:01:15 +0800 User-Agent: Mozilla/5.0 (X11; Linux mips64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <171DD399EA15F359.10474@groups.io> X-CM-TRANSID: AQAAf8DxReJ7xUxjZGEwAA--.39889S3 X-Coremail-Antispam: 1UD129KBjvAXoWfJFyfXF18GrW3Kr15Zw18Zrb_yoW8Xr4kXo W8JFZrCw4UJr1rAasYg3ZxJrWxX3ZFqw4Fqr40vayUZFZIkr9FqFs8Xa4xWF1rZFy3Aw15 G345K3ykJFZrXrZ3n29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73VFW2AGmfu7bjvjm3 AaLaJ3UjIYCTnIWjp_UUUYs7AC8VAFwI0_Gr0_Xr1l1xkIjI8I6I8E6xAIw20EY4v20xva j40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2 x7M28EF7xvwVC0I7IYx2IY67AKxVW5JVW7JwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVWx JVW8Jr1l84ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVCY1x0267AKxV WxJr0_GcWle2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG6I80eVAI3cIFxVC2b4A2awAv 7VC0I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r 1j6r4UM4x0Y48IcVAKI48JM4x0x7Aq67IIx4CEVc8vx2IErcIFxwCYjI0SjxkI62AI1cAE 67vIY487MxkIecxEwVCm-wCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8Jw C20s026c02F40E14v26r106r1rMI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAF wI0_JF0_Jw1lIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjx v20xvEc7CjxVAFwI0_Jr0_Gr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2 jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Jr0_GrUvcSsGvfC2KfnxnUUI43 ZEXa7VU1q2NtUUUUU== X-CM-SenderInfo: 5ol0xt5qjotxo6or00hjvr0hdfq/ Content-Type: multipart/alternative; boundary="------------91261DC0A3D1EE225EE270B3" Content-Language: en-US --------------91261DC0A3D1EE225EE270B3 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Hello everyone:   I'm sorry to bother you all.loongson cpu related code has merged to edk2 mainline. Please take some time out of your busy schedules to review the platform-related code. If there are any problems with the process, please let me know. Tanks xianglai -------- Forwarded Message -------- Subject: [edk2-devel] [edk2-platforms][PATCH V3 00/16] Platform: Add Loongson support. Date: Fri, 14 Oct 2022 12:01:13 +0800 From: xianglai Reply-To: devel@edk2.groups.io, lixianglai@loongson.cn To: devel@edk2.groups.io CC: quic_llindhol@quicinc.com, michael.d.kinney@intel.com, kraxel@redhat.com, ardb@kernel.org, maobibo@loongson.cn REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4054 The uploaded code generates firmware to support Linux launching on the LoongArch platform under qemu, So it will run in a virtual machine. LoongArch is the general processor architecture of Loongson. You can get the latest LoongArch documents or LoongArch tools at https://github.com/loongson/. You can also view the code through the Loongson community. The edk2 code in Loongson community: https://github.com/loongson/edk2/tree/LoongArch The edk2-platform code in Loonson community: https://github.com/loongson/edk2-platforms The qemu code in Loongson community: https://gitlab.com/qemu-project/qemu.git The LoongArch Documentation in Loongson community: https://github.com/loongson/LoongArch-Documentation/tree/main/docs The all patches at: https://github.com/loongson/edk2-platforms/tree/devel-LoongArch-patch v2 changes: - Remove the inline assembly from StableTimerLib. - troubleshoot TAB strings, convert TAB characters to spaces. - remove smm related code, loongarch has no smm mode. v3 changes: - delete ExtractHandler related code. - Boot UEFI with low 256M memory. - Modify common interrupt handling. xianglai li (16): Platform/Loongson: Add Serial Port library Platform/Loongson: Support SEC And Add Readme.md Platform/Loongson: Add PeiServicesTablePointerLib. Platform/Loongson: Add QemuFwCfgLib. Platform/Loongson: Add MmuLib. Platform/Loongson: Add StableTimerLib. Platform/Loongson: Support PEI phase. Platform/Loongson: Add CPU DXE driver. Platform/Loongson: Add PciCpuIoDxe driver. Platform/Loongson: Add timer Dxe driver. Platform/Loongson: Add RealTime Clock lib. Platform/Loongson: Add Platform Boot Manager Lib. Platform/Loongson: Add Reset System Lib. Platform/Loongson: Support Dxe Platform/Loongson: Add QemuFlashFvbServicesRuntimeDxe driver. Platform/Loongson: Support for saving variables to flash. Maintainers.txt | 4 + .../LoongArchQemuPkg/Drivers/CpuDxe/CpuDxe.c | 382 ++++++ .../LoongArchQemuPkg/Drivers/CpuDxe/CpuDxe.h | 151 +++ .../Drivers/CpuDxe/CpuDxe.inf | 56 + .../Drivers/CpuDxe/LoongArch64/Exception.c | 338 +++++ .../Drivers/CpuDxe/LoongArch64/Fpu.S | 67 + .../Drivers/CpuDxe/LoongArch64/LoongArch.S | 292 +++++ .../Drivers/PciCpuIo2Dxe/PciCpuIo2Dxe.c | 548 ++++++++ .../Drivers/PciCpuIo2Dxe/PciCpuIo2Dxe.h | 219 ++++ .../Drivers/PciCpuIo2Dxe/PciCpuIo2Dxe.inf | 40 + .../QemuFlashFvbServicesRuntimeDxe/FvbInfo.c | 115 ++ .../FvbServicesRuntimeDxe.inf | 73 ++ .../FwBlockService.c | 1158 +++++++++++++++++ .../FwBlockService.h | 178 +++ .../FwBlockServiceDxe.c | 152 +++ .../QemuFlash.c | 251 ++++ .../QemuFlash.h | 86 ++ .../QemuFlashDxe.c | 21 + .../Drivers/StableTimerDxe/Timer.c | 405 ++++++ .../Drivers/StableTimerDxe/Timer.h | 165 +++ .../Drivers/StableTimerDxe/TimerDxe.inf | 40 + .../Include/IndustryStandard/QemuFwCfg.h | 95 ++ .../LoongArchQemuPkg/Include/Library/Cpu.h | 387 ++++++ .../LoongArchQemuPkg/Include/Library/MmuLib.h | 85 ++ .../Include/Library/QemuFwCfgLib.h | 193 +++ .../Include/Library/StableTimer.h | 43 + .../Include/LoongArchAsmMacro.h | 23 + .../Include/LoongArchQemuPlatform.h | 97 ++ .../LsRealTimeClockLib/LsRealTimeClock.h | 41 + .../LsRealTimeClockLib/LsRealTimeClockLib.c | 343 +++++ .../LsRealTimeClockLib/LsRealTimeClockLib.inf | 41 + .../LoongArchQemuPkg/Library/MmuLib/Mmu.S | 35 + .../Library/MmuLib/MmuBaseLib.inf | 35 + .../Library/MmuLib/MmuBaseLibPei.inf | 42 + .../Library/MmuLib/MmuLibCore.c | 908 +++++++++++++ .../Library/MmuLib/MmuLibCore.h | 39 + .../Library/MmuLib/MmuLibCorePei.c | 236 ++++ .../LoongArchQemuPkg/Library/MmuLib/mmu.h | 104 ++ .../LoongArchQemuPkg/Library/MmuLib/page.h | 267 ++++ .../LoongArchQemuPkg/Library/MmuLib/pte.h | 57 + .../PeiServicesTablePointer.c | 78 ++ .../PeiServicesTablePointerLib.inf | 32 + .../PlatformBootManagerLib/PlatformBm.c | 760 +++++++++++ .../PlatformBootManagerLib/PlatformBm.h | 112 ++ .../PlatformBootManagerLib.inf | 78 ++ .../PlatformBootManagerLib/QemuKernel.c | 81 ++ .../QemuFwCfgLib/QemuFwCfgLibInternal.h | 64 + .../Library/QemuFwCfgLib/QemuFwCfgPei.c | 119 ++ .../Library/QemuFwCfgLib/QemuFwCfgPeiLib.c | 477 +++++++ .../Library/QemuFwCfgLib/QemuFwCfgPeiLib.inf | 44 + .../BaseResetSystemAcpiGed.c | 155 +++ .../BaseResetSystemAcpiGedLib.inf | 42 + .../DxeResetSystemAcpiGed.c | 270 ++++ .../DxeResetSystemAcpiGedLib.inf | 47 + .../ResetSystemAcpiLib/ResetSystemAcpiGed.c | 128 ++ .../ResetSystemAcpiLib/ResetSystemAcpiGed.h | 20 + .../Library/SerialPortLib/SerialPortLib.c | 612 +++++++++ .../Library/SerialPortLib/SerialPortLib.inf | 36 + .../Library/StableTimerLib/Count.S | 35 + .../Library/StableTimerLib/TimerLib.c | 242 ++++ .../Library/StableTimerLib/TimerLib.inf | 28 + .../Loongson/LoongArchQemuPkg/Loongson.dec | 76 ++ .../Loongson/LoongArchQemuPkg/Loongson.dsc | 606 +++++++++ .../Loongson/LoongArchQemuPkg/Loongson.fdf | 361 +++++ .../LoongArchQemuPkg/Loongson.fdf.inc | 74 ++ .../LoongArchQemuPkg/PlatformPei/Fv.c | 61 + .../LoongArchQemuPkg/PlatformPei/MemDetect.c | 108 ++ .../LoongArchQemuPkg/PlatformPei/Platform.c | 264 ++++ .../LoongArchQemuPkg/PlatformPei/Platform.h | 87 ++ .../PlatformPei/PlatformPei.inf | 71 + Platform/Loongson/LoongArchQemuPkg/Readme.md | 59 + .../LoongArchQemuPkg/Sec/LoongArch64/Start.S | 76 ++ .../Loongson/LoongArchQemuPkg/Sec/SecMain.c | 510 ++++++++ .../Loongson/LoongArchQemuPkg/Sec/SecMain.inf | 47 + .../LoongArchQemuPkg/VarStore.fdf.inc | 64 + Readme.md | 9 + 76 files changed, 13745 insertions(+) create mode 100644 Platform/Loongson/LoongArchQemuPkg/Drivers/CpuDxe/CpuDxe.c create mode 100644 Platform/Loongson/LoongArchQemuPkg/Drivers/CpuDxe/CpuDxe.h create mode 100644 Platform/Loongson/LoongArchQemuPkg/Drivers/CpuDxe/CpuDxe.inf create mode 100644 Platform/Loongson/LoongArchQemuPkg/Drivers/CpuDxe/LoongArch64/Exception.c create mode 100644 Platform/Loongson/LoongArchQemuPkg/Drivers/CpuDxe/LoongArch64/Fpu.S create mode 100644 Platform/Loongson/LoongArchQemuPkg/Drivers/CpuDxe/LoongArch64/LoongArch.S create mode 100644 Platform/Loongson/LoongArchQemuPkg/Drivers/PciCpuIo2Dxe/PciCpuIo2Dxe.c create mode 100644 Platform/Loongson/LoongArchQemuPkg/Drivers/PciCpuIo2Dxe/PciCpuIo2Dxe.h create mode 100644 Platform/Loongson/LoongArchQemuPkg/Drivers/PciCpuIo2Dxe/PciCpuIo2Dxe.inf create mode 100644 Platform/Loongson/LoongArchQemuPkg/Drivers/QemuFlashFvbServicesRuntimeDxe/FvbInfo.c create mode 100644 Platform/Loongson/LoongArchQemuPkg/Drivers/QemuFlashFvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf create mode 100644 Platform/Loongson/LoongArchQemuPkg/Drivers/QemuFlashFvbServicesRuntimeDxe/FwBlockService.c create mode 100644 Platform/Loongson/LoongArchQemuPkg/Drivers/QemuFlashFvbServicesRuntimeDxe/FwBlockService.h create mode 100644 Platform/Loongson/LoongArchQemuPkg/Drivers/QemuFlashFvbServicesRuntimeDxe/FwBlockServiceDxe.c create mode 100644 Platform/Loongson/LoongArchQemuPkg/Drivers/QemuFlashFvbServicesRuntimeDxe/QemuFlash.c create mode 100644 Platform/Loongson/LoongArchQemuPkg/Drivers/QemuFlashFvbServicesRuntimeDxe/QemuFlash.h create mode 100644 Platform/Loongson/LoongArchQemuPkg/Drivers/QemuFlashFvbServicesRuntimeDxe/QemuFlashDxe.c create mode 100644 Platform/Loongson/LoongArchQemuPkg/Drivers/StableTimerDxe/Timer.c create mode 100644 Platform/Loongson/LoongArchQemuPkg/Drivers/StableTimerDxe/Timer.h create mode 100644 Platform/Loongson/LoongArchQemuPkg/Drivers/StableTimerDxe/TimerDxe.inf create mode 100644 Platform/Loongson/LoongArchQemuPkg/Include/IndustryStandard/QemuFwCfg.h create mode 100644 Platform/Loongson/LoongArchQemuPkg/Include/Library/Cpu.h create mode 100644 Platform/Loongson/LoongArchQemuPkg/Include/Library/MmuLib.h create mode 100644 Platform/Loongson/LoongArchQemuPkg/Include/Library/QemuFwCfgLib.h create mode 100644 Platform/Loongson/LoongArchQemuPkg/Include/Library/StableTimer.h create mode 100644 Platform/Loongson/LoongArchQemuPkg/Include/LoongArchAsmMacro.h create mode 100644 Platform/Loongson/LoongArchQemuPkg/Include/LoongArchQemuPlatform.h create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/LsRealTimeClockLib/LsRealTimeClock.h create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/LsRealTimeClockLib/LsRealTimeClockLib.c create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/LsRealTimeClockLib/LsRealTimeClockLib.inf create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/MmuLib/Mmu.S create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/MmuLib/MmuBaseLib.inf create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/MmuLib/MmuBaseLibPei.inf create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/MmuLib/MmuLibCore.c create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/MmuLib/MmuLibCore.h create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/MmuLib/MmuLibCorePei.c create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/MmuLib/mmu.h create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/MmuLib/page.h create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/MmuLib/pte.h create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/PlatformBootManagerLib/PlatformBm.c create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/PlatformBootManagerLib/PlatformBm.h create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/PlatformBootManagerLib/QemuKernel.c create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/QemuFwCfgLib/QemuFwCfgLibInternal.h create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/QemuFwCfgLib/QemuFwCfgPei.c create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/QemuFwCfgLib/QemuFwCfgPeiLib.c create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/QemuFwCfgLib/QemuFwCfgPeiLib.inf create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/ResetSystemAcpiLib/BaseResetSystemAcpiGed.c create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/ResetSystemAcpiLib/BaseResetSystemAcpiGedLib.inf create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/ResetSystemAcpiLib/DxeResetSystemAcpiGed.c create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/ResetSystemAcpiLib/DxeResetSystemAcpiGedLib.inf create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/ResetSystemAcpiLib/ResetSystemAcpiGed.c create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/ResetSystemAcpiLib/ResetSystemAcpiGed.h create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/SerialPortLib/SerialPortLib.c create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/SerialPortLib/SerialPortLib.inf create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/StableTimerLib/Count.S create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/StableTimerLib/TimerLib.c create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/StableTimerLib/TimerLib.inf create mode 100644 Platform/Loongson/LoongArchQemuPkg/Loongson.dec create mode 100644 Platform/Loongson/LoongArchQemuPkg/Loongson.dsc create mode 100644 Platform/Loongson/LoongArchQemuPkg/Loongson.fdf create mode 100644 Platform/Loongson/LoongArchQemuPkg/Loongson.fdf.inc create mode 100644 Platform/Loongson/LoongArchQemuPkg/PlatformPei/Fv.c create mode 100644 Platform/Loongson/LoongArchQemuPkg/PlatformPei/MemDetect.c create mode 100644 Platform/Loongson/LoongArchQemuPkg/PlatformPei/Platform.c create mode 100644 Platform/Loongson/LoongArchQemuPkg/PlatformPei/Platform.h create mode 100644 Platform/Loongson/LoongArchQemuPkg/PlatformPei/PlatformPei.inf create mode 100644 Platform/Loongson/LoongArchQemuPkg/Readme.md create mode 100644 Platform/Loongson/LoongArchQemuPkg/Sec/LoongArch64/Start.S create mode 100644 Platform/Loongson/LoongArchQemuPkg/Sec/SecMain.c create mode 100644 Platform/Loongson/LoongArchQemuPkg/Sec/SecMain.inf create mode 100644 Platform/Loongson/LoongArchQemuPkg/VarStore.fdf.inc -- 2.31.1 --------------91261DC0A3D1EE225EE270B3 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: 8bit

Hello everyone:

  I'm sorry to bother you all.loongson cpu related code has merged to edk2 mainline.

Please take some time out of your busy schedules to review the platform-related code.

If there are any problems with the process, please let me know.


Tanks

xianglai

-------- Forwarded Message --------
Subject: [edk2-devel] [edk2-platforms][PATCH V3 00/16] Platform: Add Loongson support.
Date: Fri, 14 Oct 2022 12:01:13 +0800
From: xianglai <lixianglai@loongson.cn>
Reply-To: devel@edk2.groups.io, lixianglai@loongson.cn
To: devel@edk2.groups.io
CC: quic_llindhol@quicinc.com, michael.d.kinney@intel.com, kraxel@redhat.com, ardb@kernel.org, maobibo@loongson.cn


REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4054

The uploaded code generates firmware to support Linux launching on the LoongArch platform under qemu,
So it will run in a virtual machine.

LoongArch is the general processor architecture of Loongson.
You can get the latest LoongArch documents or LoongArch tools at https://github.com/loongson/.

You can also view the code through the Loongson community.
The edk2 code in Loongson community:
https://github.com/loongson/edk2/tree/LoongArch
The edk2-platform code in Loonson community:
https://github.com/loongson/edk2-platforms
The qemu code in Loongson community:
https://gitlab.com/qemu-project/qemu.git
The LoongArch Documentation in Loongson community:
https://github.com/loongson/LoongArch-Documentation/tree/main/docs
The all patches at:
https://github.com/loongson/edk2-platforms/tree/devel-LoongArch-patch

v2 changes:
- Remove the inline assembly from StableTimerLib.
- troubleshoot TAB strings, convert TAB characters to spaces.
- remove smm related code, loongarch has no smm mode.

v3 changes:
- delete ExtractHandler related code.
- Boot UEFI with low 256M memory.
- Modify common interrupt handling.

xianglai li (16):
Platform/Loongson: Add Serial Port library
Platform/Loongson: Support SEC And Add Readme.md
Platform/Loongson: Add PeiServicesTablePointerLib.
Platform/Loongson: Add QemuFwCfgLib.
Platform/Loongson: Add MmuLib.
Platform/Loongson: Add StableTimerLib.
Platform/Loongson: Support PEI phase.
Platform/Loongson: Add CPU DXE driver.
Platform/Loongson: Add PciCpuIoDxe driver.
Platform/Loongson: Add timer Dxe driver.
Platform/Loongson: Add RealTime Clock lib.
Platform/Loongson: Add Platform Boot Manager Lib.
Platform/Loongson: Add Reset System Lib.
Platform/Loongson: Support Dxe
Platform/Loongson: Add QemuFlashFvbServicesRuntimeDxe driver.
Platform/Loongson: Support for saving variables to flash.

Maintainers.txt | 4 +
.../LoongArchQemuPkg/Drivers/CpuDxe/CpuDxe.c | 382 ++++++
.../LoongArchQemuPkg/Drivers/CpuDxe/CpuDxe.h | 151 +++
.../Drivers/CpuDxe/CpuDxe.inf | 56 +
.../Drivers/CpuDxe/LoongArch64/Exception.c | 338 +++++
.../Drivers/CpuDxe/LoongArch64/Fpu.S | 67 +
.../Drivers/CpuDxe/LoongArch64/LoongArch.S | 292 +++++
.../Drivers/PciCpuIo2Dxe/PciCpuIo2Dxe.c | 548 ++++++++
.../Drivers/PciCpuIo2Dxe/PciCpuIo2Dxe.h | 219 ++++
.../Drivers/PciCpuIo2Dxe/PciCpuIo2Dxe.inf | 40 +
.../QemuFlashFvbServicesRuntimeDxe/FvbInfo.c | 115 ++
.../FvbServicesRuntimeDxe.inf | 73 ++
.../FwBlockService.c | 1158 +++++++++++++++++
.../FwBlockService.h | 178 +++
.../FwBlockServiceDxe.c | 152 +++
.../QemuFlash.c | 251 ++++
.../QemuFlash.h | 86 ++
.../QemuFlashDxe.c | 21 +
.../Drivers/StableTimerDxe/Timer.c | 405 ++++++
.../Drivers/StableTimerDxe/Timer.h | 165 +++
.../Drivers/StableTimerDxe/TimerDxe.inf | 40 +
.../Include/IndustryStandard/QemuFwCfg.h | 95 ++
.../LoongArchQemuPkg/Include/Library/Cpu.h | 387 ++++++
.../LoongArchQemuPkg/Include/Library/MmuLib.h | 85 ++
.../Include/Library/QemuFwCfgLib.h | 193 +++
.../Include/Library/StableTimer.h | 43 +
.../Include/LoongArchAsmMacro.h | 23 +
.../Include/LoongArchQemuPlatform.h | 97 ++
.../LsRealTimeClockLib/LsRealTimeClock.h | 41 +
.../LsRealTimeClockLib/LsRealTimeClockLib.c | 343 +++++
.../LsRealTimeClockLib/LsRealTimeClockLib.inf | 41 +
.../LoongArchQemuPkg/Library/MmuLib/Mmu.S | 35 +
.../Library/MmuLib/MmuBaseLib.inf | 35 +
.../Library/MmuLib/MmuBaseLibPei.inf | 42 +
.../Library/MmuLib/MmuLibCore.c | 908 +++++++++++++
.../Library/MmuLib/MmuLibCore.h | 39 +
.../Library/MmuLib/MmuLibCorePei.c | 236 ++++
.../LoongArchQemuPkg/Library/MmuLib/mmu.h | 104 ++
.../LoongArchQemuPkg/Library/MmuLib/page.h | 267 ++++
.../LoongArchQemuPkg/Library/MmuLib/pte.h | 57 +
.../PeiServicesTablePointer.c | 78 ++
.../PeiServicesTablePointerLib.inf | 32 +
.../PlatformBootManagerLib/PlatformBm.c | 760 +++++++++++
.../PlatformBootManagerLib/PlatformBm.h | 112 ++
.../PlatformBootManagerLib.inf | 78 ++
.../PlatformBootManagerLib/QemuKernel.c | 81 ++
.../QemuFwCfgLib/QemuFwCfgLibInternal.h | 64 +
.../Library/QemuFwCfgLib/QemuFwCfgPei.c | 119 ++
.../Library/QemuFwCfgLib/QemuFwCfgPeiLib.c | 477 +++++++
.../Library/QemuFwCfgLib/QemuFwCfgPeiLib.inf | 44 +
.../BaseResetSystemAcpiGed.c | 155 +++
.../BaseResetSystemAcpiGedLib.inf | 42 +
.../DxeResetSystemAcpiGed.c | 270 ++++
.../DxeResetSystemAcpiGedLib.inf | 47 +
.../ResetSystemAcpiLib/ResetSystemAcpiGed.c | 128 ++
.../ResetSystemAcpiLib/ResetSystemAcpiGed.h | 20 +
.../Library/SerialPortLib/SerialPortLib.c | 612 +++++++++
.../Library/SerialPortLib/SerialPortLib.inf | 36 +
.../Library/StableTimerLib/Count.S | 35 +
.../Library/StableTimerLib/TimerLib.c | 242 ++++
.../Library/StableTimerLib/TimerLib.inf | 28 +
.../Loongson/LoongArchQemuPkg/Loongson.dec | 76 ++
.../Loongson/LoongArchQemuPkg/Loongson.dsc | 606 +++++++++
.../Loongson/LoongArchQemuPkg/Loongson.fdf | 361 +++++
.../LoongArchQemuPkg/Loongson.fdf.inc | 74 ++
.../LoongArchQemuPkg/PlatformPei/Fv.c | 61 +
.../LoongArchQemuPkg/PlatformPei/MemDetect.c | 108 ++
.../LoongArchQemuPkg/PlatformPei/Platform.c | 264 ++++
.../LoongArchQemuPkg/PlatformPei/Platform.h | 87 ++
.../PlatformPei/PlatformPei.inf | 71 +
Platform/Loongson/LoongArchQemuPkg/Readme.md | 59 +
.../LoongArchQemuPkg/Sec/LoongArch64/Start.S | 76 ++
.../Loongson/LoongArchQemuPkg/Sec/SecMain.c | 510 ++++++++
.../Loongson/LoongArchQemuPkg/Sec/SecMain.inf | 47 +
.../LoongArchQemuPkg/VarStore.fdf.inc | 64 +
Readme.md | 9 +
76 files changed, 13745 insertions(+)
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Drivers/CpuDxe/CpuDxe.c
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Drivers/CpuDxe/CpuDxe.h
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Drivers/CpuDxe/CpuDxe.inf
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Drivers/CpuDxe/LoongArch64/Exception.c
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Drivers/CpuDxe/LoongArch64/Fpu.S
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Drivers/CpuDxe/LoongArch64/LoongArch.S
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Drivers/PciCpuIo2Dxe/PciCpuIo2Dxe.c
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Drivers/PciCpuIo2Dxe/PciCpuIo2Dxe.h
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Drivers/PciCpuIo2Dxe/PciCpuIo2Dxe.inf
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Drivers/QemuFlashFvbServicesRuntimeDxe/FvbInfo.c
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Drivers/QemuFlashFvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Drivers/QemuFlashFvbServicesRuntimeDxe/FwBlockService.c
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Drivers/QemuFlashFvbServicesRuntimeDxe/FwBlockService.h
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Drivers/QemuFlashFvbServicesRuntimeDxe/FwBlockServiceDxe.c
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Drivers/QemuFlashFvbServicesRuntimeDxe/QemuFlash.c
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Drivers/QemuFlashFvbServicesRuntimeDxe/QemuFlash.h
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Drivers/QemuFlashFvbServicesRuntimeDxe/QemuFlashDxe.c
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Drivers/StableTimerDxe/Timer.c
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Drivers/StableTimerDxe/Timer.h
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Drivers/StableTimerDxe/TimerDxe.inf
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Include/IndustryStandard/QemuFwCfg.h
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Include/Library/Cpu.h
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Include/Library/MmuLib.h
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Include/Library/QemuFwCfgLib.h
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Include/Library/StableTimer.h
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Include/LoongArchAsmMacro.h
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Include/LoongArchQemuPlatform.h
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/LsRealTimeClockLib/LsRealTimeClock.h
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/LsRealTimeClockLib/LsRealTimeClockLib.c
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/LsRealTimeClockLib/LsRealTimeClockLib.inf
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/MmuLib/Mmu.S
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/MmuLib/MmuBaseLib.inf
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/MmuLib/MmuBaseLibPei.inf
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/MmuLib/MmuLibCore.c
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/MmuLib/MmuLibCore.h
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/MmuLib/MmuLibCorePei.c
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/MmuLib/mmu.h
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/MmuLib/page.h
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/MmuLib/pte.h
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/PlatformBootManagerLib/PlatformBm.c
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/PlatformBootManagerLib/PlatformBm.h
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/PlatformBootManagerLib/QemuKernel.c
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/QemuFwCfgLib/QemuFwCfgLibInternal.h
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/QemuFwCfgLib/QemuFwCfgPei.c
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/QemuFwCfgLib/QemuFwCfgPeiLib.c
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/QemuFwCfgLib/QemuFwCfgPeiLib.inf
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/ResetSystemAcpiLib/BaseResetSystemAcpiGed.c
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/ResetSystemAcpiLib/BaseResetSystemAcpiGedLib.inf
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/ResetSystemAcpiLib/DxeResetSystemAcpiGed.c
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/ResetSystemAcpiLib/DxeResetSystemAcpiGedLib.inf
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/ResetSystemAcpiLib/ResetSystemAcpiGed.c
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/ResetSystemAcpiLib/ResetSystemAcpiGed.h
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/SerialPortLib/SerialPortLib.c
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/SerialPortLib/SerialPortLib.inf
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/StableTimerLib/Count.S
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/StableTimerLib/TimerLib.c
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Library/StableTimerLib/TimerLib.inf
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Loongson.dec
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Loongson.dsc
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Loongson.fdf
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Loongson.fdf.inc
create mode 100644 Platform/Loongson/LoongArchQemuPkg/PlatformPei/Fv.c
create mode 100644 Platform/Loongson/LoongArchQemuPkg/PlatformPei/MemDetect.c
create mode 100644 Platform/Loongson/LoongArchQemuPkg/PlatformPei/Platform.c
create mode 100644 Platform/Loongson/LoongArchQemuPkg/PlatformPei/Platform.h
create mode 100644 Platform/Loongson/LoongArchQemuPkg/PlatformPei/PlatformPei.inf
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Readme.md
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Sec/LoongArch64/Start.S
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Sec/SecMain.c
create mode 100644 Platform/Loongson/LoongArchQemuPkg/Sec/SecMain.inf
create mode 100644 Platform/Loongson/LoongArchQemuPkg/VarStore.fdf.inc

-- 
2.31.1





--------------91261DC0A3D1EE225EE270B3--