]> git.proxmox.com Git - mirror_edk2.git/blame - CryptoPkg/Library/OpensslLib/OpensslLibConstructor.c
CryptoPkg/OpensslLib: Add native instruction support for X64
[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
9#include <Uefi.h>\r
10\r
11\r
12/**\r
13 An internal OpenSSL function which fetches a local copy of the hardware\r
14 capability flags.\r
15\r
16**/\r
17extern\r
18VOID\r
19OPENSSL_cpuid_setup (\r
20 VOID\r
21 );\r
22\r
23/**\r
24 Constructor routine for OpensslLib.\r
25\r
26 The constructor calls an internal OpenSSL function which fetches a local copy\r
27 of the hardware capability flags, used to enable native crypto instructions.\r
28\r
29 @param None\r
30\r
31 @retval EFI_SUCCESS The construction succeeded.\r
32\r
33**/\r
34EFI_STATUS\r
35EFIAPI\r
36OpensslLibConstructor (\r
37 VOID\r
38 )\r
39{\r
40 OPENSSL_cpuid_setup ();\r
41\r
42 return EFI_SUCCESS;\r
43}\r
44\r