CryptoPkg/OpensslLib: Add native instruction support for X64
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2507 Adding OpensslLibX64.inf and modifying process_files.pl to process this file and generate the necessary assembly files. Adding OpensslLibX64Gcc.inf to allow building with GCC toolchain. ApiHooks.c contains a stub function for a Windows API call. uefi-asm.conf contains the limited assembly configurations for OpenSSL. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Xiaoyu Lu <xiaoyux.lu@intel.com> Cc: Mike Kinney <michael.d.kinney@intel.com> Cc: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Christopher Zurcher <christopher.zurcher@microsoft.com> Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
This commit is contained in:
committed by
mergify[bot]
parent
4d28a1c2fd
commit
878a92a887
44
CryptoPkg/Library/OpensslLib/OpensslLibConstructor.c
Normal file
44
CryptoPkg/Library/OpensslLib/OpensslLibConstructor.c
Normal file
@@ -0,0 +1,44 @@
|
||||
/** @file
|
||||
Constructor to initialize CPUID data for OpenSSL assembly operations.
|
||||
|
||||
Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
||||
**/
|
||||
|
||||
#include <Uefi.h>
|
||||
|
||||
|
||||
/**
|
||||
An internal OpenSSL function which fetches a local copy of the hardware
|
||||
capability flags.
|
||||
|
||||
**/
|
||||
extern
|
||||
VOID
|
||||
OPENSSL_cpuid_setup (
|
||||
VOID
|
||||
);
|
||||
|
||||
/**
|
||||
Constructor routine for OpensslLib.
|
||||
|
||||
The constructor calls an internal OpenSSL function which fetches a local copy
|
||||
of the hardware capability flags, used to enable native crypto instructions.
|
||||
|
||||
@param None
|
||||
|
||||
@retval EFI_SUCCESS The construction succeeded.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
OpensslLibConstructor (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
OPENSSL_cpuid_setup ();
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
Reference in New Issue
Block a user