mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
* Remove IA32/X64 specific INF files for performance optimized OpensslLib and combine into OpensslLibAccel.inf and OpensslLibFullAccel.inf. * Remove use of PcdOpensslEcEnabled and let the platform select the EC feature by using either OpensslLibFull.inf or OpensslLibFullAccel.inf. * With PcdOpensslEcEnabled removed, roll back style of opensslconf.h and remove opensslconf_generated.h. Move the choice to disable EC/SM2 into OpensslLib INF files using OPENSSL_FLAGS define. * Update OpensslLibContructor() API to be compatible with all FW phases by using types from Base.h and using RETURN_STATUS type and values instead of EFI_STATUS type and values. * Add /wd4718 to VS2015x86 for IA32 and X64 to disable warning for recursive call with no side effects. This is a false positive warning that is not produced with VS2017 or VS2019. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Cc: Christopher Zurcher <christopher.zurcher@microsoft.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
43 lines
803 B
C
43 lines
803 B
C
/** @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 <Base.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.
|
|
|
|
**/
|
|
RETURN_STATUS
|
|
EFIAPI
|
|
OpensslLibConstructor (
|
|
VOID
|
|
)
|
|
{
|
|
OPENSSL_cpuid_setup ();
|
|
|
|
return RETURN_SUCCESS;
|
|
}
|