[staging/LoongArch RESEND PATCH v1 00/33] Add a new architecture called LoongArch in EDK II


Chao Li
 

This new Arch should go through the EDK II Code First Process and then
the USWG can review our ECR. This commit contains 34 patchs, patch 0 is
the cover, patch 33 is Readme modification, and the others are the new
Arch support.

Modified modules: FatPkg, FmpDevicePkg, NetworkPkg,
NetworkPkg/HttpBootDxe, CryptoPkg, MdePkg/Include, SecurityPkg,
ShellPkg, UnitTestFrameworkPkg, MdePkg/DxeServicesLib, MdeModulePkg,
.python/SpellCheck, BaseTools, .azurepipelines, .pytool, MdePkg,
MdeModulePkg.

Cc: Ray Ni <ray.ni@...>
Cc: Liming Gao <gaoliming@...>
Cc: Michael D Kinney <michael.d.kinney@...>
Cc: Guomin Jiang <guomin.jiang@...>
Cc: Wei6 Xu <wei6.xu@...>
Cc: Maciej Rabeda <maciej.rabeda@...>
Cc: Jiaxin Wu <jiaxin.wu@...>
Cc: Siyuan Fu <siyuan.fu@...>
Cc: Jiewen Yao <jiewen.yao@...>
Cc: Jian J Wang <jian.j.wang@...>
Cc: Xiaoyu Lu <xiaoyu1.lu@...>
Cc: Zhiguang Liu <zhiguang.liu@...>
Cc: Zhichao Gao <zhichao.gao@...>
Cc: Bob Feng <bob.c.feng@...>
Cc: Yuwei Chen <yuwei.chen@...>

Chao Li (33):
FatPkg: Add LOONGARCH64 architecture for EDK2 CI.
FmpDevicePkg: Add LOONGARCH64 architecture for EDK2 CI.
NetworkPkg: Add LOONGARCH64 architecture for EDK2 CI.
NetworkPkg/HttpBootDxe: Add LOONGARCH64 architecture for EDK2 CI.
CryptoPkg: Add LOONGARCH64 architecture for EDK2 CI.
MdePkg/Include: Add LOONGARCH related definitions EDK2 CI.
SecurityPkg: Add LOONGARCH64 architecture for EDK2 CI.
ShellPkg: Add LOONGARCH64 architecture for EDK2 CI.
UnitTestFrameworkPkg: Add LOONGARCH64 architecture for EDK2 CI.
MdePkg/DxeServicesLib: Add LOONGARCH64 architecture
MdeModulePkg: Use LockBoxNullLib for LOONGARCH64
.python/SpellCheck: Add "Loongson" and "LOONGARCH" to "words" section
BaseTools: BaseTools changes for LoongArch platform.
BaseTools: BaseTools changes for LoongArch platform.
BaseTools: BaseTools changes for LoongArch platform.
BaseTools: Enable LoongArch64 architecture for LoongArch64 EDK2 CI.
.azurepipelines: Add LoongArch64 architecture on LoongArch64 EDK2 CI.
.pytool: Add LoongArch64 architecture on LoongArch64 EDK2 CI.
MdePkg: Add LoongArch LOONGARCH64 binding
MdePkg/Include: LoongArch definitions.
MdePkg/BaseLib: BaseLib for LOONGARCH64 architecture.
MdePkg/BaseCacheMaintenanceLib: LoongArch cache maintenance
implementation.
MdePkg/BaseIoLibIntrinsic: IoLibNoIo for LoongArch architecture.
MdePkg/BasePeCoff: Add LoongArch PE/Coff related code.
MdePkg/BaseCpuLib: LoongArch Base CPU library implementation.
MdePkg/BaseSynchronizationLib: LoongArch cache related code.
MdePkg/BaseSafeIntLib: Add LoongArch64 architecture for
BaseSafeIntLib.
MdeModulePkg/Logo: Add LoongArch64 architecture.
MdeModulePkg/CapsuleRuntimeDxe: Add LoongArch64 architecture.
MdeModulePkg/DxeIplPeim : LoongArch DxeIPL implementation.
NetworkPkg: Add LoongArch64 architecture.
BaseTools: Add LoongArch64 binding.
Readme: Update the readme

.azurepipelines/Ubuntu-GCC5.yml | 3 +-
.pytool/CISettings.py | 5 +-
.pytool/Plugin/SpellCheck/cspell.base.yaml | 4 +-
...gcc_loongarch64_unknown_linux_ext_dep.yaml | 22 ++
BaseTools/Conf/tools_def.template | 43 ++-
.../LinuxGcc5ToolChain/LinuxGcc5ToolChain.py | 31 +++
BaseTools/Source/C/Common/BasePeCoff.c | 15 +-
BaseTools/Source/C/Common/PeCoffLoaderEx.c | 76 ++++++
BaseTools/Source/C/GNUmakefile | 3 +
BaseTools/Source/C/GenFv/GenFvInternalLib.c | 128 ++++++++-
BaseTools/Source/C/GenFw/Elf64Convert.c | 153 ++++++++++-
BaseTools/Source/C/GenFw/elf_common.h | 58 ++++
.../C/Include/IndustryStandard/PeImage.h | 57 ++--
.../C/Include/LoongArch64/ProcessorBind.h | 80 ++++++
BaseTools/Source/Python/Common/DataType.py | 21 +-
.../Source/Python/UPT/Library/DataType.py | 24 +-
BaseTools/Source/Python/build/buildoptions.py | 3 +-
CryptoPkg/CryptoPkg.dsc | 3 +-
.../Library/BaseCryptLib/BaseCryptLib.inf | 6 +-
.../Library/BaseCryptLib/RuntimeCryptLib.inf | 4 +
.../BaseCryptLibNull/BaseCryptLibNull.inf | 3 +-
.../BaseCryptLibOnProtocolPpi/DxeCryptLib.inf | 3 +-
.../BaseCryptLibOnProtocolPpi/PeiCryptLib.inf | 3 +-
CryptoPkg/Library/Include/CrtLibSupport.h | 3 +-
CryptoPkg/Library/OpensslLib/OpensslLib.inf | 2 +
.../Library/OpensslLib/OpensslLibCrypto.inf | 2 +
CryptoPkg/Library/TlsLib/TlsLib.inf | 3 +-
CryptoPkg/Library/TlsLibNull/TlsLibNull.inf | 3 +-
FatPkg/FatPkg.dsc | 3 +-
FmpDevicePkg/FmpDevicePkg.dsc | 3 +-
MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf | 6 +-
.../Core/DxeIplPeim/LoongArch64/DxeLoadFunc.c | 61 +++++
MdeModulePkg/Logo/Logo.inf | 3 +-
MdeModulePkg/MdeModulePkg.dsc | 4 +-
.../CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf | 9 +-
MdePkg/Include/IndustryStandard/Dhcp.h | 41 +--
MdePkg/Include/IndustryStandard/PeImage.h | 9 +
MdePkg/Include/Library/BaseLib.h | 24 ++
MdePkg/Include/LoongArch64/ProcessorBind.h | 121 +++++++++
MdePkg/Include/Protocol/DebugSupport.h | 65 ++++-
MdePkg/Include/Protocol/PxeBaseCode.h | 3 +
MdePkg/Include/Uefi/UefiBaseType.h | 14 +
MdePkg/Include/Uefi/UefiSpec.h | 16 +-
.../BaseCacheMaintenanceLib.inf | 4 +
.../BaseCacheMaintenanceLib/LoongArchCache.c | 253 ++++++++++++++++++
MdePkg/Library/BaseCpuLib/BaseCpuLib.inf | 7 +-
MdePkg/Library/BaseCpuLib/BaseCpuLib.uni | 5 +-
.../BaseCpuLib/LoongArch/CpuFlushTlb.S | 15 ++
.../Library/BaseCpuLib/LoongArch/CpuSleep.S | 15 ++
.../BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf | 10 +-
MdePkg/Library/BaseIoLibIntrinsic/IoLibNoIo.c | 3 +-
MdePkg/Library/BaseLib/BaseLib.inf | 13 +
.../BaseLib/LoongArch64/CpuBreakpoint.S | 24 ++
MdePkg/Library/BaseLib/LoongArch64/CpuPause.S | 31 +++
.../BaseLib/LoongArch64/DisableInterrupts.S | 21 ++
.../BaseLib/LoongArch64/EnableInterrupts.S | 21 ++
.../BaseLib/LoongArch64/GetInterruptState.S | 35 +++
.../BaseLib/LoongArch64/InternalSwitchStack.c | 58 ++++
.../Library/BaseLib/LoongArch64/MemoryFence.S | 19 ++
.../BaseLib/LoongArch64/SetJumpLongJump.S | 49 ++++
.../Library/BaseLib/LoongArch64/SwitchStack.S | 39 +++
.../Library/BaseLib/LoongArch64/Unaligned.c | 244 +++++++++++++++++
MdePkg/Library/BasePeCoffLib/BasePeCoff.c | 3 +-
.../Library/BasePeCoffLib/BasePeCoffLib.inf | 5 +
.../Library/BasePeCoffLib/BasePeCoffLib.uni | 2 +
.../BasePeCoffLib/LoongArch/PeCoffLoaderEx.c | 132 +++++++++
.../Library/BaseSafeIntLib/BaseSafeIntLib.inf | 9 +-
.../BaseSynchronizationLib.inf | 5 +
.../LoongArch64/Synchronization.c | 239 +++++++++++++++++
.../Library/DxeServicesLib/DxeServicesLib.inf | 4 +-
MdePkg/MdePkg.dec | 4 +
MdePkg/MdePkg.dsc | 3 +-
NetworkPkg/HttpBootDxe/HttpBootDhcp4.h | 3 +
NetworkPkg/Network.dsc.inc | 3 +-
NetworkPkg/NetworkPkg.dsc | 3 +-
ReadMe.md | 17 ++
SecurityPkg/SecurityPkg.dsc | 3 +-
ShellPkg/ShellPkg.dsc | 3 +-
UnitTestFrameworkPkg/UnitTestFrameworkPkg.dsc | 3 +-
79 files changed, 2340 insertions(+), 110 deletions(-)
create mode 100644 BaseTools/Bin/gcc_loongarch64_unknown_linux_ext_dep.yaml
create mode 100644 BaseTools/Source/C/Include/LoongArch64/ProcessorBind.h
create mode 100644 MdeModulePkg/Core/DxeIplPeim/LoongArch64/DxeLoadFunc.c
create mode 100644 MdePkg/Include/LoongArch64/ProcessorBind.h
create mode 100644 MdePkg/Library/BaseCacheMaintenanceLib/LoongArchCache.c
create mode 100644 MdePkg/Library/BaseCpuLib/LoongArch/CpuFlushTlb.S
create mode 100644 MdePkg/Library/BaseCpuLib/LoongArch/CpuSleep.S
create mode 100644 MdePkg/Library/BaseLib/LoongArch64/CpuBreakpoint.S
create mode 100644 MdePkg/Library/BaseLib/LoongArch64/CpuPause.S
create mode 100644 MdePkg/Library/BaseLib/LoongArch64/DisableInterrupts.S
create mode 100644 MdePkg/Library/BaseLib/LoongArch64/EnableInterrupts.S
create mode 100644 MdePkg/Library/BaseLib/LoongArch64/GetInterruptState.S
create mode 100644 MdePkg/Library/BaseLib/LoongArch64/InternalSwitchStack.c
create mode 100644 MdePkg/Library/BaseLib/LoongArch64/MemoryFence.S
create mode 100644 MdePkg/Library/BaseLib/LoongArch64/SetJumpLongJump.S
create mode 100644 MdePkg/Library/BaseLib/LoongArch64/SwitchStack.S
create mode 100644 MdePkg/Library/BaseLib/LoongArch64/Unaligned.c
create mode 100644 MdePkg/Library/BasePeCoffLib/LoongArch/PeCoffLoaderEx.c
create mode 100644 MdePkg/Library/BaseSynchronizationLib/LoongArch64/Synchronization.c
create mode 100644 ReadMe.md

--
2.27.0


Abner Chang
 

Hi Li,
I found there is no 9/33 of the RESEND patch. Is that I miss it?
Regards,
Abner

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Chao Li
Sent: Wednesday, February 9, 2022 2:51 PM
To: devel@edk2.groups.io
Cc: Ray Ni <ray.ni@...>; Liming Gao <gaoliming@...>;
Michael D Kinney <michael.d.kinney@...>; Guomin Jiang
<guomin.jiang@...>; Wei6 Xu <wei6.xu@...>; Maciej Rabeda
<maciej.rabeda@...>; Jiaxin Wu <jiaxin.wu@...>; Siyuan
Fu <siyuan.fu@...>; Jiewen Yao <jiewen.yao@...>; Jian J Wang
<jian.j.wang@...>; Xiaoyu Lu <xiaoyu1.lu@...>; Zhiguang Liu
<zhiguang.liu@...>; Zhichao Gao <zhichao.gao@...>; Bob Feng
<bob.c.feng@...>; Yuwei Chen <yuwei.chen@...>
Subject: [edk2-devel] [staging/LoongArch RESEND PATCH v1 00/33] Add a
new architecture called LoongArch in EDK II

This new Arch should go through the EDK II Code First Process and then
the USWG can review our ECR. This commit contains 34 patchs, patch 0 is
the cover, patch 33 is Readme modification, and the others are the new
Arch support.

Modified modules: FatPkg, FmpDevicePkg, NetworkPkg,
NetworkPkg/HttpBootDxe, CryptoPkg, MdePkg/Include, SecurityPkg,
ShellPkg, UnitTestFrameworkPkg, MdePkg/DxeServicesLib, MdeModulePkg,
.python/SpellCheck, BaseTools, .azurepipelines, .pytool, MdePkg,
MdeModulePkg.

Cc: Ray Ni <ray.ni@...>
Cc: Liming Gao <gaoliming@...>
Cc: Michael D Kinney <michael.d.kinney@...>
Cc: Guomin Jiang <guomin.jiang@...>
Cc: Wei6 Xu <wei6.xu@...>
Cc: Maciej Rabeda <maciej.rabeda@...>
Cc: Jiaxin Wu <jiaxin.wu@...>
Cc: Siyuan Fu <siyuan.fu@...>
Cc: Jiewen Yao <jiewen.yao@...>
Cc: Jian J Wang <jian.j.wang@...>
Cc: Xiaoyu Lu <xiaoyu1.lu@...>
Cc: Zhiguang Liu <zhiguang.liu@...>
Cc: Zhichao Gao <zhichao.gao@...>
Cc: Bob Feng <bob.c.feng@...>
Cc: Yuwei Chen <yuwei.chen@...>

Chao Li (33):
FatPkg: Add LOONGARCH64 architecture for EDK2 CI.
FmpDevicePkg: Add LOONGARCH64 architecture for EDK2 CI.
NetworkPkg: Add LOONGARCH64 architecture for EDK2 CI.
NetworkPkg/HttpBootDxe: Add LOONGARCH64 architecture for EDK2 CI.
CryptoPkg: Add LOONGARCH64 architecture for EDK2 CI.
MdePkg/Include: Add LOONGARCH related definitions EDK2 CI.
SecurityPkg: Add LOONGARCH64 architecture for EDK2 CI.
ShellPkg: Add LOONGARCH64 architecture for EDK2 CI.
UnitTestFrameworkPkg: Add LOONGARCH64 architecture for EDK2 CI.
MdePkg/DxeServicesLib: Add LOONGARCH64 architecture
MdeModulePkg: Use LockBoxNullLib for LOONGARCH64
.python/SpellCheck: Add "Loongson" and "LOONGARCH" to "words" section
BaseTools: BaseTools changes for LoongArch platform.
BaseTools: BaseTools changes for LoongArch platform.
BaseTools: BaseTools changes for LoongArch platform.
BaseTools: Enable LoongArch64 architecture for LoongArch64 EDK2 CI.
.azurepipelines: Add LoongArch64 architecture on LoongArch64 EDK2 CI.
.pytool: Add LoongArch64 architecture on LoongArch64 EDK2 CI.
MdePkg: Add LoongArch LOONGARCH64 binding
MdePkg/Include: LoongArch definitions.
MdePkg/BaseLib: BaseLib for LOONGARCH64 architecture.
MdePkg/BaseCacheMaintenanceLib: LoongArch cache maintenance
implementation.
MdePkg/BaseIoLibIntrinsic: IoLibNoIo for LoongArch architecture.
MdePkg/BasePeCoff: Add LoongArch PE/Coff related code.
MdePkg/BaseCpuLib: LoongArch Base CPU library implementation.
MdePkg/BaseSynchronizationLib: LoongArch cache related code.
MdePkg/BaseSafeIntLib: Add LoongArch64 architecture for
BaseSafeIntLib.
MdeModulePkg/Logo: Add LoongArch64 architecture.
MdeModulePkg/CapsuleRuntimeDxe: Add LoongArch64 architecture.
MdeModulePkg/DxeIplPeim : LoongArch DxeIPL implementation.
NetworkPkg: Add LoongArch64 architecture.
BaseTools: Add LoongArch64 binding.
Readme: Update the readme

.azurepipelines/Ubuntu-GCC5.yml | 3 +-
.pytool/CISettings.py | 5 +-
.pytool/Plugin/SpellCheck/cspell.base.yaml | 4 +-
...gcc_loongarch64_unknown_linux_ext_dep.yaml | 22 ++
BaseTools/Conf/tools_def.template | 43 ++-
.../LinuxGcc5ToolChain/LinuxGcc5ToolChain.py | 31 +++
BaseTools/Source/C/Common/BasePeCoff.c | 15 +-
BaseTools/Source/C/Common/PeCoffLoaderEx.c | 76 ++++++
BaseTools/Source/C/GNUmakefile | 3 +
BaseTools/Source/C/GenFv/GenFvInternalLib.c | 128 ++++++++-
BaseTools/Source/C/GenFw/Elf64Convert.c | 153 ++++++++++-
BaseTools/Source/C/GenFw/elf_common.h | 58 ++++
.../C/Include/IndustryStandard/PeImage.h | 57 ++--
.../C/Include/LoongArch64/ProcessorBind.h | 80 ++++++
BaseTools/Source/Python/Common/DataType.py | 21 +-
.../Source/Python/UPT/Library/DataType.py | 24 +-
BaseTools/Source/Python/build/buildoptions.py | 3 +-
CryptoPkg/CryptoPkg.dsc | 3 +-
.../Library/BaseCryptLib/BaseCryptLib.inf | 6 +-
.../Library/BaseCryptLib/RuntimeCryptLib.inf | 4 +
.../BaseCryptLibNull/BaseCryptLibNull.inf | 3 +-
.../BaseCryptLibOnProtocolPpi/DxeCryptLib.inf | 3 +-
.../BaseCryptLibOnProtocolPpi/PeiCryptLib.inf | 3 +-
CryptoPkg/Library/Include/CrtLibSupport.h | 3 +-
CryptoPkg/Library/OpensslLib/OpensslLib.inf | 2 +
.../Library/OpensslLib/OpensslLibCrypto.inf | 2 +
CryptoPkg/Library/TlsLib/TlsLib.inf | 3 +-
CryptoPkg/Library/TlsLibNull/TlsLibNull.inf | 3 +-
FatPkg/FatPkg.dsc | 3 +-
FmpDevicePkg/FmpDevicePkg.dsc | 3 +-
MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf | 6 +-
.../Core/DxeIplPeim/LoongArch64/DxeLoadFunc.c | 61 +++++
MdeModulePkg/Logo/Logo.inf | 3 +-
MdeModulePkg/MdeModulePkg.dsc | 4 +-
.../CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf | 9 +-
MdePkg/Include/IndustryStandard/Dhcp.h | 41 +--
MdePkg/Include/IndustryStandard/PeImage.h | 9 +
MdePkg/Include/Library/BaseLib.h | 24 ++
MdePkg/Include/LoongArch64/ProcessorBind.h | 121 +++++++++
MdePkg/Include/Protocol/DebugSupport.h | 65 ++++-
MdePkg/Include/Protocol/PxeBaseCode.h | 3 +
MdePkg/Include/Uefi/UefiBaseType.h | 14 +
MdePkg/Include/Uefi/UefiSpec.h | 16 +-
.../BaseCacheMaintenanceLib.inf | 4 +
.../BaseCacheMaintenanceLib/LoongArchCache.c | 253
++++++++++++++++++
MdePkg/Library/BaseCpuLib/BaseCpuLib.inf | 7 +-
MdePkg/Library/BaseCpuLib/BaseCpuLib.uni | 5 +-
.../BaseCpuLib/LoongArch/CpuFlushTlb.S | 15 ++
.../Library/BaseCpuLib/LoongArch/CpuSleep.S | 15 ++
.../BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf | 10 +-
MdePkg/Library/BaseIoLibIntrinsic/IoLibNoIo.c | 3 +-
MdePkg/Library/BaseLib/BaseLib.inf | 13 +
.../BaseLib/LoongArch64/CpuBreakpoint.S | 24 ++
MdePkg/Library/BaseLib/LoongArch64/CpuPause.S | 31 +++
.../BaseLib/LoongArch64/DisableInterrupts.S | 21 ++
.../BaseLib/LoongArch64/EnableInterrupts.S | 21 ++
.../BaseLib/LoongArch64/GetInterruptState.S | 35 +++
.../BaseLib/LoongArch64/InternalSwitchStack.c | 58 ++++
.../Library/BaseLib/LoongArch64/MemoryFence.S | 19 ++
.../BaseLib/LoongArch64/SetJumpLongJump.S | 49 ++++
.../Library/BaseLib/LoongArch64/SwitchStack.S | 39 +++
.../Library/BaseLib/LoongArch64/Unaligned.c | 244 +++++++++++++++++
MdePkg/Library/BasePeCoffLib/BasePeCoff.c | 3 +-
.../Library/BasePeCoffLib/BasePeCoffLib.inf | 5 +
.../Library/BasePeCoffLib/BasePeCoffLib.uni | 2 +
.../BasePeCoffLib/LoongArch/PeCoffLoaderEx.c | 132 +++++++++
.../Library/BaseSafeIntLib/BaseSafeIntLib.inf | 9 +-
.../BaseSynchronizationLib.inf | 5 +
.../LoongArch64/Synchronization.c | 239 +++++++++++++++++
.../Library/DxeServicesLib/DxeServicesLib.inf | 4 +-
MdePkg/MdePkg.dec | 4 +
MdePkg/MdePkg.dsc | 3 +-
NetworkPkg/HttpBootDxe/HttpBootDhcp4.h | 3 +
NetworkPkg/Network.dsc.inc | 3 +-
NetworkPkg/NetworkPkg.dsc | 3 +-
ReadMe.md | 17 ++
SecurityPkg/SecurityPkg.dsc | 3 +-
ShellPkg/ShellPkg.dsc | 3 +-
UnitTestFrameworkPkg/UnitTestFrameworkPkg.dsc | 3 +-
79 files changed, 2340 insertions(+), 110 deletions(-)
create mode 100644
BaseTools/Bin/gcc_loongarch64_unknown_linux_ext_dep.yaml
create mode 100644
BaseTools/Source/C/Include/LoongArch64/ProcessorBind.h
create mode 100644
MdeModulePkg/Core/DxeIplPeim/LoongArch64/DxeLoadFunc.c
create mode 100644 MdePkg/Include/LoongArch64/ProcessorBind.h
create mode 100644
MdePkg/Library/BaseCacheMaintenanceLib/LoongArchCache.c
create mode 100644 MdePkg/Library/BaseCpuLib/LoongArch/CpuFlushTlb.S
create mode 100644 MdePkg/Library/BaseCpuLib/LoongArch/CpuSleep.S
create mode 100644
MdePkg/Library/BaseLib/LoongArch64/CpuBreakpoint.S
create mode 100644 MdePkg/Library/BaseLib/LoongArch64/CpuPause.S
create mode 100644
MdePkg/Library/BaseLib/LoongArch64/DisableInterrupts.S
create mode 100644
MdePkg/Library/BaseLib/LoongArch64/EnableInterrupts.S
create mode 100644
MdePkg/Library/BaseLib/LoongArch64/GetInterruptState.S
create mode 100644
MdePkg/Library/BaseLib/LoongArch64/InternalSwitchStack.c
create mode 100644
MdePkg/Library/BaseLib/LoongArch64/MemoryFence.S
create mode 100644
MdePkg/Library/BaseLib/LoongArch64/SetJumpLongJump.S
create mode 100644 MdePkg/Library/BaseLib/LoongArch64/SwitchStack.S
create mode 100644 MdePkg/Library/BaseLib/LoongArch64/Unaligned.c
create mode 100644
MdePkg/Library/BasePeCoffLib/LoongArch/PeCoffLoaderEx.c
create mode 100644
MdePkg/Library/BaseSynchronizationLib/LoongArch64/Synchronization.c
create mode 100644 ReadMe.md

--
2.27.0





Abner Chang
 

Hi Li,
I had went through the whole patch set and gave feedbacks to the patch respectively. Apart from those comments, I have no problems with this contribution. I think we can adopt LoongArch port in the mainstream edk2 repo after the comments are addressed and the corresponding spec defined in UEFI spec unless any objections from others.

Thanks
Abner


From: devel@edk2.groups.io <devel@edk2.groups.io> on behalf of Chao Li <lichao@...>
Sent: Wednesday, February 9, 2022 2:51 PM
To: devel@edk2.groups.io <devel@edk2.groups.io>
Cc: Ray Ni <ray.ni@...>; Liming Gao <gaoliming@...>; Michael D Kinney <michael.d.kinney@...>; Guomin Jiang <guomin.jiang@...>; Wei6 Xu <wei6.xu@...>; Maciej Rabeda <maciej.rabeda@...>; Jiaxin Wu <jiaxin.wu@...>; Siyuan Fu <siyuan.fu@...>; Jiewen Yao <jiewen.yao@...>; Jian J Wang <jian.j.wang@...>; Xiaoyu Lu <xiaoyu1.lu@...>; Zhiguang Liu <zhiguang.liu@...>; Zhichao Gao <zhichao.gao@...>; Bob Feng <bob.c.feng@...>; Yuwei Chen <yuwei.chen@...>
Subject: [edk2-devel] [staging/LoongArch RESEND PATCH v1 00/33] Add a new architecture called LoongArch in EDK II
 
This new Arch should go through the EDK II Code First Process and then
the USWG can review our ECR. This commit contains 34 patchs, patch 0 is
the cover, patch 33 is Readme modification, and the others are the new
Arch support.

Modified modules: FatPkg, FmpDevicePkg, NetworkPkg,
NetworkPkg/HttpBootDxe, CryptoPkg, MdePkg/Include, SecurityPkg,
ShellPkg, UnitTestFrameworkPkg, MdePkg/DxeServicesLib, MdeModulePkg,
.python/SpellCheck, BaseTools, .azurepipelines, .pytool, MdePkg,
MdeModulePkg.

Cc: Ray Ni <ray.ni@...>
Cc: Liming Gao <gaoliming@...>
Cc: Michael D Kinney <michael.d.kinney@...>
Cc: Guomin Jiang <guomin.jiang@...>
Cc: Wei6 Xu <wei6.xu@...>
Cc: Maciej Rabeda <maciej.rabeda@...>
Cc: Jiaxin Wu <jiaxin.wu@...>
Cc: Siyuan Fu <siyuan.fu@...>
Cc: Jiewen Yao <jiewen.yao@...>
Cc: Jian J Wang <jian.j.wang@...>
Cc: Xiaoyu Lu <xiaoyu1.lu@...>
Cc: Zhiguang Liu <zhiguang.liu@...>
Cc: Zhichao Gao <zhichao.gao@...>
Cc: Bob Feng <bob.c.feng@...>
Cc: Yuwei Chen <yuwei.chen@...>

Chao Li (33):
  FatPkg: Add LOONGARCH64 architecture for EDK2 CI.
  FmpDevicePkg: Add LOONGARCH64 architecture for EDK2 CI.
  NetworkPkg: Add LOONGARCH64 architecture for EDK2 CI.
  NetworkPkg/HttpBootDxe: Add LOONGARCH64 architecture for EDK2 CI.
  CryptoPkg: Add LOONGARCH64 architecture for EDK2 CI.
  MdePkg/Include: Add LOONGARCH related definitions EDK2 CI.
  SecurityPkg: Add LOONGARCH64 architecture for EDK2 CI.
  ShellPkg: Add LOONGARCH64 architecture for EDK2 CI.
  UnitTestFrameworkPkg: Add LOONGARCH64 architecture for EDK2 CI.
  MdePkg/DxeServicesLib: Add LOONGARCH64 architecture
  MdeModulePkg: Use LockBoxNullLib for LOONGARCH64
  .python/SpellCheck: Add "Loongson" and "LOONGARCH" to "words" section
  BaseTools: BaseTools changes for LoongArch platform.
  BaseTools: BaseTools changes for LoongArch platform.
  BaseTools: BaseTools changes for LoongArch platform.
  BaseTools: Enable LoongArch64 architecture for LoongArch64 EDK2 CI.
  .azurepipelines: Add LoongArch64 architecture on LoongArch64 EDK2 CI.
  .pytool: Add LoongArch64 architecture on LoongArch64 EDK2 CI.
  MdePkg: Add LoongArch LOONGARCH64 binding
  MdePkg/Include: LoongArch definitions.
  MdePkg/BaseLib: BaseLib for LOONGARCH64 architecture.
  MdePkg/BaseCacheMaintenanceLib: LoongArch cache maintenance
    implementation.
  MdePkg/BaseIoLibIntrinsic: IoLibNoIo for LoongArch architecture.
  MdePkg/BasePeCoff: Add LoongArch PE/Coff related code.
  MdePkg/BaseCpuLib: LoongArch Base CPU library implementation.
  MdePkg/BaseSynchronizationLib: LoongArch cache related code.
  MdePkg/BaseSafeIntLib: Add LoongArch64 architecture for
    BaseSafeIntLib.
  MdeModulePkg/Logo: Add LoongArch64 architecture.
  MdeModulePkg/CapsuleRuntimeDxe: Add LoongArch64 architecture.
  MdeModulePkg/DxeIplPeim : LoongArch DxeIPL implementation.
  NetworkPkg: Add LoongArch64 architecture.
  BaseTools: Add LoongArch64 binding.
  Readme: Update the readme

 .azurepipelines/Ubuntu-GCC5.yml               |   3 +-
 .pytool/CISettings.py                         |   5 +-
 .pytool/Plugin/SpellCheck/cspell.base.yaml    |   4 +-
 ...gcc_loongarch64_unknown_linux_ext_dep.yaml |  22 ++
 BaseTools/Conf/tools_def.template             |  43 ++-
 .../LinuxGcc5ToolChain/LinuxGcc5ToolChain.py  |  31 +++
 BaseTools/Source/C/Common/BasePeCoff.c        |  15 +-
 BaseTools/Source/C/Common/PeCoffLoaderEx.c    |  76 ++++++
 BaseTools/Source/C/GNUmakefile                |   3 +
 BaseTools/Source/C/GenFv/GenFvInternalLib.c   | 128 ++++++++-
 BaseTools/Source/C/GenFw/Elf64Convert.c       | 153 ++++++++++-
 BaseTools/Source/C/GenFw/elf_common.h         |  58 ++++
 .../C/Include/IndustryStandard/PeImage.h      |  57 ++--
 .../C/Include/LoongArch64/ProcessorBind.h     |  80 ++++++
 BaseTools/Source/Python/Common/DataType.py    |  21 +-
 .../Source/Python/UPT/Library/DataType.py     |  24 +-
 BaseTools/Source/Python/build/buildoptions.py |   3 +-
 CryptoPkg/CryptoPkg.dsc                       |   3 +-
 .../Library/BaseCryptLib/BaseCryptLib.inf     |   6 +-
 .../Library/BaseCryptLib/RuntimeCryptLib.inf  |   4 +
 .../BaseCryptLibNull/BaseCryptLibNull.inf     |   3 +-
 .../BaseCryptLibOnProtocolPpi/DxeCryptLib.inf |   3 +-
 .../BaseCryptLibOnProtocolPpi/PeiCryptLib.inf |   3 +-
 CryptoPkg/Library/Include/CrtLibSupport.h     |   3 +-
 CryptoPkg/Library/OpensslLib/OpensslLib.inf   |   2 +
 .../Library/OpensslLib/OpensslLibCrypto.inf   |   2 +
 CryptoPkg/Library/TlsLib/TlsLib.inf           |   3 +-
 CryptoPkg/Library/TlsLibNull/TlsLibNull.inf   |   3 +-
 FatPkg/FatPkg.dsc                             |   3 +-
 FmpDevicePkg/FmpDevicePkg.dsc                 |   3 +-
 MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf       |   6 +-
 .../Core/DxeIplPeim/LoongArch64/DxeLoadFunc.c |  61 +++++
 MdeModulePkg/Logo/Logo.inf                    |   3 +-
 MdeModulePkg/MdeModulePkg.dsc                 |   4 +-
 .../CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf   |   9 +-
 MdePkg/Include/IndustryStandard/Dhcp.h        |  41 +--
 MdePkg/Include/IndustryStandard/PeImage.h     |   9 +
 MdePkg/Include/Library/BaseLib.h              |  24 ++
 MdePkg/Include/LoongArch64/ProcessorBind.h    | 121 +++++++++
 MdePkg/Include/Protocol/DebugSupport.h        |  65 ++++-
 MdePkg/Include/Protocol/PxeBaseCode.h         |   3 +
 MdePkg/Include/Uefi/UefiBaseType.h            |  14 +
 MdePkg/Include/Uefi/UefiSpec.h                |  16 +-
 .../BaseCacheMaintenanceLib.inf               |   4 +
 .../BaseCacheMaintenanceLib/LoongArchCache.c  | 253 ++++++++++++++++++
 MdePkg/Library/BaseCpuLib/BaseCpuLib.inf      |   7 +-
 MdePkg/Library/BaseCpuLib/BaseCpuLib.uni      |   5 +-
 .../BaseCpuLib/LoongArch/CpuFlushTlb.S        |  15 ++
 .../Library/BaseCpuLib/LoongArch/CpuSleep.S   |  15 ++
 .../BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf |  10 +-
 MdePkg/Library/BaseIoLibIntrinsic/IoLibNoIo.c |   3 +-
 MdePkg/Library/BaseLib/BaseLib.inf            |  13 +
 .../BaseLib/LoongArch64/CpuBreakpoint.S       |  24 ++
 MdePkg/Library/BaseLib/LoongArch64/CpuPause.S |  31 +++
 .../BaseLib/LoongArch64/DisableInterrupts.S   |  21 ++
 .../BaseLib/LoongArch64/EnableInterrupts.S    |  21 ++
 .../BaseLib/LoongArch64/GetInterruptState.S   |  35 +++
 .../BaseLib/LoongArch64/InternalSwitchStack.c |  58 ++++
 .../Library/BaseLib/LoongArch64/MemoryFence.S |  19 ++
 .../BaseLib/LoongArch64/SetJumpLongJump.S     |  49 ++++
 .../Library/BaseLib/LoongArch64/SwitchStack.S |  39 +++
 .../Library/BaseLib/LoongArch64/Unaligned.c   | 244 +++++++++++++++++
 MdePkg/Library/BasePeCoffLib/BasePeCoff.c     |   3 +-
 .../Library/BasePeCoffLib/BasePeCoffLib.inf   |   5 +
 .../Library/BasePeCoffLib/BasePeCoffLib.uni   |   2 +
 .../BasePeCoffLib/LoongArch/PeCoffLoaderEx.c  | 132 +++++++++
 .../Library/BaseSafeIntLib/BaseSafeIntLib.inf |   9 +-
 .../BaseSynchronizationLib.inf                |   5 +
 .../LoongArch64/Synchronization.c             | 239 +++++++++++++++++
 .../Library/DxeServicesLib/DxeServicesLib.inf |   4 +-
 MdePkg/MdePkg.dec                             |   4 +
 MdePkg/MdePkg.dsc                             |   3 +-
 NetworkPkg/HttpBootDxe/HttpBootDhcp4.h        |   3 +
 NetworkPkg/Network.dsc.inc                    |   3 +-
 NetworkPkg/NetworkPkg.dsc                     |   3 +-
 ReadMe.md                                     |  17 ++
 SecurityPkg/SecurityPkg.dsc                   |   3 +-
 ShellPkg/ShellPkg.dsc                         |   3 +-
 UnitTestFrameworkPkg/UnitTestFrameworkPkg.dsc |   3 +-
 79 files changed, 2340 insertions(+), 110 deletions(-)
 create mode 100644 BaseTools/Bin/gcc_loongarch64_unknown_linux_ext_dep.yaml
 create mode 100644 BaseTools/Source/C/Include/LoongArch64/ProcessorBind.h
 create mode 100644 MdeModulePkg/Core/DxeIplPeim/LoongArch64/DxeLoadFunc.c
 create mode 100644 MdePkg/Include/LoongArch64/ProcessorBind.h
 create mode 100644 MdePkg/Library/BaseCacheMaintenanceLib/LoongArchCache.c
 create mode 100644 MdePkg/Library/BaseCpuLib/LoongArch/CpuFlushTlb.S
 create mode 100644 MdePkg/Library/BaseCpuLib/LoongArch/CpuSleep.S
 create mode 100644 MdePkg/Library/BaseLib/LoongArch64/CpuBreakpoint.S
 create mode 100644 MdePkg/Library/BaseLib/LoongArch64/CpuPause.S
 create mode 100644 MdePkg/Library/BaseLib/LoongArch64/DisableInterrupts.S
 create mode 100644 MdePkg/Library/BaseLib/LoongArch64/EnableInterrupts.S
 create mode 100644 MdePkg/Library/BaseLib/LoongArch64/GetInterruptState.S
 create mode 100644 MdePkg/Library/BaseLib/LoongArch64/InternalSwitchStack.c
 create mode 100644 MdePkg/Library/BaseLib/LoongArch64/MemoryFence.S
 create mode 100644 MdePkg/Library/BaseLib/LoongArch64/SetJumpLongJump.S
 create mode 100644 MdePkg/Library/BaseLib/LoongArch64/SwitchStack.S
 create mode 100644 MdePkg/Library/BaseLib/LoongArch64/Unaligned.c
 create mode 100644 MdePkg/Library/BasePeCoffLib/LoongArch/PeCoffLoaderEx.c
 create mode 100644 MdePkg/Library/BaseSynchronizationLib/LoongArch64/Synchronization.c
 create mode 100644 ReadMe.md

--
2.27.0







Chao Li
 

Hi Abner,

Thank you review the all of the patch, and sorry for reply so late, I will check the feedback these days, thank you!

--
Thanks,
Chao
------------------------


On 4月 9 2022, at 3:26 下午, "Chang, Abner (HPS SW/FW Technologist)" <abner.chang@...> wrote:
 
Hi Li,
I had went through the whole patch set and gave feedbacks to the patch respectively. Apart from those comments, I have no problems with this contribution. I think we can adopt LoongArch port in the mainstream edk2 repo after the comments are addressed and the corresponding spec defined in UEFI spec unless any objections from others.

Thanks
Abner
From: devel@edk2.groups.io <devel@edk2.groups.io> on behalf of Chao Li <lichao@...>
Sent: Wednesday, February 9, 2022 2:51 PM
To: devel@edk2.groups.io <devel@edk2.groups.io>
Cc: Ray Ni <ray.ni@...>; Liming Gao <gaoliming@...>; Michael D Kinney <michael.d.kinney@...>; Guomin Jiang <guomin.jiang@...>; Wei6 Xu <wei6.xu@...>; Maciej Rabeda <maciej.rabeda@...>; Jiaxin Wu <jiaxin.wu@...>; Siyuan Fu <siyuan.fu@...>; Jiewen Yao <jiewen.yao@...>; Jian J Wang <jian.j.wang@...>; Xiaoyu Lu <xiaoyu1.lu@...>; Zhiguang Liu <zhiguang.liu@...>; Zhichao Gao <zhichao.gao@...>; Bob Feng <bob.c.feng@...>; Yuwei Chen <yuwei.chen@...>
Subject: [edk2-devel] [staging/LoongArch RESEND PATCH v1 00/33] Add a new architecture called LoongArch in EDK II
 
This new Arch should go through the EDK II Code First Process and then
the USWG can review our ECR. This commit contains 34 patchs, patch 0 is
the cover, patch 33 is Readme modification, and the others are the new
Arch support.

Modified modules: FatPkg, FmpDevicePkg, NetworkPkg,
NetworkPkg/HttpBootDxe, CryptoPkg, MdePkg/Include, SecurityPkg,
ShellPkg, UnitTestFrameworkPkg, MdePkg/DxeServicesLib, MdeModulePkg,
.python/SpellCheck, BaseTools, .azurepipelines, .pytool, MdePkg,
MdeModulePkg.

Cc: Ray Ni <ray.ni@...>
Cc: Liming Gao <gaoliming@...>
Cc: Michael D Kinney <michael.d.kinney@...>
Cc: Guomin Jiang <guomin.jiang@...>
Cc: Wei6 Xu <wei6.xu@...>
Cc: Maciej Rabeda <maciej.rabeda@...>
Cc: Jiaxin Wu <jiaxin.wu@...>
Cc: Siyuan Fu <siyuan.fu@...>
Cc: Jiewen Yao <jiewen.yao@...>
Cc: Jian J Wang <jian.j.wang@...>
Cc: Xiaoyu Lu <xiaoyu1.lu@...>
Cc: Zhiguang Liu <zhiguang.liu@...>
Cc: Zhichao Gao <zhichao.gao@...>
Cc: Bob Feng <bob.c.feng@...>
Cc: Yuwei Chen <yuwei.chen@...>

Chao Li (33):
  FatPkg: Add LOONGARCH64 architecture for EDK2 CI.
  FmpDevicePkg: Add LOONGARCH64 architecture for EDK2 CI.
  NetworkPkg: Add LOONGARCH64 architecture for EDK2 CI.
  NetworkPkg/HttpBootDxe: Add LOONGARCH64 architecture for EDK2 CI.
  CryptoPkg: Add LOONGARCH64 architecture for EDK2 CI.
  MdePkg/Include: Add LOONGARCH related definitions EDK2 CI.
  SecurityPkg: Add LOONGARCH64 architecture for EDK2 CI.
  ShellPkg: Add LOONGARCH64 architecture for EDK2 CI.
  UnitTestFrameworkPkg: Add LOONGARCH64 architecture for EDK2 CI.
  MdePkg/DxeServicesLib: Add LOONGARCH64 architecture
  MdeModulePkg: Use LockBoxNullLib for LOONGARCH64
  .python/SpellCheck: Add "Loongson" and "LOONGARCH" to "words" section
  BaseTools: BaseTools changes for LoongArch platform.
  BaseTools: BaseTools changes for LoongArch platform.
  BaseTools: BaseTools changes for LoongArch platform.
  BaseTools: Enable LoongArch64 architecture for LoongArch64 EDK2 CI.
  .azurepipelines: Add LoongArch64 architecture on LoongArch64 EDK2 CI.
  .pytool: Add LoongArch64 architecture on LoongArch64 EDK2 CI.
  MdePkg: Add LoongArch LOONGARCH64 binding
  MdePkg/Include: LoongArch definitions.
  MdePkg/BaseLib: BaseLib for LOONGARCH64 architecture.
  MdePkg/BaseCacheMaintenanceLib: LoongArch cache maintenance
    implementation.
  MdePkg/BaseIoLibIntrinsic: IoLibNoIo for LoongArch architecture.
  MdePkg/BasePeCoff: Add LoongArch PE/Coff related code.
  MdePkg/BaseCpuLib: LoongArch Base CPU library implementation.
  MdePkg/BaseSynchronizationLib: LoongArch cache related code.
  MdePkg/BaseSafeIntLib: Add LoongArch64 architecture for
    BaseSafeIntLib.
  MdeModulePkg/Logo: Add LoongArch64 architecture.
  MdeModulePkg/CapsuleRuntimeDxe: Add LoongArch64 architecture.
  MdeModulePkg/DxeIplPeim : LoongArch DxeIPL implementation.
  NetworkPkg: Add LoongArch64 architecture.
  BaseTools: Add LoongArch64 binding.
  Readme: Update the readme

 .azurepipelines/Ubuntu-GCC5.yml               |   3 +-
 .pytool/CISettings.py                         |   5 +-
 .pytool/Plugin/SpellCheck/cspell.base.yaml    |   4 +-
 ...gcc_loongarch64_unknown_linux_ext_dep.yaml |  22 ++
 BaseTools/Conf/tools_def.template             |  43 ++-
 .../LinuxGcc5ToolChain/LinuxGcc5ToolChain.py  |  31 +++
 BaseTools/Source/C/Common/BasePeCoff.c        |  15 +-
 BaseTools/Source/C/Common/PeCoffLoaderEx.c    |  76 ++++++
 BaseTools/Source/C/GNUmakefile                |   3 +
 BaseTools/Source/C/GenFv/GenFvInternalLib.c   | 128 ++++++++-
 BaseTools/Source/C/GenFw/Elf64Convert.c       | 153 ++++++++++-
 BaseTools/Source/C/GenFw/elf_common.h         |  58 ++++
 .../C/Include/IndustryStandard/PeImage.h      |  57 ++--
 .../C/Include/LoongArch64/ProcessorBind.h     |  80 ++++++
 BaseTools/Source/Python/Common/DataType.py    |  21 +-
 .../Source/Python/UPT/Library/DataType.py     |  24 +-
 BaseTools/Source/Python/build/buildoptions.py |   3 +-
 CryptoPkg/CryptoPkg.dsc                       |   3 +-
 .../Library/BaseCryptLib/BaseCryptLib.inf     |   6 +-
 .../Library/BaseCryptLib/RuntimeCryptLib.inf  |   4 +
 .../BaseCryptLibNull/BaseCryptLibNull.inf     |   3 +-
 .../BaseCryptLibOnProtocolPpi/DxeCryptLib.inf |   3 +-
 .../BaseCryptLibOnProtocolPpi/PeiCryptLib.inf |   3 +-
 CryptoPkg/Library/Include/CrtLibSupport.h     |   3 +-
 CryptoPkg/Library/OpensslLib/OpensslLib.inf   |   2 +
 .../Library/OpensslLib/OpensslLibCrypto.inf   |   2 +
 CryptoPkg/Library/TlsLib/TlsLib.inf           |   3 +-
 CryptoPkg/Library/TlsLibNull/TlsLibNull.inf   |   3 +-
 FatPkg/FatPkg.dsc                             |   3 +-
 FmpDevicePkg/FmpDevicePkg.dsc                 |   3 +-
 MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf       |   6 +-
 .../Core/DxeIplPeim/LoongArch64/DxeLoadFunc.c |  61 +++++
 MdeModulePkg/Logo/Logo.inf                    |   3 +-
 MdeModulePkg/MdeModulePkg.dsc                 |   4 +-
 .../CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf   |   9 +-
 MdePkg/Include/IndustryStandard/Dhcp.h        |  41 +--
 MdePkg/Include/IndustryStandard/PeImage.h     |   9 +
 MdePkg/Include/Library/BaseLib.h              |  24 ++
 MdePkg/Include/LoongArch64/ProcessorBind.h    | 121 +++++++++
 MdePkg/Include/Protocol/DebugSupport.h        |  65 ++++-
 MdePkg/Include/Protocol/PxeBaseCode.h         |   3 +
 MdePkg/Include/Uefi/UefiBaseType.h            |  14 +
 MdePkg/Include/Uefi/UefiSpec.h                |  16 +-
 .../BaseCacheMaintenanceLib.inf               |   4 +
 .../BaseCacheMaintenanceLib/LoongArchCache.c  | 253 ++++++++++++++++++
 MdePkg/Library/BaseCpuLib/BaseCpuLib.inf      |   7 +-
 MdePkg/Library/BaseCpuLib/BaseCpuLib.uni      |   5 +-
 .../BaseCpuLib/LoongArch/CpuFlushTlb.S        |  15 ++
 .../Library/BaseCpuLib/LoongArch/CpuSleep.S   |  15 ++
 .../BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf |  10 +-
 MdePkg/Library/BaseIoLibIntrinsic/IoLibNoIo.c |   3 +-
 MdePkg/Library/BaseLib/BaseLib.inf            |  13 +
 .../BaseLib/LoongArch64/CpuBreakpoint.S       |  24 ++
 MdePkg/Library/BaseLib/LoongArch64/CpuPause.S |  31 +++
 .../BaseLib/LoongArch64/DisableInterrupts.S   |  21 ++
 .../BaseLib/LoongArch64/EnableInterrupts.S    |  21 ++
 .../BaseLib/LoongArch64/GetInterruptState.S   |  35 +++
 .../BaseLib/LoongArch64/InternalSwitchStack.c |  58 ++++
 .../Library/BaseLib/LoongArch64/MemoryFence.S |  19 ++
 .../BaseLib/LoongArch64/SetJumpLongJump.S     |  49 ++++
 .../Library/BaseLib/LoongArch64/SwitchStack.S |  39 +++
 .../Library/BaseLib/LoongArch64/Unaligned.c   | 244 +++++++++++++++++
 MdePkg/Library/BasePeCoffLib/BasePeCoff.c     |   3 +-
 .../Library/BasePeCoffLib/BasePeCoffLib.inf   |   5 +
 .../Library/BasePeCoffLib/BasePeCoffLib.uni   |   2 +
 .../BasePeCoffLib/LoongArch/PeCoffLoaderEx.c  | 132 +++++++++
 .../Library/BaseSafeIntLib/BaseSafeIntLib.inf |   9 +-
 .../BaseSynchronizationLib.inf                |   5 +
 .../LoongArch64/Synchronization.c             | 239 +++++++++++++++++
 .../Library/DxeServicesLib/DxeServicesLib.inf |   4 +-
 MdePkg/MdePkg.dec                             |   4 +
 MdePkg/MdePkg.dsc                             |   3 +-
 NetworkPkg/HttpBootDxe/HttpBootDhcp4.h        |   3 +
 NetworkPkg/Network.dsc.inc                    |   3 +-
 NetworkPkg/NetworkPkg.dsc                     |   3 +-
 ReadMe.md                                     |  17 ++
 SecurityPkg/SecurityPkg.dsc                   |   3 +-
 ShellPkg/ShellPkg.dsc                         |   3 +-
 UnitTestFrameworkPkg/UnitTestFrameworkPkg.dsc |   3 +-
 79 files changed, 2340 insertions(+), 110 deletions(-)
 create mode 100644 BaseTools/Bin/gcc_loongarch64_unknown_linux_ext_dep.yaml
 create mode 100644 BaseTools/Source/C/Include/LoongArch64/ProcessorBind.h
 create mode 100644 MdeModulePkg/Core/DxeIplPeim/LoongArch64/DxeLoadFunc.c
 create mode 100644 MdePkg/Include/LoongArch64/ProcessorBind.h
 create mode 100644 MdePkg/Library/BaseCacheMaintenanceLib/LoongArchCache.c
 create mode 100644 MdePkg/Library/BaseCpuLib/LoongArch/CpuFlushTlb.S
 create mode 100644 MdePkg/Library/BaseCpuLib/LoongArch/CpuSleep.S
 create mode 100644 MdePkg/Library/BaseLib/LoongArch64/CpuBreakpoint.S
 create mode 100644 MdePkg/Library/BaseLib/LoongArch64/CpuPause.S
 create mode 100644 MdePkg/Library/BaseLib/LoongArch64/DisableInterrupts.S
 create mode 100644 MdePkg/Library/BaseLib/LoongArch64/EnableInterrupts.S
 create mode 100644 MdePkg/Library/BaseLib/LoongArch64/GetInterruptState.S
 create mode 100644 MdePkg/Library/BaseLib/LoongArch64/InternalSwitchStack.c
 create mode 100644 MdePkg/Library/BaseLib/LoongArch64/MemoryFence.S
 create mode 100644 MdePkg/Library/BaseLib/LoongArch64/SetJumpLongJump.S
 create mode 100644 MdePkg/Library/BaseLib/LoongArch64/SwitchStack.S
 create mode 100644 MdePkg/Library/BaseLib/LoongArch64/Unaligned.c
 create mode 100644 MdePkg/Library/BasePeCoffLib/LoongArch/PeCoffLoaderEx.c
 create mode 100644 MdePkg/Library/BaseSynchronizationLib/LoongArch64/Synchronization.c
 create mode 100644 ReadMe.md

--
2.27.0






Sent from Mailspring