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.web09.23539.1644389575087105939 for ; Tue, 08 Feb 2022 22:52:55 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: loongson.cn, ip: 114.242.206.163, mailfrom: lichao@loongson.cn) Received: from code-server.gen (unknown [10.2.9.245]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9DxP+LCZANicIsIAA--.25689S2; Wed, 09 Feb 2022 14:52:53 +0800 (CST) From: "Chao Li" To: devel@edk2.groups.io Cc: Jiewen Yao , Jian J Wang , Xiaoyu Lu , Guomin Jiang Subject: [staging/LoongArch RESEND PATCH v1 05/33] CryptoPkg: Add LOONGARCH64 architecture for EDK2 CI. Date: Wed, 9 Feb 2022 14:52:50 +0800 Message-Id: <20220209065250.2983803-1-lichao@loongson.cn> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-CM-TRANSID: AQAAf9DxP+LCZANicIsIAA--.25689S2 X-Coremail-Antispam: 1UD129KBjvAXoWfGFyDCr4fJr4UJrWxGF1rZwb_yoW8Jry5Go W7Gr4vgwsFy3s7Gayag3sxJr1jgasxW3WUJr48Gr18GF92yrnrCay5Aw1fJryUXr18Aas8 GrZ5Wa9ayFZxKr18n29KB7ZKAUJUUUU8529EdanIXcx71UUUUU7v73VFW2AGmfu7bjvjm3 AaLaJ3UjIYCTnIWjp_UUUYP7k0a2IF6FyUM7kC6x804xWl14x267AKxVWUJVW8JwAFc2x0 x2IEx4CE42xK8VAvwI8IcIk0rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2ocxC64kIII0Yj4 1l84x0c7CEw4AK67xGY2AK021l84ACjcxK6xIIjxv20xvE14v26ryj6F1UM28EF7xvwVC0 I7IYx2IY6xkF7I0E14v26F4j6r4UJwA2z4x0Y4vEx4A2jsIE14v26F4UJVW0owA2z4x0Y4 vEx4A2jsIEc7CjxVAFwI0_GcCE3s1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xv F2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_JF0_Jw1lYx0Ec7CjxVAajcxG14v26r 1j6r4UMcIj6I8E87Iv67AKxVW8JVWxJwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij 64vIr41lc7CjxVAaw2AFwI0_JF0_Jw1lc2xSY4AK6svPMxAIw28IcxkI7VAKI48JMxC20s 026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_ JrI_JrWlx4CE17CEb7AF67AKxVWUAVWUtwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14 v26r1I6r4UMIIF0xvE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwCI42IY6xAIw20EY4v20xva j40_Gr0_Zr1lIxAIcVC2z280aVAFwI0_Gr0_Cr1lIxAIcVC2z280aVCY1x0267AKxVW8JV W8JrUvcSsGvfC2KfnxnUUI43ZEXa7IU0gzstUUUUU== X-CM-SenderInfo: xolfxt3r6o00pqjv00gofq/1tbiAQAMCF3QvO0LnAABsP Content-Transfer-Encoding: quoted-printable Add LOONGARCH64 architecture for EDK2 CI testing. Cc: Jiewen Yao Cc: Jian J Wang Cc: Xiaoyu Lu Cc: Guomin Jiang Signed-off-by: Chao Li --- 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 @@ #=0D # Copyright (c) 2009 - 2021, Intel Corporation. All rights reserved.
= =0D # Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All righ= ts reserved.
=0D +# Copyright (c) 2022, Loongson Technology Corporation Limited. All rights= reserved.
=0D # SPDX-License-Identifier: BSD-2-Clause-Patent=0D #=0D ##=0D @@ -19,7 +20,7 @@ PLATFORM_VERSION =3D 0.98=0D DSC_SPECIFICATION =3D 0x00010005=0D OUTPUT_DIRECTORY =3D Build/CryptoPkg=0D - SUPPORTED_ARCHITECTURES =3D IA32|X64|ARM|AARCH64|RISCV64=0D + SUPPORTED_ARCHITECTURES =3D IA32|X64|ARM|AARCH64|RISCV64|LOONGARC= H64=0D BUILD_TARGETS =3D DEBUG|RELEASE|NOOPT=0D SKUID_IDENTIFIER =3D DEFAULT=0D =0D diff --git a/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf b/CryptoPkg/Li= brary/BaseCryptLib/BaseCryptLib.inf index 49703fa4c9..fcc2f28701 100644 --- a/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf +++ b/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf @@ -8,6 +8,7 @@ #=0D # Copyright (c) 2009 - 2020, Intel Corporation. All rights reserved.
= =0D # Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All righ= ts reserved.
=0D +# Copyright (c) 2022, Loongson Technology Corporation Limited. All rights= reserved.
=0D # SPDX-License-Identifier: BSD-2-Clause-Patent=0D #=0D ##=0D @@ -24,7 +25,7 @@ #=0D # The following information is for reference only and not required by the = build tools.=0D #=0D -# VALID_ARCHITECTURES =3D IA32 X64 ARM AARCH64 RISCV64=0D +# VALID_ARCHITECTURES =3D IA32 X64 ARM AARCH64 RISCV64 LOONGARC= H64=0D #=0D =0D [Sources]=0D @@ -73,6 +74,9 @@ [Sources.RISCV64]=0D Rand/CryptRand.c=0D =0D +[Sources.LOONGARCH64]=0D + Rand/CryptRand.c=0D +=0D [Packages]=0D MdePkg/MdePkg.dec=0D CryptoPkg/CryptoPkg.dec=0D 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 @@ #=0D # Copyright (c) 2009 - 2021, Intel Corporation. All rights reserved.
= =0D # Copyright (c) 2021, Hewlett Packard Enterprise Development LP. All righ= ts reserved.
=0D +# Copyright (c) 2022, Loongson Technology Corporation Limited. All rights= reserved.
=0D # SPDX-License-Identifier: BSD-2-Clause-Patent=0D #=0D ##=0D @@ -78,6 +79,9 @@ [Sources.RISCV64]=0D Rand/CryptRand.c=0D =0D +[Sources.LOONGARCH64]=0D + Rand/CryptRand.c=0D +=0D [Packages]=0D MdePkg/MdePkg.dec=0D CryptoPkg/CryptoPkg.dec=0D diff --git a/CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf b/Cryp= toPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf index faf959827b..271b29819c 100644 --- a/CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf +++ b/CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf @@ -8,6 +8,7 @@ #=0D # Copyright (c) 2009 - 2020, Intel Corporation. All rights reserved.
= =0D # Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All righ= ts reserved.
=0D +# Copyright (c) 2022, Loongson Technology Corporation Limited. All rights= reserved.
=0D # SPDX-License-Identifier: BSD-2-Clause-Patent=0D #=0D ##=0D @@ -24,7 +25,7 @@ #=0D # The following information is for reference only and not required by the = build tools.=0D #=0D -# VALID_ARCHITECTURES =3D IA32 X64 ARM AARCH64 RISCV64=0D +# VALID_ARCHITECTURES =3D IA32 X64 ARM AARCH64 RISCV64 LOONGARC= H64=0D #=0D =0D [Sources]=0D 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 @@ #=0D # Copyright (C) Microsoft Corporation. All rights reserved.=0D # Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All right= s reserved.
=0D +# Copyright (c) 2022, Loongson Technology Corporation Limited. All rights = reserved.
=0D # SPDX-License-Identifier: BSD-2-Clause-Patent=0D #=0D ##=0D @@ -22,7 +23,7 @@ #=0D # The following information is for reference only and not required by the = build tools.=0D #=0D -# VALID_ARCHITECTURES =3D IA32 X64 ARM AARCH64 RISCV64=0D +# VALID_ARCHITECTURES =3D IA32 X64 ARM AARCH64 RISCV64 LOONGARCH64=0D #=0D =0D [Packages]=0D 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 @@ #=0D # Copyright (C) Microsoft Corporation. All rights reserved.=0D # Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All right= s reserved.
=0D +# Copyright (c) 2022, Loongson Technology Corporation Limited. All rights = reserved.
=0D # SPDX-License-Identifier: BSD-2-Clause-Patent=0D #=0D ##=0D @@ -21,7 +22,7 @@ #=0D # The following information is for reference only and not required by the = build tools.=0D #=0D -# VALID_ARCHITECTURES =3D IA32 X64 ARM AARCH64 RISCV64=0D +# VALID_ARCHITECTURES =3D IA32 X64 ARM AARCH64 RISCV64 LOONGARCH64=0D #=0D =0D [Packages]=0D 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 @@ =0D Copyright (c) 2010 - 2021, Intel Corporation. All rights reserved.
=0D Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights = reserved.
=0D +Copyright (c) 2022, Loongson Technology Corporation Limited. All rights re= served.
=0D SPDX-License-Identifier: BSD-2-Clause-Patent=0D =0D **/=0D @@ -45,7 +46,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #define CONFIG_HEADER_BN_H=0D =0D #if !defined (SIXTY_FOUR_BIT) && !defined (THIRTY_TWO_BIT)=0D - #if defined (MDE_CPU_X64) || defined (MDE_CPU_AARCH64) || defined (MDE_C= PU_IA64) || defined (MDE_CPU_RISCV64)=0D + #if defined (MDE_CPU_X64) || defined (MDE_CPU_AARCH64) || defined (MDE_C= PU_IA64) || defined (MDE_CPU_RISCV64) || defined (MDE_CPU_LOONGARCH64)=0D //=0D // With GCC we would normally use SIXTY_FOUR_BIT_LONG, but MSVC needs=0D // SIXTY_FOUR_BIT, because 'long' is 32-bit and only 'long long' is=0D diff --git a/CryptoPkg/Library/OpensslLib/OpensslLib.inf b/CryptoPkg/Librar= y/OpensslLib/OpensslLib.inf index d84bde056a..bf606d8751 100644 --- a/CryptoPkg/Library/OpensslLib/OpensslLib.inf +++ b/CryptoPkg/Library/OpensslLib/OpensslLib.inf @@ -3,6 +3,7 @@ #=0D # Copyright (c) 2010 - 2020, Intel Corporation. All rights reserved.
= =0D # (C) Copyright 2020 Hewlett Packard Enterprise Development LP
=0D +# Copyright (c) 2022, Loongson Technology Corporation Limited. All rights= reserved.
=0D # SPDX-License-Identifier: BSD-2-Clause-Patent=0D #=0D ##=0D @@ -622,6 +623,7 @@ GCC:*_*_ARM_CC_FLAGS =3D $(OPENSSL_FLAGS) -Wno-error=3Dmaybe-uniniti= alized -Wno-error=3Dunused-but-set-variable=0D GCC:*_*_AARCH64_CC_FLAGS =3D $(OPENSSL_FLAGS) -Wno-error=3Dmaybe-uniniti= alized -Wno-format -Wno-error=3Dunused-but-set-variable=0D GCC:*_*_RISCV64_CC_FLAGS =3D $(OPENSSL_FLAGS) -Wno-error=3Dmaybe-uniniti= alized -Wno-format -Wno-error=3Dunused-but-set-variable=0D + GCC:*_*_LOONGARCH64_CC_FLAGS =3D $(OPENSSL_FLAGS) -Wno-error=3Dmaybe-uni= nitialized -Wno-format -Wno-error=3Dunused-but-set-variable=0D GCC:*_CLANG35_*_CC_FLAGS =3D -std=3Dc99 -Wno-error=3Duninitialized=0D GCC:*_CLANG38_*_CC_FLAGS =3D -std=3Dc99 -Wno-error=3Duninitialized=0D GCC:*_CLANGPDB_*_CC_FLAGS =3D -std=3Dc99 -Wno-error=3Duninitialized -Wno= -error=3Dincompatible-pointer-types -Wno-error=3Dpointer-sign -Wno-error=3D= implicit-function-declaration -Wno-error=3Dignored-pragma-optimize=0D 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 @@ #=0D # Copyright (c) 2010 - 2020, Intel Corporation. All rights reserved.
= =0D # (C) Copyright 2020 Hewlett Packard Enterprise Development LP
=0D +# Copyright (c) 2022, Loongson Technology Corporation Limited. All rights= reserved.
=0D # SPDX-License-Identifier: BSD-2-Clause-Patent=0D #=0D ##=0D @@ -571,6 +572,7 @@ GCC:*_*_ARM_CC_FLAGS =3D $(OPENSSL_FLAGS) -Wno-error=3Dmaybe-uniniti= alized -Wno-error=3Dunused-but-set-variable=0D GCC:*_*_AARCH64_CC_FLAGS =3D $(OPENSSL_FLAGS) -Wno-error=3Dmaybe-uniniti= alized -Wno-format -Wno-error=3Dunused-but-set-variable=0D GCC:*_*_RISCV64_CC_FLAGS =3D $(OPENSSL_FLAGS) -Wno-error=3Dmaybe-uniniti= alized -Wno-format -Wno-error=3Dunused-but-set-variable=0D + GCC:*_*_LOONGARCH64_CC_FLAGS =3D $(OPENSSL_FLAGS) -Wno-error=3Dmaybe-uni= nitialized -Wno-format -Wno-error=3Dunused-but-set-variable=0D GCC:*_CLANG35_*_CC_FLAGS =3D -std=3Dc99 -Wno-error=3Duninitialized=0D GCC:*_CLANG38_*_CC_FLAGS =3D -std=3Dc99 -Wno-error=3Duninitialized=0D GCC:*_CLANGPDB_*_CC_FLAGS =3D -std=3Dc99 -Wno-error=3Duninitialized -Wno= -error=3Dincompatible-pointer-types -Wno-error=3Dpointer-sign -Wno-error=3D= implicit-function-declaration -Wno-error=3Dignored-pragma-optimize=0D 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 @@ #=0D # Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.
= =0D # (C) Copyright 2016-2020 Hewlett Packard Enterprise Development LP
=0D +# Copyright (c) 2022, Loongson Technology Corporation Limited. All rights= reserved.
=0D # SPDX-License-Identifier: BSD-2-Clause-Patent=0D #=0D ##=0D @@ -19,7 +20,7 @@ #=0D # The following information is for reference only and not required by the = build tools.=0D #=0D -# VALID_ARCHITECTURES =3D IA32 X64 ARM AARCH64 RISCV64=0D +# VALID_ARCHITECTURES =3D IA32 X64 ARM AARCH64 RISCV64 LOONGARC= H64=0D #=0D =0D [Sources]=0D diff --git a/CryptoPkg/Library/TlsLibNull/TlsLibNull.inf b/CryptoPkg/Librar= y/TlsLibNull/TlsLibNull.inf index b2920ddacf..12d7cc764a 100644 --- a/CryptoPkg/Library/TlsLibNull/TlsLibNull.inf +++ b/CryptoPkg/Library/TlsLibNull/TlsLibNull.inf @@ -3,6 +3,7 @@ #=0D # Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.
= =0D # (C) Copyright 2016-2020 Hewlett Packard Enterprise Development LP
=0D +# Copyright (c) 2022, Loongson Technology Corporation Limited. All rights= reserved.
=0D # SPDX-License-Identifier: BSD-2-Clause-Patent=0D #=0D ##=0D @@ -19,7 +20,7 @@ #=0D # The following information is for reference only and not required by the = build tools.=0D #=0D -# VALID_ARCHITECTURES =3D IA32 X64 ARM AARCH64 RISCV64=0D +# VALID_ARCHITECTURES =3D IA32 X64 ARM AARCH64 RISCV64 LOONGARC= H64=0D #=0D =0D [Sources]=0D --=20 2.27.0