From a7761b860e8b8f77caa1c220e684a228988faa1c Mon Sep 17 00:00:00 2001 From: Guo Mang Date: Thu, 22 Dec 2016 16:04:07 +0800 Subject: CryptoPkg: Move to new location Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Guo Mang --- .../Library/IntrinsicLib/BaseIntrinsicLib.uni | 22 ------ CryptoPkg/Library/IntrinsicLib/CopyMem.c | 23 ------ .../Library/IntrinsicLib/Ia32/MathLShiftS64.S | 62 ---------------- .../Library/IntrinsicLib/Ia32/MathLShiftS64.c | 54 -------------- .../Library/IntrinsicLib/Ia32/MathRShiftU64.S | 66 ----------------- .../Library/IntrinsicLib/Ia32/MathRShiftU64.c | 57 --------------- CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf | 82 ---------------------- CryptoPkg/Library/IntrinsicLib/MemoryIntrinsics.c | 46 ------------ 8 files changed, 412 deletions(-) delete mode 100644 CryptoPkg/Library/IntrinsicLib/BaseIntrinsicLib.uni delete mode 100644 CryptoPkg/Library/IntrinsicLib/CopyMem.c delete mode 100644 CryptoPkg/Library/IntrinsicLib/Ia32/MathLShiftS64.S delete mode 100644 CryptoPkg/Library/IntrinsicLib/Ia32/MathLShiftS64.c delete mode 100644 CryptoPkg/Library/IntrinsicLib/Ia32/MathRShiftU64.S delete mode 100644 CryptoPkg/Library/IntrinsicLib/Ia32/MathRShiftU64.c delete mode 100644 CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf delete mode 100644 CryptoPkg/Library/IntrinsicLib/MemoryIntrinsics.c (limited to 'CryptoPkg/Library/IntrinsicLib') diff --git a/CryptoPkg/Library/IntrinsicLib/BaseIntrinsicLib.uni b/CryptoPkg/Library/IntrinsicLib/BaseIntrinsicLib.uni deleted file mode 100644 index c40b856a49..0000000000 --- a/CryptoPkg/Library/IntrinsicLib/BaseIntrinsicLib.uni +++ /dev/null @@ -1,22 +0,0 @@ -// /** @file -// Intrinsic Routines Wrapper Library Instance. -// -// This module is intrinsic routines wrapper library instance. -// -// Copyright (c) 2010 - 2014, Intel Corporation. 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. -// -// **/ - - -#string STR_MODULE_ABSTRACT #language en-US "Intrinsic Routines Wrapper Library Instance" - -#string STR_MODULE_DESCRIPTION #language en-US "This module is intrinsic routines wrapper library instance." - diff --git a/CryptoPkg/Library/IntrinsicLib/CopyMem.c b/CryptoPkg/Library/IntrinsicLib/CopyMem.c deleted file mode 100644 index 6cc52b22e1..0000000000 --- a/CryptoPkg/Library/IntrinsicLib/CopyMem.c +++ /dev/null @@ -1,23 +0,0 @@ -/** @file - Intrinsic Memory Routines Wrapper Implementation for OpenSSL-based - Cryptographic Library. - -Copyright (c) 2010, Intel Corporation. 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. - -**/ - -#include -#include - -/* Copies bytes between buffers */ -void * memcpy (void *dest, const void *src, unsigned int count) -{ - return CopyMem (dest, src, (UINTN)count); -} diff --git a/CryptoPkg/Library/IntrinsicLib/Ia32/MathLShiftS64.S b/CryptoPkg/Library/IntrinsicLib/Ia32/MathLShiftS64.S deleted file mode 100644 index 7031a59a71..0000000000 --- a/CryptoPkg/Library/IntrinsicLib/Ia32/MathLShiftS64.S +++ /dev/null @@ -1,62 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2014, Intel Corporation. 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. -# -# Module Name: -# -# MathLShiftS64.S -# -# Abstract: -# -# 64-bit Math Worker Function. -# Shifts a 64-bit signed value left by a certain number of bits. -# -#------------------------------------------------------------------------------ - - .686: - .code: - -ASM_GLOBAL ASM_PFX(__ashldi3) - -#------------------------------------------------------------------------------ -# -# void __cdecl __ashldi3 (void) -# -#------------------------------------------------------------------------------ -ASM_PFX(__ashldi3): - # - # Handle shifting of 64 or more bits (return 0) - # - cmpb $64, %cl - jae ReturnZero - - # - # Handle shifting of between 0 and 31 bits - # - cmpb $32, %cl - jae More32 - shld %cl, %eax, %edx - shl %cl, %eax - ret - - # - # Handle shifting of between 32 and 63 bits - # -More32: - movl %eax, %edx - xor %eax, %eax - and $31, %cl - shl %cl, %edx - ret - -ReturnZero: - xor %eax, %eax - xor %edx, %edx - ret diff --git a/CryptoPkg/Library/IntrinsicLib/Ia32/MathLShiftS64.c b/CryptoPkg/Library/IntrinsicLib/Ia32/MathLShiftS64.c deleted file mode 100644 index 0c0835d400..0000000000 --- a/CryptoPkg/Library/IntrinsicLib/Ia32/MathLShiftS64.c +++ /dev/null @@ -1,54 +0,0 @@ -/** @file - 64-bit Math Worker Function. - The 32-bit versions of C compiler generate calls to library routines - to handle 64-bit math. These functions use non-standard calling conventions. - -Copyright (c) 2014, Intel Corporation. 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. - -**/ - - -/* - * Shifts a 64-bit signed value left by a particular number of bits. - */ -__declspec(naked) void __cdecl _allshl (void) -{ - _asm { - ; - ; Handle shifting of 64 or more bits (return 0) - ; - cmp cl, 64 - jae short ReturnZero - - ; - ; Handle shifting of between 0 and 31 bits - ; - cmp cl, 32 - jae short More32 - shld edx, eax, cl - shl eax, cl - ret - - ; - ; Handle shifting of between 32 and 63 bits - ; -More32: - mov edx, eax - xor eax, eax - and cl, 31 - shl edx, cl - ret - -ReturnZero: - xor eax,eax - xor edx,edx - ret - } -} diff --git a/CryptoPkg/Library/IntrinsicLib/Ia32/MathRShiftU64.S b/CryptoPkg/Library/IntrinsicLib/Ia32/MathRShiftU64.S deleted file mode 100644 index 24142b088e..0000000000 --- a/CryptoPkg/Library/IntrinsicLib/Ia32/MathRShiftU64.S +++ /dev/null @@ -1,66 +0,0 @@ -#------------------------------------------------------------------------------ -# -# Copyright (c) 2014, Intel Corporation. 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. -# -# Module Name: -# -# MathRShiftU64.S -# -# Abstract: -# -# 64-bit Math Worker Function. -# Shifts a 64-bit unsigned value right by a certain number of bits. -# -#------------------------------------------------------------------------------ - - - .686: - .code: - -ASM_GLOBAL ASM_PFX(__ashrdi3) - -#------------------------------------------------------------------------------ -# -# void __cdecl __ashrdi3 (void) -# -#------------------------------------------------------------------------------ -ASM_PFX(__ashrdi3): - # - # Checking: Only handle 64bit shifting or more - # - cmpb $64, %cl - jae _Exit - - # - # Handle shifting between 0 and 31 bits - # - cmpb $32, %cl - jae More32 - shrd %cl, %edx, %eax - shr %cl, %edx - ret - - # - # Handle shifting of 32-63 bits - # -More32: - movl %edx, %eax - xor %edx, %edx - and $31, %cl - shr %cl, %eax - ret - - # - # Invalid number (less then 32bits), return 0 - # -_Exit: - xor %eax, %eax - xor %edx, %edx - ret diff --git a/CryptoPkg/Library/IntrinsicLib/Ia32/MathRShiftU64.c b/CryptoPkg/Library/IntrinsicLib/Ia32/MathRShiftU64.c deleted file mode 100644 index 86b10040dd..0000000000 --- a/CryptoPkg/Library/IntrinsicLib/Ia32/MathRShiftU64.c +++ /dev/null @@ -1,57 +0,0 @@ -/** @file - 64-bit Math Worker Function. - The 32-bit versions of C compiler generate calls to library routines - to handle 64-bit math. These functions use non-standard calling conventions. - -Copyright (c) 2014, Intel Corporation. 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. - -**/ - - -/* - * Shifts a 64-bit unsigned value right by a certain number of bits. - */ -__declspec(naked) void __cdecl _aullshr (void) -{ - _asm { - ; - ; Checking: Only handle 64bit shifting or more - ; - cmp cl, 64 - jae _Exit - - ; - ; Handle shifting between 0 and 31 bits - ; - cmp cl, 32 - jae More32 - shrd eax, edx, cl - shr edx, cl - ret - - ; - ; Handle shifting of 32-63 bits - ; -More32: - mov eax, edx - xor edx, edx - and cl, 31 - shr eax, cl - ret - - ; - ; Invalid number (less then 32bits), return 0 - ; -_Exit: - xor eax, eax - xor edx, edx - ret - } -} diff --git a/CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf b/CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf deleted file mode 100644 index de61dc40ea..0000000000 --- a/CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf +++ /dev/null @@ -1,82 +0,0 @@ -## @file -# Intrinsic Routines Wrapper Library Instance. -# -# Copyright (c) 2010 - 2014, Intel Corporation. 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 = BaseIntrinsicLib - MODULE_UNI_FILE = BaseIntrinsicLib.uni - FILE_GUID = 63850097-3E97-4c4f-A52D-C811A0106105 - MODULE_TYPE = BASE - VERSION_STRING = 1.0 - LIBRARY_CLASS = IntrinsicLib - -# -# The following information is for reference only and not required by the build tools. -# -# VALID_ARCHITECTURES = IA32 X64 IPF -# - -[Sources] - MemoryIntrinsics.c - -[Sources.IA32] - CopyMem.c - - Ia32/MathLShiftS64.c | MSFT - Ia32/MathRShiftU64.c | MSFT - - Ia32/MathLShiftS64.c | INTEL - Ia32/MathRShiftU64.c | INTEL - - Ia32/MathLShiftS64.S | GCC - Ia32/MathRShiftU64.S | GCC - -[Sources.X64] - CopyMem.c - -[Sources.IPF] - CopyMem.c | MSFT - CopyMem.c | INTEL -# -# In tools_def.txt, GCC rename symbol name memcpy to be CopyMem for IPF, -# i.e. "DEFINE GCC_IPF_SYMRENAME_FLAGS = --redefine-sym memcpy=CopyMem", -# so there will be no source file CopyMem.c for GCC compiler family. -# - -[Packages] - MdePkg/MdePkg.dec - -[LibraryClasses] - BaseMemoryLib - -[BuildOptions] - # - # Override MSFT build option to remove /Oi and /GL - # - MSFT:DEBUG_VS2003_IA32_CC_FLAGS == /nologo /c /WX /W4 /Gs32768 /Gy /D UNICODE /O1b2 /FIAutoGen.h /EHs-c- /GR- /GF /GX- /Zi /Gm - MSFT:RELEASE_VS2003_IA32_CC_FLAGS == /nologo /c /WX /W4 /Gs32768 /Gy /D UNICODE /O1b2 /FIAutoGen.h /EHs-c- /GR- /GF /GX- - MSFT:DEBUG_VS2003xASL_IA32_CC_FLAGS == /nologo /c /WX /W4 /Gs32768 /Gy /D UNICODE /O1b2 /FIAutoGen.h /EHs-c- /GR- /GF /GX- /Zi /Gm - MSFT:RELEASE_VS2003xASL_IA32_CC_FLAGS == /nologo /c /WX /W4 /Gs32768 /Gy /D UNICODE /O1b2 /FIAutoGen.h /EHs-c- /GR- /GF /GX- - MSFT:DEBUG_DDK3790_IA32_CC_FLAGS == /nologo /c /WX /Gy /Gs32768 /D UNICODE /O1b2 /FIAutoGen.h /EHs-c- /GR- /GF /Zi /Gm - MSFT:RELEASE_DDK3790_IA32_CC_FLAGS == /nologo /c /WX /Gy /Gs32768 /D UNICODE /O1b2 /FIAutoGen.h /EHs-c- /GR- /GF - MSFT:DEBUG_DDK3790xASL_IA32_CC_FLAGS == /nologo /c /WX /Gy /Gs32768 /D UNICODE /O1b2 /FIAutoGen.h /EHs-c- /GR- /GF /Zi /Gm - MSFT:RELEASE_DDK3790xASL_IA32_CC_FLAGS == /nologo /c /WX /Gy /Gs32768 /D UNICODE /O1b2 /FIAutoGen.h /EHs-c- /GR- /GF - MSFT:DEBUG_*_IA32_CC_FLAGS == /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2 /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm - MSFT:RELEASE_*_IA32_CC_FLAGS == /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2 /FIAutoGen.h /EHs-c- /GR- /GF - MSFT:DEBUG_*_X64_CC_FLAGS == /nologo /c /WX /GS- /X /W4 /Gs32768 /D UNICODE /O1b2s /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Zi /Gm - MSFT:RELEASE_*_X64_CC_FLAGS == /nologo /c /WX /GS- /X /W4 /Gs32768 /D UNICODE /O1b2s /Gy /FIAutoGen.h /EHs-c- /GR- /GF - MSFT:DEBUG_*_IPF_CC_FLAGS == /nologo /c /WX /GS- /X /W4 /EHs-c- /GR- /Gy /Os /FIAutoGen.h /QIPF_fr32 /Zi - MSFT:RELEASE_*_IPF_CC_FLAGS == /nologo /c /WX /GS- /X /W4 /EHs-c- /GR- /Gy /Os /FIAutoGen.h /QIPF_fr32 - INTEL:*_*_*_CC_FLAGS = /Oi- - GCC:*_*_*_CC_FLAGS = -fno-builtin \ No newline at end of file diff --git a/CryptoPkg/Library/IntrinsicLib/MemoryIntrinsics.c b/CryptoPkg/Library/IntrinsicLib/MemoryIntrinsics.c deleted file mode 100644 index 9d6867ebce..0000000000 --- a/CryptoPkg/Library/IntrinsicLib/MemoryIntrinsics.c +++ /dev/null @@ -1,46 +0,0 @@ -/** @file - Intrinsic Memory Routines Wrapper Implementation for OpenSSL-based - Cryptographic Library. - -Copyright (c) 2010 - 2014, Intel Corporation. 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. - -**/ - -#include -#include - -/* OpenSSL will use floating point support, and C compiler produces the _fltused - symbol by default. Simply define this symbol here to satisfy the linker. */ -int _fltused = 1; - -/* Sets buffers to a specified character */ -void * memset (void *dest, char ch, unsigned int count) -{ - // - // NOTE: Here we use one base implementation for memset, instead of the direct - // optimized SetMem() wrapper. Because the IntrinsicLib has to be built - // without whole program optimization option, and there will be some - // potential register usage errors when calling other optimized codes. - // - - // - // Declare the local variables that actually move the data elements as - // volatile to prevent the optimizer from replacing this function with - // the intrinsic memset() - // - volatile UINT8 *Pointer; - - Pointer = (UINT8 *)dest; - while (count-- != 0) { - *(Pointer++) = ch; - } - - return dest; -} -- cgit v1.2.3