From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) by mx.groups.io with SMTP id smtpd.web10.15532.1582987833849977890 for ; Sat, 29 Feb 2020 06:50:33 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: hpe.com, ip: 148.163.147.86, mailfrom: prvs=0328563951=abner.chang@hpe.com) Received: from pps.filterd (m0134422.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 01TEmBgT007006; Sat, 29 Feb 2020 14:50:33 GMT Received: from g4t3425.houston.hpe.com (g4t3425.houston.hpe.com [15.241.140.78]) by mx0b-002e3701.pphosted.com with ESMTP id 2yfj9gstcj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 29 Feb 2020 14:50:33 +0000 Received: from g9t2301.houston.hpecorp.net (g9t2301.houston.hpecorp.net [16.220.97.129]) by g4t3425.houston.hpe.com (Postfix) with ESMTP id B8EE99A; Sat, 29 Feb 2020 14:50:32 +0000 (UTC) Received: from UB16Abner.asiapacific.hpqcorp.net (ub16abner.asiapacific.hpqcorp.net [15.119.209.229]) by g9t2301.houston.hpecorp.net (Postfix) with ESMTP id AB5384B; Sat, 29 Feb 2020 14:50:30 +0000 (UTC) From: "Abner Chang" To: devel@edk2.groups.io Cc: abner.chang@hpe.com, Daniel Helmut Schaefer , Jian J Wang , Xiaoyu Lu , Leif Lindholm , Gilbert Chen Subject: [edk2-staging/RISC-V-V2: RISC-V EDK2 CI Code Change PATCH v1 5/9] CryptoPkg: Add RISC-V architecture for EDK2 CI. Date: Sat, 29 Feb 2020 22:13:54 +0800 Message-Id: <20200229141358.9528-6-abner.chang@hpe.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200229141358.9528-1-abner.chang@hpe.com> References: <20200229141358.9528-1-abner.chang@hpe.com> X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.572 definitions=2020-02-29_03:2020-02-28,2020-02-29 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 mlxscore=0 suspectscore=0 mlxlogscore=927 impostorscore=0 malwarescore=0 priorityscore=1501 adultscore=0 phishscore=0 spamscore=0 clxscore=1011 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2002290115 Content-Transfer-Encoding: quoted-printable BZ:2562 https://bugzilla.tianocore.org/show_bug.cgi?id=3D2562 EDK2 CI report: https://github.com/tianocore/edk2-staging/pull/196 https://github.com/tianocore/edk2-staging/pull/197 Add RISC-V architecture for EDK2 CI testing. Signed-off-by: Abner Chang Co-authored-by: Daniel Helmut Schaefer Cc: Jian J Wang Cc: Xiaoyu Lu Cc: Leif Lindholm Cc: Gilbert Chen --- 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/OpensslLib/OpensslLib.inf | 2 ++ CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf | 2 ++ CryptoPkg/Library/TlsLib/TlsLib.inf | 4 ++-- CryptoPkg/Library/TlsLibNull/TlsLibNull.inf | 4 ++-- CryptoPkg/Library/Include/CrtLibSupport.h | 3 ++- 11 files changed, 27 insertions(+), 10 deletions(-) diff --git a/CryptoPkg/CryptoPkg.dsc b/CryptoPkg/CryptoPkg.dsc index 4cb37b1349..f79ff331cf 100644 --- a/CryptoPkg/CryptoPkg.dsc +++ b/CryptoPkg/CryptoPkg.dsc @@ -3,6 +3,7 @@ # PEIM, DXE Driver, and SMM Driver with all crypto services enabled.=0D #=0D # Copyright (c) 2009 - 2020, Intel Corporation. All rights reserved.
= =0D +# Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All righ= ts reserved.
=0D # SPDX-License-Identifier: BSD-2-Clause-Patent=0D #=0D ##=0D @@ -18,7 +19,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=0D + SUPPORTED_ARCHITECTURES =3D IA32|X64|ARM|AARCH64|RISCV64=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 1bbe4f435a..a63ad66b4f 100644 --- a/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf +++ b/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf @@ -7,6 +7,7 @@ # buffer overflow or integer overflow.=0D #=0D # Copyright (c) 2009 - 2019, Intel Corporation. All rights reserved.
= =0D +# Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All righ= ts reserved.
=0D # SPDX-License-Identifier: BSD-2-Clause-Patent=0D #=0D ##=0D @@ -23,7 +24,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=0D +# VALID_ARCHITECTURES =3D IA32 X64 ARM AARCH64 RISCV64=0D #=0D =0D [Sources]=0D @@ -72,6 +73,9 @@ [Sources.AARCH64]=0D Rand/CryptRand.c=0D =0D +[Sources.RISCV64]=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 bff308a4f5..e5b8ececc1 100644 --- a/CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf +++ b/CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf @@ -12,6 +12,7 @@ # authenticode signature verification functions are not supported in this= instance.=0D #=0D # Copyright (c) 2009 - 2019, Intel Corporation. All rights reserved.
= =0D +# Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All righ= ts reserved.
=0D # SPDX-License-Identifier: BSD-2-Clause-Patent=0D #=0D ##=0D @@ -77,6 +78,9 @@ [Sources.AARCH64]=0D Rand/CryptRand.c=0D =0D +[Sources.RISCV64]=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 8f53b0dfd0..9b4991cbb0 100644 --- a/CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf +++ b/CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf @@ -7,6 +7,7 @@ # buffer overflow or integer overflow.=0D #=0D # Copyright (c) 2009 - 2020, Intel Corporation. All rights reserved.
= =0D +# Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All righ= ts reserved.
=0D # SPDX-License-Identifier: BSD-2-Clause-Patent=0D #=0D ##=0D @@ -23,7 +24,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=0D +# VALID_ARCHITECTURES =3D IA32 X64 ARM AARCH64 RISCV64=0D #=0D =0D [Sources]=0D diff --git a/CryptoPkg/Library/BaseCryptLibOnProtocolPpi/DxeCryptLib.inf b/= CryptoPkg/Library/BaseCryptLibOnProtocolPpi/DxeCryptLib.inf index 9282b0fd6b..baa4433cbe 100644 --- a/CryptoPkg/Library/BaseCryptLibOnProtocolPpi/DxeCryptLib.inf +++ b/CryptoPkg/Library/BaseCryptLibOnProtocolPpi/DxeCryptLib.inf @@ -3,6 +3,7 @@ # Protocol.=0D #=0D # Copyright (C) Microsoft Corporation. All rights reserved.=0D +# Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All right= s 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=0D +# VALID_ARCHITECTURES =3D IA32 X64 ARM AARCH64 RISCV64=0D #=0D =0D [Packages]=0D diff --git a/CryptoPkg/Library/BaseCryptLibOnProtocolPpi/PeiCryptLib.inf b/= CryptoPkg/Library/BaseCryptLibOnProtocolPpi/PeiCryptLib.inf index 5c56e3320e..038ca71890 100644 --- a/CryptoPkg/Library/BaseCryptLibOnProtocolPpi/PeiCryptLib.inf +++ b/CryptoPkg/Library/BaseCryptLibOnProtocolPpi/PeiCryptLib.inf @@ -3,6 +3,7 @@ # PPI.=0D #=0D # Copyright (C) Microsoft Corporation. All rights reserved.=0D +# Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All right= s reserved.
=0D # SPDX-License-Identifier: BSD-2-Clause-Patent=0D #=0D ##=0D @@ -20,7 +21,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=0D +# VALID_ARCHITECTURES =3D IA32 X64 ARM AARCH64 RISCV64=0D #=0D =0D [Packages]=0D diff --git a/CryptoPkg/Library/OpensslLib/OpensslLib.inf b/CryptoPkg/Librar= y/OpensslLib/OpensslLib.inf index 3fa52f5543..01ee665183 100644 --- a/CryptoPkg/Library/OpensslLib/OpensslLib.inf +++ b/CryptoPkg/Library/OpensslLib/OpensslLib.inf @@ -2,6 +2,7 @@ # This module provides OpenSSL Library implementation.=0D #=0D # Copyright (c) 2010 - 2019, Intel Corporation. All rights reserved.
= =0D +# (C) Copyright 2020 Hewlett Packard Enterprise Development LP
=0D # SPDX-License-Identifier: BSD-2-Clause-Patent=0D #=0D ##=0D @@ -661,6 +662,7 @@ GCC:*_*_X64_CC_FLAGS =3D -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -Wno-err= or=3Dmaybe-uninitialized -Wno-error=3Dformat -Wno-format -Wno-error=3Dunuse= d-but-set-variable -DNO_MSABI_VA_FUNCS=0D 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=3Dformat -Wno-e= rror=3Dmaybe-uninitialized -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 f1f9fbb938..5c2206f6fb 100644 --- a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf +++ b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf @@ -2,6 +2,7 @@ # This module provides OpenSSL Library implementation.=0D #=0D # Copyright (c) 2010 - 2019, Intel Corporation. All rights reserved.
= =0D +# (C) Copyright 2020 Hewlett Packard Enterprise Development LP
=0D # SPDX-License-Identifier: BSD-2-Clause-Patent=0D #=0D ##=0D @@ -610,6 +611,7 @@ GCC:*_*_X64_CC_FLAGS =3D -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -Wno-err= or=3Dmaybe-uninitialized -Wno-error=3Dformat -Wno-format -Wno-error=3Dunuse= d-but-set-variable -DNO_MSABI_VA_FUNCS=0D 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:*_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 2f3ce695c3..27209f4d7f 100644 --- a/CryptoPkg/Library/TlsLib/TlsLib.inf +++ b/CryptoPkg/Library/TlsLib/TlsLib.inf @@ -2,7 +2,7 @@ # SSL/TLS Wrapper Library Instance based on OpenSSL.=0D #=0D # Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.
= =0D -# (C) Copyright 2016 Hewlett Packard Enterprise Development LP
=0D +# (C) Copyright 2016-2020 Hewlett Packard Enterprise Development LP
=0D # SPDX-License-Identifier: BSD-2-Clause-Patent=0D #=0D ##=0D @@ -19,7 +19,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=0D +# VALID_ARCHITECTURES =3D IA32 X64 ARM AARCH64 RISCV64=0D #=0D =0D [Sources]=0D diff --git a/CryptoPkg/Library/TlsLibNull/TlsLibNull.inf b/CryptoPkg/Librar= y/TlsLibNull/TlsLibNull.inf index 33f0e7493f..b2920ddacf 100644 --- a/CryptoPkg/Library/TlsLibNull/TlsLibNull.inf +++ b/CryptoPkg/Library/TlsLibNull/TlsLibNull.inf @@ -2,7 +2,7 @@ # SSL/TLS Wrapper Null Library Instance.=0D #=0D # Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.
= =0D -# (C) Copyright 2016 Hewlett Packard Enterprise Development LP
=0D +# (C) Copyright 2016-2020 Hewlett Packard Enterprise Development LP
=0D # SPDX-License-Identifier: BSD-2-Clause-Patent=0D #=0D ##=0D @@ -19,7 +19,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=0D +# VALID_ARCHITECTURES =3D IA32 X64 ARM AARCH64 RISCV64=0D #=0D =0D [Sources]=0D diff --git a/CryptoPkg/Library/Include/CrtLibSupport.h b/CryptoPkg/Library/= Include/CrtLibSupport.h index 5a20ba636f..7a82f1d406 100644 --- a/CryptoPkg/Library/Include/CrtLibSupport.h +++ b/CryptoPkg/Library/Include/CrtLibSupport.h @@ -3,6 +3,7 @@ cryptographic library.=0D =0D Copyright (c) 2010 - 2019, Intel Corporation. All rights reserved.
=0D +Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights = reserved.
=0D SPDX-License-Identifier: BSD-2-Clause-Patent=0D =0D **/=0D @@ -43,7 +44,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent =0D #define CONFIG_HEADER_BN_H=0D =0D -#if defined(MDE_CPU_X64) || defined(MDE_CPU_AARCH64) || defined(MDE_CPU_IA= 64)=0D +#if defined(MDE_CPU_X64) || defined(MDE_CPU_AARCH64) || defined(MDE_CPU_IA= 64) || defined(MDE_CPU_RISCV64)=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 --=20 2.25.0