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.web12.1725.1662612490486983371 for ; Wed, 07 Sep 2022 21:48:11 -0700 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 localhost.localdomain (Coremail) with SMTP id AQAAf8DxX+ACdBljxicUAA--.16755S9; Thu, 08 Sep 2022 12:48:09 +0800 (CST) From: "Chao Li" To: devel@edk2.groups.io Cc: Jiewen Yao , Jian J Wang , Xiaoyu Lu , Guomin Jiang Subject: [PATCH v1 07/34] CryptoPkg: Add LOONGARCH64 architecture for EDK2 CI. Date: Thu, 8 Sep 2022 12:47:34 +0800 Message-Id: <20220908044801.1190586-8-lichao@loongson.cn> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220908044801.1190586-1-lichao@loongson.cn> References: <20220908044801.1190586-1-lichao@loongson.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAf8DxX+ACdBljxicUAA--.16755S9 X-Coremail-Antispam: 1UD129KBjvAXoWfGFyDCr4fJr4UJrWxGF1rZwb_yoW8Jry5Go W7Gr4vgwsFk3s7GayagwnxJr1qga9xW3WUJr48GF18GF92yrnrCay5Aw1fJryUXr1UAas8 GrZ5Wa9ayFZxKr18n29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73VFW2AGmfu7bjvjm3 AaLaJ3UjIYCTnIWjp_UUUYW7k0a2IF6FyUM7kC6x804xWl14x267AKxVWrJVCq3wAFc2x0 x2IEx4CE42xK8VAvwI8IcIk0rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2048vs2IY020E87 I2jVAFwI0_JF0E3s1l82xGYIkIc2x26xkF7I0E14v26ryj6s0DM28lY4IEw2IIxxk0rwA2 F7IY1VAKz4vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Gr0_Xr1l84ACjcxK6xIIjx v20xvEc7CjxVAFwI0_Cr0_Gr1UM28EF7xvwVC2z280aVAFwI0_Gr1j6F4UJwA2z4x0Y4vE x4A2jsIEc7CjxVAFwI0_GcCE3s1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2 IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE14v26r1j6r4U McvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvY0x0EwIxGrwCY02Avz4vE-syl42xK82IYc2 Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s02 6x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r126r1DMIIYrxkI7VAKI48JMIIF0x vE2Ix0cI8IcVAFwI0_JFI_Gr1lIxAIcVC0I7IYx2IY6xkF7I0E14v26r4j6F4UMIIF0xvE 42xK8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6x kF7I0E14v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvjxUcbyCDUUUU X-CM-SenderInfo: xolfxt3r6o00pqjv00gofq/1tbiAQADCGMYidshUQAHsU 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 50e7721f25..c3a02aafb0 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 3d7b917103..f8790d2c72 100644 --- a/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf +++ b/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf @@ -8,6 +8,7 @@ #=0D # Copyright (c) 2009 - 2022, 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 @@ -74,6 +75,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 d28fb98b66..7da789d00e 100644 --- a/CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf +++ b/CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf @@ -13,6 +13,7 @@ #=0D # Copyright (c) 2009 - 2022, 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 @@ -79,6 +80,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 63d1d82d19..1d8b502813 100644 --- a/CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf +++ b/CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf @@ -8,6 +8,7 @@ #=0D # Copyright (c) 2009 - 2022, 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 e49060124f..5072c343da 100644 --- a/CryptoPkg/Library/Include/CrtLibSupport.h +++ b/CryptoPkg/Library/Include/CrtLibSupport.h @@ -4,6 +4,7 @@ =0D Copyright (c) 2010 - 2022, 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 @@ -46,7 +47,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 c899b811b1..f0ca72eeed 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 @@ -675,6 +676,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 0ec3724541..195016fd3d 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 @@ -624,6 +625,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 bc61cda745..20b0ea6832 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