]> git.proxmox.com Git - mirror_edk2.git/blame - CryptoPkg/Library/OpensslLib/OpensslLibConstructor.c
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / CryptoPkg / Library / OpensslLib / OpensslLibConstructor.c
CommitLineData
878a92a8
CZ
1/** @file\r
2 Constructor to initialize CPUID data for OpenSSL assembly operations.\r
3\r
4Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>\r
5SPDX-License-Identifier: BSD-2-Clause-Patent\r
6\r
7**/\r
8\r
ea6d859b 9#include <Base.h>\r
878a92a8 10\r
878a92a8
CZ
11/**\r
12 An internal OpenSSL function which fetches a local copy of the hardware\r
13 capability flags.\r
14\r
15**/\r
16extern\r
17VOID\r
18OPENSSL_cpuid_setup (\r
19 VOID\r
20 );\r
21\r
22/**\r
23 Constructor routine for OpensslLib.\r
24\r
25 The constructor calls an internal OpenSSL function which fetches a local copy\r
26 of the hardware capability flags, used to enable native crypto instructions.\r
27\r
28 @param None\r
29\r
30 @retval EFI_SUCCESS The construction succeeded.\r
31\r
32**/\r
ea6d859b 33RETURN_STATUS\r
878a92a8
CZ
34EFIAPI\r
35OpensslLibConstructor (\r
36 VOID\r
37 )\r
38{\r
39 OPENSSL_cpuid_setup ();\r
40\r
ea6d859b 41 return RETURN_SUCCESS;\r
878a92a8 42}\r