public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [staging/LoongArch PATCH v1 00/33] Add a new architecture
@ 2022-02-09  6:27 Chao Li
  2022-02-09  6:27 ` [staging/LoongArch PATCH v1 01/33] FatPkg: Add LOONGARCH64 architecture for EDK2 CI Chao Li
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: Chao Li @ 2022-02-09  6:27 UTC (permalink / raw)
  To: devel

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.


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


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [staging/LoongArch PATCH v1 01/33] FatPkg: Add LOONGARCH64 architecture for EDK2 CI.
  2022-02-09  6:27 [staging/LoongArch PATCH v1 00/33] Add a new architecture Chao Li
@ 2022-02-09  6:27 ` Chao Li
  2022-02-09  6:27 ` [staging/LoongArch PATCH v1 02/33] FmpDevicePkg: " Chao Li
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Chao Li @ 2022-02-09  6:27 UTC (permalink / raw)
  To: devel; +Cc: Ray Ni

Add LOONGARCH64 architecture for EDK2 CI testing.

Cc: Ray Ni <ray.ni@intel.com>

Signed-off-by: Chao Li  <lichao@loongson.cn>
---
 FatPkg/FatPkg.dsc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/FatPkg/FatPkg.dsc b/FatPkg/FatPkg.dsc
index 4ddb5c3e00..c42059c59f 100644
--- a/FatPkg/FatPkg.dsc
+++ b/FatPkg/FatPkg.dsc
@@ -5,6 +5,7 @@
 #  for EDK II Prime release.
 #  Copyright (c) 2007 - 2021, Intel Corporation. All rights reserved.<BR>
 #  Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
+#  Copyright (c) 2022, Loongson Technology Corporation Limited. All rights reserved.<BR>
 #
 #  SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -15,7 +16,7 @@
   PLATFORM_GUID                  = 25b55dbc-9d0b-4a32-80da-46e1273d622c
   PLATFORM_VERSION               = 0.3
   DSC_SPECIFICATION              = 0x00010005
-  SUPPORTED_ARCHITECTURES        = IA32|X64|EBC|ARM|AARCH64|RISCV64
+  SUPPORTED_ARCHITECTURES        = IA32|X64|EBC|ARM|AARCH64|RISCV64|LOONGARCH64
   OUTPUT_DIRECTORY               = Build/Fat
   BUILD_TARGETS                  = DEBUG|RELEASE|NOOPT
   SKUID_IDENTIFIER               = DEFAULT
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [staging/LoongArch PATCH v1 02/33] FmpDevicePkg: Add LOONGARCH64 architecture for EDK2 CI.
  2022-02-09  6:27 [staging/LoongArch PATCH v1 00/33] Add a new architecture Chao Li
  2022-02-09  6:27 ` [staging/LoongArch PATCH v1 01/33] FatPkg: Add LOONGARCH64 architecture for EDK2 CI Chao Li
@ 2022-02-09  6:27 ` Chao Li
  2022-02-09  6:27 ` [staging/LoongArch PATCH v1 03/33] NetworkPkg: " Chao Li
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Chao Li @ 2022-02-09  6:27 UTC (permalink / raw)
  To: devel; +Cc: Liming Gao, Michael D Kinney, Guomin Jiang, Wei6 Xu

Add LOONGARCH64 architecture for EDK2 CI testing.

Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Cc: Wei6 Xu <wei6.xu@intel.com>

Signed-off-by: Chao Li <lichao@loongson.cn>
---
 FmpDevicePkg/FmpDevicePkg.dsc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/FmpDevicePkg/FmpDevicePkg.dsc b/FmpDevicePkg/FmpDevicePkg.dsc
index 7b1af285dd..f9f26c54bb 100644
--- a/FmpDevicePkg/FmpDevicePkg.dsc
+++ b/FmpDevicePkg/FmpDevicePkg.dsc
@@ -9,6 +9,7 @@
 # Copyright (c) Microsoft Corporation.<BR>
 # Copyright (c) 2018 - 2021, Intel Corporation. All rights reserved.<BR>
 # Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
+# Copyright (c) 2022, Loongson Technology Corporation Limited. All rights reserved.<BR>
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -20,7 +21,7 @@
   PLATFORM_VERSION               = 0.1
   DSC_SPECIFICATION              = 0x00010005
   OUTPUT_DIRECTORY               = Build/FmpDevicePkg
-  SUPPORTED_ARCHITECTURES        = IA32|X64|ARM|AARCH64|RISCV64
+  SUPPORTED_ARCHITECTURES        = IA32|X64|ARM|AARCH64|RISCV64|LOONGARCH64
   BUILD_TARGETS                  = DEBUG|RELEASE|NOOPT
   SKUID_IDENTIFIER               = DEFAULT
 
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [staging/LoongArch PATCH v1 03/33] NetworkPkg: Add LOONGARCH64 architecture for EDK2 CI.
  2022-02-09  6:27 [staging/LoongArch PATCH v1 00/33] Add a new architecture Chao Li
  2022-02-09  6:27 ` [staging/LoongArch PATCH v1 01/33] FatPkg: Add LOONGARCH64 architecture for EDK2 CI Chao Li
  2022-02-09  6:27 ` [staging/LoongArch PATCH v1 02/33] FmpDevicePkg: " Chao Li
@ 2022-02-09  6:27 ` Chao Li
  2022-02-09  6:27 ` [staging/LoongArch PATCH v1 04/33] NetworkPkg/HttpBootDxe: " Chao Li
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Chao Li @ 2022-02-09  6:27 UTC (permalink / raw)
  To: devel; +Cc: Maciej Rabeda, Jiaxin Wu, Siyuan Fu

Add LOONGARCH64 architecture for EDK2 CI testing.

Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>

Signed-off-by: Chao Li <lichao@loongson.cn>
---
 NetworkPkg/NetworkPkg.dsc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/NetworkPkg/NetworkPkg.dsc b/NetworkPkg/NetworkPkg.dsc
index 762134023d..6c231c97b5 100644
--- a/NetworkPkg/NetworkPkg.dsc
+++ b/NetworkPkg/NetworkPkg.dsc
@@ -4,6 +4,7 @@
 # (C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>
 # Copyright (c) 2009 - 2021, Intel Corporation. All rights reserved.<BR>
 # Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
+# Copyright (c) 2022, Loongson Technology Corporation Limited. All rights reserved.<BR>
 #    SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
@@ -14,7 +15,7 @@
   PLATFORM_VERSION               = 0.98
   DSC_SPECIFICATION              = 0x00010005
   OUTPUT_DIRECTORY               = Build/NetworkPkg
-  SUPPORTED_ARCHITECTURES        = IA32|X64|EBC|ARM|AARCH64|RISCV64
+  SUPPORTED_ARCHITECTURES        = IA32|X64|EBC|ARM|AARCH64|RISCV64|LOONGARCH64
   BUILD_TARGETS                  = DEBUG|RELEASE|NOOPT
   SKUID_IDENTIFIER               = DEFAULT
 
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [staging/LoongArch PATCH v1 04/33] NetworkPkg/HttpBootDxe: Add LOONGARCH64 architecture for EDK2 CI.
  2022-02-09  6:27 [staging/LoongArch PATCH v1 00/33] Add a new architecture Chao Li
                   ` (2 preceding siblings ...)
  2022-02-09  6:27 ` [staging/LoongArch PATCH v1 03/33] NetworkPkg: " Chao Li
@ 2022-02-09  6:27 ` Chao Li
  2022-02-09  6:27 ` [staging/LoongArch PATCH v1 05/33] CryptoPkg: " Chao Li
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Chao Li @ 2022-02-09  6:27 UTC (permalink / raw)
  To: devel; +Cc: Maciej Rabeda, Jiaxin Wu, Siyuan Fu

Add LOONGARCH architecture for EDK2 CI testing.

Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>

Signed-off-by: Chao Li <lichao@loongson.cn>
---
 NetworkPkg/HttpBootDxe/HttpBootDhcp4.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/NetworkPkg/HttpBootDxe/HttpBootDhcp4.h b/NetworkPkg/HttpBootDxe/HttpBootDhcp4.h
index d76f0e84d6..f00fabead2 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootDhcp4.h
+++ b/NetworkPkg/HttpBootDxe/HttpBootDhcp4.h
@@ -3,6 +3,7 @@
 
 Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
 Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
+Copyright (c) 2022, Loongson Technology Corporation Limited. All rights reserved.<BR>
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -40,6 +41,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #define EFI_HTTP_BOOT_CLIENT_SYSTEM_ARCHITECTURE  HTTP_CLIENT_ARCH_RISCV64
 #elif defined (MDE_CPU_EBC)
 #define EFI_HTTP_BOOT_CLIENT_SYSTEM_ARCHITECTURE  HTTP_CLIENT_ARCH_EBC
+#elif defined (MDE_CPU_LOONGARCH64)
+#define EFI_HTTP_BOOT_CLIENT_SYSTEM_ARCHITECTURE  HTTP_CLIENT_ARCH_LOONGARCH64
 #endif
 
 /// DHCP offer types among HTTP boot.
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [staging/LoongArch PATCH v1 05/33] CryptoPkg: Add LOONGARCH64 architecture for EDK2 CI.
  2022-02-09  6:27 [staging/LoongArch PATCH v1 00/33] Add a new architecture Chao Li
                   ` (3 preceding siblings ...)
  2022-02-09  6:27 ` [staging/LoongArch PATCH v1 04/33] NetworkPkg/HttpBootDxe: " Chao Li
@ 2022-02-09  6:27 ` Chao Li
  2022-02-09  6:27 ` [staging/LoongArch PATCH v1 06/33] MdePkg/Include: Add LOONGARCH related definitions " Chao Li
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Chao Li @ 2022-02-09  6:27 UTC (permalink / raw)
  To: devel; +Cc: Jiewen Yao, Jian J Wang, Xiaoyu Lu, Guomin Jiang

Add LOONGARCH64 architecture for EDK2 CI testing.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>

Signed-off-by: Chao Li <lichao@loongson.cn>
---
 CryptoPkg/CryptoPkg.dsc                                     | 3 ++-
 CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf             | 6 +++++-
 CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf          | 4 ++++
 CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf     | 3 ++-
 CryptoPkg/Library/BaseCryptLibOnProtocolPpi/DxeCryptLib.inf | 3 ++-
 CryptoPkg/Library/BaseCryptLibOnProtocolPpi/PeiCryptLib.inf | 3 ++-
 CryptoPkg/Library/Include/CrtLibSupport.h                   | 3 ++-
 CryptoPkg/Library/OpensslLib/OpensslLib.inf                 | 2 ++
 CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf           | 2 ++
 CryptoPkg/Library/TlsLib/TlsLib.inf                         | 3 ++-
 CryptoPkg/Library/TlsLibNull/TlsLibNull.inf                 | 3 ++-
 11 files changed, 27 insertions(+), 8 deletions(-)

diff --git a/CryptoPkg/CryptoPkg.dsc b/CryptoPkg/CryptoPkg.dsc
index 0aa72ed878..f7170c6719 100644
--- a/CryptoPkg/CryptoPkg.dsc
+++ b/CryptoPkg/CryptoPkg.dsc
@@ -4,6 +4,7 @@
 #
 #  Copyright (c) 2009 - 2021, Intel Corporation. All rights reserved.<BR>
 #  Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
+#  Copyright (c) 2022, Loongson Technology Corporation Limited. All rights reserved.<BR>
 #  SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
@@ -19,7 +20,7 @@
   PLATFORM_VERSION               = 0.98
   DSC_SPECIFICATION              = 0x00010005
   OUTPUT_DIRECTORY               = Build/CryptoPkg
-  SUPPORTED_ARCHITECTURES        = IA32|X64|ARM|AARCH64|RISCV64
+  SUPPORTED_ARCHITECTURES        = IA32|X64|ARM|AARCH64|RISCV64|LOONGARCH64
   BUILD_TARGETS                  = DEBUG|RELEASE|NOOPT
   SKUID_IDENTIFIER               = DEFAULT
 
diff --git a/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf b/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
index 49703fa4c9..fcc2f28701 100644
--- a/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
+++ b/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
@@ -8,6 +8,7 @@
 #
 #  Copyright (c) 2009 - 2020, Intel Corporation. All rights reserved.<BR>
 #  Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
+#  Copyright (c) 2022, Loongson Technology Corporation Limited. All rights reserved.<BR>
 #  SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
@@ -24,7 +25,7 @@
 #
 # The following information is for reference only and not required by the build tools.
 #
-#  VALID_ARCHITECTURES           = IA32 X64 ARM AARCH64 RISCV64
+#  VALID_ARCHITECTURES           = IA32 X64 ARM AARCH64 RISCV64 LOONGARCH64
 #
 
 [Sources]
@@ -73,6 +74,9 @@
 [Sources.RISCV64]
   Rand/CryptRand.c
 
+[Sources.LOONGARCH64]
+  Rand/CryptRand.c
+
 [Packages]
   MdePkg/MdePkg.dec
   CryptoPkg/CryptoPkg.dec
diff --git a/CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf b/CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf
index fdbb6edfd2..c76ec56e86 100644
--- a/CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf
+++ b/CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf
@@ -13,6 +13,7 @@
 #
 #  Copyright (c) 2009 - 2021, Intel Corporation. All rights reserved.<BR>
 #  Copyright (c) 2021, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
+#  Copyright (c) 2022, Loongson Technology Corporation Limited. All rights reserved.<BR>
 #  SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
@@ -78,6 +79,9 @@
 [Sources.RISCV64]
   Rand/CryptRand.c
 
+[Sources.LOONGARCH64]
+  Rand/CryptRand.c
+
 [Packages]
   MdePkg/MdePkg.dec
   CryptoPkg/CryptoPkg.dec
diff --git a/CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf b/CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf
index faf959827b..271b29819c 100644
--- a/CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf
+++ b/CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf
@@ -8,6 +8,7 @@
 #
 #  Copyright (c) 2009 - 2020, Intel Corporation. All rights reserved.<BR>
 #  Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
+#  Copyright (c) 2022, Loongson Technology Corporation Limited. All rights reserved.<BR>
 #  SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
@@ -24,7 +25,7 @@
 #
 # The following information is for reference only and not required by the build tools.
 #
-#  VALID_ARCHITECTURES           = IA32 X64 ARM AARCH64 RISCV64
+#  VALID_ARCHITECTURES           = IA32 X64 ARM AARCH64 RISCV64 LOONGARCH64
 #
 
 [Sources]
diff --git a/CryptoPkg/Library/BaseCryptLibOnProtocolPpi/DxeCryptLib.inf b/CryptoPkg/Library/BaseCryptLibOnProtocolPpi/DxeCryptLib.inf
index baa4433cbe..b4945de336 100644
--- a/CryptoPkg/Library/BaseCryptLibOnProtocolPpi/DxeCryptLib.inf
+++ b/CryptoPkg/Library/BaseCryptLibOnProtocolPpi/DxeCryptLib.inf
@@ -4,6 +4,7 @@
 #
 # Copyright (C) Microsoft Corporation. All rights reserved.
 # Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
+# Copyright (c) 2022, Loongson Technology Corporation Limited. All rights reserved.<BR>
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
@@ -22,7 +23,7 @@
 #
 # The following information is for reference only and not required by the build tools.
 #
-# VALID_ARCHITECTURES = IA32 X64 ARM AARCH64 RISCV64
+# VALID_ARCHITECTURES = IA32 X64 ARM AARCH64 RISCV64 LOONGARCH64
 #
 
 [Packages]
diff --git a/CryptoPkg/Library/BaseCryptLibOnProtocolPpi/PeiCryptLib.inf b/CryptoPkg/Library/BaseCryptLibOnProtocolPpi/PeiCryptLib.inf
index 038ca71890..e7d153db0b 100644
--- a/CryptoPkg/Library/BaseCryptLibOnProtocolPpi/PeiCryptLib.inf
+++ b/CryptoPkg/Library/BaseCryptLibOnProtocolPpi/PeiCryptLib.inf
@@ -4,6 +4,7 @@
 #
 # Copyright (C) Microsoft Corporation. All rights reserved.
 # Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
+# Copyright (c) 2022, Loongson Technology Corporation Limited. All rights reserved.<BR>
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
@@ -21,7 +22,7 @@
 #
 # The following information is for reference only and not required by the build tools.
 #
-# VALID_ARCHITECTURES = IA32 X64 ARM AARCH64 RISCV64
+# VALID_ARCHITECTURES = IA32 X64 ARM AARCH64 RISCV64 LOONGARCH64
 #
 
 [Packages]
diff --git a/CryptoPkg/Library/Include/CrtLibSupport.h b/CryptoPkg/Library/Include/CrtLibSupport.h
index d257dca8fa..d1e7b37c36 100644
--- a/CryptoPkg/Library/Include/CrtLibSupport.h
+++ b/CryptoPkg/Library/Include/CrtLibSupport.h
@@ -4,6 +4,7 @@
 
 Copyright (c) 2010 - 2021, Intel Corporation. All rights reserved.<BR>
 Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
+Copyright (c) 2022, Loongson Technology Corporation Limited. All rights reserved.<BR>
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -45,7 +46,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #define CONFIG_HEADER_BN_H
 
 #if !defined (SIXTY_FOUR_BIT) && !defined (THIRTY_TWO_BIT)
-  #if defined (MDE_CPU_X64) || defined (MDE_CPU_AARCH64) || defined (MDE_CPU_IA64) || defined (MDE_CPU_RISCV64)
+  #if defined (MDE_CPU_X64) || defined (MDE_CPU_AARCH64) || defined (MDE_CPU_IA64) || defined (MDE_CPU_RISCV64) || defined (MDE_CPU_LOONGARCH64)
 //
 // With GCC we would normally use SIXTY_FOUR_BIT_LONG, but MSVC needs
 // SIXTY_FOUR_BIT, because 'long' is 32-bit and only 'long long' is
diff --git a/CryptoPkg/Library/OpensslLib/OpensslLib.inf b/CryptoPkg/Library/OpensslLib/OpensslLib.inf
index d84bde056a..bf606d8751 100644
--- a/CryptoPkg/Library/OpensslLib/OpensslLib.inf
+++ b/CryptoPkg/Library/OpensslLib/OpensslLib.inf
@@ -3,6 +3,7 @@
 #
 #  Copyright (c) 2010 - 2020, Intel Corporation. All rights reserved.<BR>
 #  (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
+#  Copyright (c) 2022, Loongson Technology Corporation Limited. All rights reserved.<BR>
 #  SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
@@ -622,6 +623,7 @@
   GCC:*_*_ARM_CC_FLAGS     = $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-error=unused-but-set-variable
   GCC:*_*_AARCH64_CC_FLAGS = $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-format -Wno-error=unused-but-set-variable
   GCC:*_*_RISCV64_CC_FLAGS = $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-format -Wno-error=unused-but-set-variable
+  GCC:*_*_LOONGARCH64_CC_FLAGS = $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-format -Wno-error=unused-but-set-variable
   GCC:*_CLANG35_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized
   GCC:*_CLANG38_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized
   GCC:*_CLANGPDB_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized -Wno-error=incompatible-pointer-types -Wno-error=pointer-sign -Wno-error=implicit-function-declaration -Wno-error=ignored-pragma-optimize
diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
index cdeed0d073..ebb480c278 100644
--- a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
+++ b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
@@ -3,6 +3,7 @@
 #
 #  Copyright (c) 2010 - 2020, Intel Corporation. All rights reserved.<BR>
 #  (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
+#  Copyright (c) 2022, Loongson Technology Corporation Limited. All rights reserved.<BR>
 #  SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
@@ -571,6 +572,7 @@
   GCC:*_*_ARM_CC_FLAGS     = $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-error=unused-but-set-variable
   GCC:*_*_AARCH64_CC_FLAGS = $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-format -Wno-error=unused-but-set-variable
   GCC:*_*_RISCV64_CC_FLAGS = $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-format -Wno-error=unused-but-set-variable
+  GCC:*_*_LOONGARCH64_CC_FLAGS = $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-format -Wno-error=unused-but-set-variable
   GCC:*_CLANG35_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized
   GCC:*_CLANG38_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized
   GCC:*_CLANGPDB_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized -Wno-error=incompatible-pointer-types -Wno-error=pointer-sign -Wno-error=implicit-function-declaration -Wno-error=ignored-pragma-optimize
diff --git a/CryptoPkg/Library/TlsLib/TlsLib.inf b/CryptoPkg/Library/TlsLib/TlsLib.inf
index 27209f4d7f..e63e268411 100644
--- a/CryptoPkg/Library/TlsLib/TlsLib.inf
+++ b/CryptoPkg/Library/TlsLib/TlsLib.inf
@@ -3,6 +3,7 @@
 #
 #  Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>
 #  (C) Copyright 2016-2020 Hewlett Packard Enterprise Development LP<BR>
+#  Copyright (c) 2022, Loongson Technology Corporation Limited. All rights reserved.<BR>
 #  SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
@@ -19,7 +20,7 @@
 #
 # The following information is for reference only and not required by the build tools.
 #
-#  VALID_ARCHITECTURES           = IA32 X64 ARM AARCH64 RISCV64
+#  VALID_ARCHITECTURES           = IA32 X64 ARM AARCH64 RISCV64 LOONGARCH64
 #
 
 [Sources]
diff --git a/CryptoPkg/Library/TlsLibNull/TlsLibNull.inf b/CryptoPkg/Library/TlsLibNull/TlsLibNull.inf
index b2920ddacf..12d7cc764a 100644
--- a/CryptoPkg/Library/TlsLibNull/TlsLibNull.inf
+++ b/CryptoPkg/Library/TlsLibNull/TlsLibNull.inf
@@ -3,6 +3,7 @@
 #
 #  Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>
 #  (C) Copyright 2016-2020 Hewlett Packard Enterprise Development LP<BR>
+#  Copyright (c) 2022, Loongson Technology Corporation Limited. All rights reserved.<BR>
 #  SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
@@ -19,7 +20,7 @@
 #
 # The following information is for reference only and not required by the build tools.
 #
-#  VALID_ARCHITECTURES           = IA32 X64 ARM AARCH64 RISCV64
+#  VALID_ARCHITECTURES           = IA32 X64 ARM AARCH64 RISCV64 LOONGARCH64
 #
 
 [Sources]
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [staging/LoongArch PATCH v1 06/33] MdePkg/Include: Add LOONGARCH related definitions EDK2 CI.
  2022-02-09  6:27 [staging/LoongArch PATCH v1 00/33] Add a new architecture Chao Li
                   ` (4 preceding siblings ...)
  2022-02-09  6:27 ` [staging/LoongArch PATCH v1 05/33] CryptoPkg: " Chao Li
@ 2022-02-09  6:27 ` Chao Li
  2022-02-09  6:27 ` [staging/LoongArch PATCH v1 07/33] SecurityPkg: Add LOONGARCH64 architecture for " Chao Li
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Chao Li @ 2022-02-09  6:27 UTC (permalink / raw)
  To: devel; +Cc: Michael D Kinney, Liming Gao, Zhiguang Liu

HTTP/PXE boot LOONGARCH64 related definitions for EDK2 CI.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>

Signed-off-by: Chao Li <lichao@loongson.cn>
---
 MdePkg/Include/IndustryStandard/Dhcp.h | 41 +++++++++++++++-----------
 1 file changed, 23 insertions(+), 18 deletions(-)

diff --git a/MdePkg/Include/IndustryStandard/Dhcp.h b/MdePkg/Include/IndustryStandard/Dhcp.h
index f209f1b2eb..086d24422d 100644
--- a/MdePkg/Include/IndustryStandard/Dhcp.h
+++ b/MdePkg/Include/IndustryStandard/Dhcp.h
@@ -4,6 +4,7 @@
 
   Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
   Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
+  Copyright (c) 2022, Loongson Technology Corporation Limited. All rights reserved.<BR>
   SPDX-License-Identifier: BSD-2-Clause-Patent
 **/
 
@@ -259,24 +260,28 @@ typedef enum {
 /// These identifiers are defined by IETF:
 /// http://www.ietf.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xml
 ///
-#define PXE_CLIENT_ARCH_X86_BIOS  0x0000           /// x86 BIOS for PXE
-#define PXE_CLIENT_ARCH_IPF       0x0002           /// Itanium for PXE
-#define PXE_CLIENT_ARCH_IA32      0x0006           /// x86 uefi for PXE
-#define PXE_CLIENT_ARCH_X64       0x0007           /// x64 uefi for PXE
-#define PXE_CLIENT_ARCH_EBC       0x0009           /// EBC for PXE
-#define PXE_CLIENT_ARCH_ARM       0x000A           /// Arm uefi 32 for PXE
-#define PXE_CLIENT_ARCH_AARCH64   0x000B           /// Arm uefi 64 for PXE
-#define PXE_CLIENT_ARCH_RISCV32   0x0019           /// RISC-V uefi 32 for PXE
-#define PXE_CLIENT_ARCH_RISCV64   0x001B           /// RISC-V uefi 64 for PXE
-#define PXE_CLIENT_ARCH_RISCV128  0x001D           /// RISC-V uefi 128 for PXE
+#define PXE_CLIENT_ARCH_X86_BIOS      0x0000          /// x86 BIOS for PXE
+#define PXE_CLIENT_ARCH_IPF           0x0002          /// Itanium for PXE
+#define PXE_CLIENT_ARCH_IA32          0x0006          /// x86 uefi for PXE
+#define PXE_CLIENT_ARCH_X64           0x0007          /// x64 uefi for PXE
+#define PXE_CLIENT_ARCH_EBC           0x0009          /// EBC for PXE
+#define PXE_CLIENT_ARCH_ARM           0x000A          /// Arm uefi 32 for PXE
+#define PXE_CLIENT_ARCH_AARCH64       0x000B          /// Arm uefi 64 for PXE
+#define PXE_CLIENT_ARCH_RISCV32       0x0019          /// RISC-V uefi 32 for PXE
+#define PXE_CLIENT_ARCH_RISCV64       0x001B          /// RISC-V uefi 64 for PXE
+#define PXE_CLIENT_ARCH_RISCV128      0x001D          /// RISC-V uefi 128 for PXE
+#define PXE_CLIENT_ARCH_LOONGARCH32   0x0025          /// LOONGARCH uefi 32 for PXE
+#define PXE_CLIENT_ARCH_LOONGARCH64   0x0027          /// LOONGARCH uefi 64 for PXE
 
-#define HTTP_CLIENT_ARCH_IA32      0x000F          /// x86 uefi boot from http
-#define HTTP_CLIENT_ARCH_X64       0x0010          /// x64 uefi boot from http
-#define HTTP_CLIENT_ARCH_EBC       0x0011          /// EBC boot from http
-#define HTTP_CLIENT_ARCH_ARM       0x0012          /// Arm uefi 32 boot from http
-#define HTTP_CLIENT_ARCH_AARCH64   0x0013          /// Arm uefi 64 boot from http
-#define HTTP_CLIENT_ARCH_RISCV32   0x001A          /// RISC-V uefi 32 boot from http
-#define HTTP_CLIENT_ARCH_RISCV64   0x001C          /// RISC-V uefi 64 boot from http
-#define HTTP_CLIENT_ARCH_RISCV128  0x001E          /// RISC-V uefi 128 boot from http
+#define HTTP_CLIENT_ARCH_IA32         0x000F          /// x86 uefi boot from http
+#define HTTP_CLIENT_ARCH_X64          0x0010          /// x64 uefi boot from http
+#define HTTP_CLIENT_ARCH_EBC          0x0011          /// EBC boot from http
+#define HTTP_CLIENT_ARCH_ARM          0x0012          /// Arm uefi 32 boot from http
+#define HTTP_CLIENT_ARCH_AARCH64      0x0013          /// Arm uefi 64 boot from http
+#define HTTP_CLIENT_ARCH_RISCV32      0x001A          /// RISC-V uefi 32 boot from http
+#define HTTP_CLIENT_ARCH_RISCV64      0x001C          /// RISC-V uefi 64 boot from http
+#define HTTP_CLIENT_ARCH_RISCV128     0x001E          /// RISC-V uefi 128 boot from http
+#define HTTP_CLIENT_ARCH_LOONGARCH32  0x0026          /// LOONGARCH uefi 32 boot from http
+#define HTTP_CLIENT_ARCH_LOONGARCH64  0x0028          /// LOONGARCH uefi 64 boot from http
 
 #endif
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [staging/LoongArch PATCH v1 07/33] SecurityPkg: Add LOONGARCH64 architecture for EDK2 CI.
  2022-02-09  6:27 [staging/LoongArch PATCH v1 00/33] Add a new architecture Chao Li
                   ` (5 preceding siblings ...)
  2022-02-09  6:27 ` [staging/LoongArch PATCH v1 06/33] MdePkg/Include: Add LOONGARCH related definitions " Chao Li
@ 2022-02-09  6:27 ` Chao Li
  2022-02-09  6:27 ` [staging/LoongArch PATCH v1 08/33] ShellPkg: " Chao Li
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Chao Li @ 2022-02-09  6:27 UTC (permalink / raw)
  To: devel; +Cc: Jiewen Yao, Jian J Wang

Add LOONGARCH64 architecture to SecurityPkg for EDK2 CI testing.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>

Signed-off-by: Chao Li <lichao@loongson.cn>
---
 SecurityPkg/SecurityPkg.dsc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/SecurityPkg/SecurityPkg.dsc b/SecurityPkg/SecurityPkg.dsc
index 73a93c2285..d96ac06b7d 100644
--- a/SecurityPkg/SecurityPkg.dsc
+++ b/SecurityPkg/SecurityPkg.dsc
@@ -3,6 +3,7 @@
 #
 # Copyright (c) 2009 - 2021, Intel Corporation. All rights reserved.<BR>
 # (C) Copyright 2015-2020 Hewlett Packard Enterprise Development LP<BR>
+# Copyright (c) 2022, Loongson Technology Corporation Limited. All rights reserved.<BR>
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
@@ -13,7 +14,7 @@
   PLATFORM_VERSION               = 0.98
   DSC_SPECIFICATION              = 0x00010005
   OUTPUT_DIRECTORY               = Build/SecurityPkg
-  SUPPORTED_ARCHITECTURES        = IA32|X64|EBC|ARM|AARCH64|RISCV64
+  SUPPORTED_ARCHITECTURES        = IA32|X64|EBC|ARM|AARCH64|RISCV64|LOONGARCH64
   BUILD_TARGETS                  = DEBUG|RELEASE|NOOPT
   SKUID_IDENTIFIER               = DEFAULT
 
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [staging/LoongArch PATCH v1 08/33] ShellPkg: Add LOONGARCH64 architecture for EDK2 CI.
  2022-02-09  6:27 [staging/LoongArch PATCH v1 00/33] Add a new architecture Chao Li
                   ` (6 preceding siblings ...)
  2022-02-09  6:27 ` [staging/LoongArch PATCH v1 07/33] SecurityPkg: Add LOONGARCH64 architecture for " Chao Li
@ 2022-02-09  6:27 ` Chao Li
  2022-02-09  6:27 ` [staging/LoongArch PATCH v1 09/33] UnitTestFrameworkPkg: " Chao Li
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Chao Li @ 2022-02-09  6:27 UTC (permalink / raw)
  To: devel; +Cc: Ray Ni, Zhichao Gao

Add LOONGARCH64 architecture to ShellPkg for EDK2 CI testing.

Cc: Ray Ni <ray.ni@intel.com>
Cc: Zhichao Gao <zhichao.gao@intel.com>

Signed-off-by: Chao Li <lichao@loongson.cn>
---
 ShellPkg/ShellPkg.dsc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ShellPkg/ShellPkg.dsc b/ShellPkg/ShellPkg.dsc
index 38fde3dc71..dd0d88603f 100644
--- a/ShellPkg/ShellPkg.dsc
+++ b/ShellPkg/ShellPkg.dsc
@@ -4,6 +4,7 @@
 # Copyright (c) 2007 - 2021, Intel Corporation. All rights reserved.<BR>
 # Copyright (c) 2018 - 2020, Arm Limited. All rights reserved.<BR>
 # Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
+# Copyright (c) 2022, Loongson Technology Corporation Limited. All rights reserved.<BR>
 #
 #    SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -15,7 +16,7 @@
   PLATFORM_VERSION               = 1.02
   DSC_SPECIFICATION              = 0x00010006
   OUTPUT_DIRECTORY               = Build/Shell
-  SUPPORTED_ARCHITECTURES        = IA32|X64|EBC|ARM|AARCH64|RISCV64
+  SUPPORTED_ARCHITECTURES        = IA32|X64|EBC|ARM|AARCH64|RISCV64|LOONGARCH64
   BUILD_TARGETS                  = DEBUG|RELEASE|NOOPT
   SKUID_IDENTIFIER               = DEFAULT
 
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [staging/LoongArch PATCH v1 09/33] UnitTestFrameworkPkg: Add LOONGARCH64 architecture for EDK2 CI.
  2022-02-09  6:27 [staging/LoongArch PATCH v1 00/33] Add a new architecture Chao Li
                   ` (7 preceding siblings ...)
  2022-02-09  6:27 ` [staging/LoongArch PATCH v1 08/33] ShellPkg: " Chao Li
@ 2022-02-09  6:27 ` Chao Li
  2022-02-09  6:27 ` [staging/LoongArch PATCH v1 10/33] MdePkg/DxeServicesLib: Add LOONGARCH64 architecture Chao Li
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Chao Li @ 2022-02-09  6:27 UTC (permalink / raw)
  To: devel; +Cc: Michael D Kinney

Add LOONGARCH64 architecture to UnitTestFramworkPkg for LOONGARCH64 EDK2
CI.

Cc: Michael D Kinney <michael.d.kinney@intel.com>

Signed-off-by: Chao Li <lichao@loongson.cn>
---
 UnitTestFrameworkPkg/UnitTestFrameworkPkg.dsc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/UnitTestFrameworkPkg/UnitTestFrameworkPkg.dsc b/UnitTestFrameworkPkg/UnitTestFrameworkPkg.dsc
index 23baef87d6..e4f9fb6eb6 100644
--- a/UnitTestFrameworkPkg/UnitTestFrameworkPkg.dsc
+++ b/UnitTestFrameworkPkg/UnitTestFrameworkPkg.dsc
@@ -3,6 +3,7 @@
 #
 # Copyright (c) 2019 - 2021, Intel Corporation. All rights reserved.<BR>
 # Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
+# Copyright (c) 2022, Loongson Technology Corporation Limited. All rights reserved.<BR>
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -14,7 +15,7 @@
   PLATFORM_VERSION        = 1.00
   DSC_SPECIFICATION       = 0x00010005
   OUTPUT_DIRECTORY        = Build/UnitTestFrameworkPkg
-  SUPPORTED_ARCHITECTURES = IA32|X64|ARM|AARCH64|RISCV64
+  SUPPORTED_ARCHITECTURES = IA32|X64|ARM|AARCH64|RISCV64|LOONGARCH64
   BUILD_TARGETS           = DEBUG|RELEASE|NOOPT
   SKUID_IDENTIFIER        = DEFAULT
 
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [staging/LoongArch PATCH v1 10/33] MdePkg/DxeServicesLib: Add LOONGARCH64 architecture
  2022-02-09  6:27 [staging/LoongArch PATCH v1 00/33] Add a new architecture Chao Li
                   ` (8 preceding siblings ...)
  2022-02-09  6:27 ` [staging/LoongArch PATCH v1 09/33] UnitTestFrameworkPkg: " Chao Li
@ 2022-02-09  6:27 ` Chao Li
  2022-02-09  6:27 ` [staging/LoongArch PATCH v1 11/33] MdeModulePkg: Use LockBoxNullLib for LOONGARCH64 Chao Li
  2022-02-09  6:27 ` [staging/LoongArch PATCH v1 12/33] .python/SpellCheck: Add "Loongson" and "LOONGARCH" to "words" section Chao Li
  11 siblings, 0 replies; 13+ messages in thread
From: Chao Li @ 2022-02-09  6:27 UTC (permalink / raw)
  To: devel; +Cc: Michael D Kinney, Liming Gao, Zhiguang Liu

Add LOONGARCH64 architecture to MdePkg/DxeServiceLib.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>

Signed-off-by: Chao Li <lichao@loongson.cn>
---
 MdePkg/Library/DxeServicesLib/DxeServicesLib.inf | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/MdePkg/Library/DxeServicesLib/DxeServicesLib.inf b/MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
index ec3e8711c2..a93541847f 100644
--- a/MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
+++ b/MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
@@ -22,13 +22,13 @@
   LIBRARY_CLASS                  = DxeServicesLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SMM_DRIVER SMM_CORE UEFI_APPLICATION UEFI_DRIVER
 
 #
-#  VALID_ARCHITECTURES           = IA32 X64 EBC ARM AARCH64 RISCV64
+#  VALID_ARCHITECTURES           = IA32 X64 EBC ARM AARCH64 RISCV64 LOONGARCH64
 #
 
 [Sources]
   DxeServicesLib.c
 
-[Sources.IA32, Sources.EBC, Sources.ARM, Sources.AARCH64, Sources.RISCV64]
+[Sources.IA32, Sources.EBC, Sources.ARM, Sources.AARCH64, Sources.RISCV64, Sources.LOONGARCH64]
   Allocate.c
 
 [Sources.X64]
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [staging/LoongArch PATCH v1 11/33] MdeModulePkg: Use LockBoxNullLib for LOONGARCH64
  2022-02-09  6:27 [staging/LoongArch PATCH v1 00/33] Add a new architecture Chao Li
                   ` (9 preceding siblings ...)
  2022-02-09  6:27 ` [staging/LoongArch PATCH v1 10/33] MdePkg/DxeServicesLib: Add LOONGARCH64 architecture Chao Li
@ 2022-02-09  6:27 ` Chao Li
  2022-02-09  6:27 ` [staging/LoongArch PATCH v1 12/33] .python/SpellCheck: Add "Loongson" and "LOONGARCH" to "words" section Chao Li
  11 siblings, 0 replies; 13+ messages in thread
From: Chao Li @ 2022-02-09  6:27 UTC (permalink / raw)
  To: devel; +Cc: Jian J Wang, Liming Gao

LoongArch doesn't have SMM by now.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>

Signed-off-by: Chao Li <lichao@loongson.cn>
---
 MdeModulePkg/MdeModulePkg.dsc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/MdeModulePkg/MdeModulePkg.dsc b/MdeModulePkg/MdeModulePkg.dsc
index b1d8346186..6807e09648 100644
--- a/MdeModulePkg/MdeModulePkg.dsc
+++ b/MdeModulePkg/MdeModulePkg.dsc
@@ -15,7 +15,7 @@
   PLATFORM_VERSION               = 0.98
   DSC_SPECIFICATION              = 0x00010005
   OUTPUT_DIRECTORY               = Build/MdeModule
-  SUPPORTED_ARCHITECTURES        = IA32|X64|EBC|ARM|AARCH64|RISCV64
+  SUPPORTED_ARCHITECTURES        = IA32|X64|EBC|ARM|AARCH64|RISCV64|LOONGARCH64
   BUILD_TARGETS                  = DEBUG|RELEASE|NOOPT
   SKUID_IDENTIFIER               = DEFAULT
 
@@ -191,7 +191,7 @@
   #
   NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf
 
-[LibraryClasses.EBC, LibraryClasses.RISCV64]
+[LibraryClasses.EBC, LibraryClasses.RISCV64, LibraryClasses.LOONGARCH64]
   LockBoxLib|MdeModulePkg/Library/LockBoxNullLib/LockBoxNullLib.inf
 
 [PcdsFeatureFlag]
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [staging/LoongArch PATCH v1 12/33] .python/SpellCheck: Add "Loongson" and "LOONGARCH" to "words" section
  2022-02-09  6:27 [staging/LoongArch PATCH v1 00/33] Add a new architecture Chao Li
                   ` (10 preceding siblings ...)
  2022-02-09  6:27 ` [staging/LoongArch PATCH v1 11/33] MdeModulePkg: Use LockBoxNullLib for LOONGARCH64 Chao Li
@ 2022-02-09  6:27 ` Chao Li
  11 siblings, 0 replies; 13+ messages in thread
From: Chao Li @ 2022-02-09  6:27 UTC (permalink / raw)
  To: devel; +Cc: Michael D Kinney, Liming Gao

Add Loongson and LOONGARCH to "words" section in cspell.base.yaml file
to avoid spelling check error.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>

Signed-off-by: Chao Li <lichao@loongson.cn>
---
 .pytool/Plugin/SpellCheck/cspell.base.yaml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/.pytool/Plugin/SpellCheck/cspell.base.yaml b/.pytool/Plugin/SpellCheck/cspell.base.yaml
index ad6f7ac06a..aa985cd59a 100644
--- a/.pytool/Plugin/SpellCheck/cspell.base.yaml
+++ b/.pytool/Plugin/SpellCheck/cspell.base.yaml
@@ -178,6 +178,8 @@
         "vcruntimed",
         "ucrtd",
         "msvcrtd",
-        "XIPFLAGS"
+        "XIPFLAGS",
+        "Loongson",
+        "LOONGARCH"
     ]
 }
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2022-02-09  6:28 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-09  6:27 [staging/LoongArch PATCH v1 00/33] Add a new architecture Chao Li
2022-02-09  6:27 ` [staging/LoongArch PATCH v1 01/33] FatPkg: Add LOONGARCH64 architecture for EDK2 CI Chao Li
2022-02-09  6:27 ` [staging/LoongArch PATCH v1 02/33] FmpDevicePkg: " Chao Li
2022-02-09  6:27 ` [staging/LoongArch PATCH v1 03/33] NetworkPkg: " Chao Li
2022-02-09  6:27 ` [staging/LoongArch PATCH v1 04/33] NetworkPkg/HttpBootDxe: " Chao Li
2022-02-09  6:27 ` [staging/LoongArch PATCH v1 05/33] CryptoPkg: " Chao Li
2022-02-09  6:27 ` [staging/LoongArch PATCH v1 06/33] MdePkg/Include: Add LOONGARCH related definitions " Chao Li
2022-02-09  6:27 ` [staging/LoongArch PATCH v1 07/33] SecurityPkg: Add LOONGARCH64 architecture for " Chao Li
2022-02-09  6:27 ` [staging/LoongArch PATCH v1 08/33] ShellPkg: " Chao Li
2022-02-09  6:27 ` [staging/LoongArch PATCH v1 09/33] UnitTestFrameworkPkg: " Chao Li
2022-02-09  6:27 ` [staging/LoongArch PATCH v1 10/33] MdePkg/DxeServicesLib: Add LOONGARCH64 architecture Chao Li
2022-02-09  6:27 ` [staging/LoongArch PATCH v1 11/33] MdeModulePkg: Use LockBoxNullLib for LOONGARCH64 Chao Li
2022-02-09  6:27 ` [staging/LoongArch PATCH v1 12/33] .python/SpellCheck: Add "Loongson" and "LOONGARCH" to "words" section Chao Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox