From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=217.140.101.70; helo=foss.arm.com; envelope-from=jagadeesh.ujja@arm.com; receiver=edk2-devel@lists.01.org Received: from foss.arm.com (foss.arm.com [217.140.101.70]) by ml01.01.org (Postfix) with ESMTP id 797FD21BADAB9 for ; Wed, 31 Oct 2018 04:10:17 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2878980D for ; Wed, 31 Oct 2018 04:10:17 -0700 (PDT) Received: from usa.arm.com (a75556-lin.blr.arm.com [10.162.2.34]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 5D5603F71D for ; Wed, 31 Oct 2018 04:10:16 -0700 (PDT) From: Jagadeesh Ujja To: edk2-devel@lists.01.org Date: Wed, 31 Oct 2018 16:39:47 +0530 Message-Id: <20181031110947.6305-10-jagadeesh.ujja@arm.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181031110947.6305-1-jagadeesh.ujja@arm.com> References: <20181031110947.6305-1-jagadeesh.ujja@arm.com> MIME-Version: 1.0 Subject: [RFC PATCH 9/9] CryptoPkg/BaseCryptLib: allow MM_STANDALONE drivers to use this library X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Oct 2018 11:10:17 -0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit “BaseCryptLib” library can be used by MM_STANDALONE drivers as well. So add MM_STANDALONE as the module type this library supports A new inf file is added for this because the UefiRuntimeServicesTableLib library class cannot be used along with MM_STANDALONE modules. Change-Id: Ib7562bf4592493fb443cca9ac783c80d786f498e Signed-off-by: Jagadeesh Ujja Signed-off-by: Thomas Abraham --- .../BaseCryptLib/BaseCryptLibMmStandalone.inf | 106 +++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 CryptoPkg/Library/BaseCryptLib/BaseCryptLibMmStandalone.inf diff --git a/CryptoPkg/Library/BaseCryptLib/BaseCryptLibMmStandalone.inf b/CryptoPkg/Library/BaseCryptLib/BaseCryptLibMmStandalone.inf new file mode 100644 index 0000000..a8aa49c --- /dev/null +++ b/CryptoPkg/Library/BaseCryptLib/BaseCryptLibMmStandalone.inf @@ -0,0 +1,106 @@ +## @file +# Cryptographic Library Instance for DXE_DRIVER. +# +# Caution: This module requires additional review when modified. +# This library will have external input - signature. +# This external input must be validated carefully to avoid security issues such as +# buffer overflow or integer overflow. +# +# Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.
+# Copyright (c) 2018, ARM Limited. All rights reserved.
+# This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +## + +[Defines] + INF_VERSION = 0x00010005 + BASE_NAME = BaseCryptLib + MODULE_UNI_FILE = BaseCryptLib.uni + FILE_GUID = be3bb803-91b6-4da0-bd91-a8b21c18ca5d + MODULE_TYPE = DXE_DRIVER + VERSION_STRING = 1.0 + LIBRARY_CLASS = BaseCryptLib|DXE_DRIVER DXE_CORE UEFI_APPLICATION UEFI_DRIVER MM_STANDALONE + +# +# The following information is for reference only and not required by the build tools. +# +# VALID_ARCHITECTURES = IA32 X64 IPF ARM AARCH64 +# + +[Sources] + InternalCryptLib.h + Hash/CryptMd4.c + Hash/CryptMd5.c + Hash/CryptSha1.c + Hash/CryptSha256.c + Hash/CryptSha512.c + Hmac/CryptHmacMd5.c + Hmac/CryptHmacSha1.c + Hmac/CryptHmacSha256.c + Cipher/CryptAes.c + Cipher/CryptTdes.c + Cipher/CryptArc4.c + Pk/CryptRsaBasic.c + Pk/CryptRsaExt.c + Pk/CryptPkcs5Pbkdf2.c + Pk/CryptPkcs7Sign.c + Pk/CryptPkcs7Verify.c + Pk/CryptDh.c + Pk/CryptX509.c + Pk/CryptAuthenticode.c + Pk/CryptTs.c + Pem/CryptPem.c + + SysCall/CrtWrapper.c + SysCall/TimerWrapper.c + SysCall/BaseMemAllocation.c + +[Sources.Ia32] + Rand/CryptRandTsc.c + +[Sources.X64] + Rand/CryptRandTsc.c + +[Sources.IPF] + Rand/CryptRandItc.c + +[Sources.ARM] + Rand/CryptRand.c + +[Sources.AARCH64] + Rand/CryptRand.c + +[Packages] + MdePkg/MdePkg.dec + CryptoPkg/CryptoPkg.dec + +[LibraryClasses] + BaseLib + BaseMemoryLib + MemoryAllocationLib + DebugLib + OpensslLib + IntrinsicLib + PrintLib + +# +# Remove these [BuildOptions] after this library is cleaned up +# +[BuildOptions] + # + # suppress the following warnings so we do not break the build with warnings-as-errors: + # C4090: 'function' : different 'const' qualifiers + # + MSFT:*_*_*_CC_FLAGS = /wd4090 + + GCC:*_GCC44_IA32_CC_FLAGS = "-D__cdecl=__attribute__((cdecl))" "-D__declspec(t)=__attribute__((t))" + + # -JCryptoPkg/Include : To disable the use of the system includes provided by RVCT + # --diag_remark=1 : Reduce severity of "#1-D: last line of file ends without a newline" + RVCT:*_*_ARM_CC_FLAGS = -JCryptoPkg/Include --diag_remark=1 -- 1.9.1