2 The DriverEntryPoint for TlsAuthConfigDxe driver.
4 Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
10 #include "TlsAuthConfigImpl.h"
15 @param ImageHandle Handle that identifies the image to be unloaded.
17 @retval EFI_SUCCESS The image has been unloaded.
18 @retval EFI_INVALID_PARAMETER ImageHandle is not a valid image handle.
23 TlsAuthConfigDxeUnload (
24 IN EFI_HANDLE ImageHandle
28 TLS_AUTH_CONFIG_PRIVATE_DATA
*PrivateData
;
30 Status
= gBS
->HandleProtocol (
35 if (EFI_ERROR (Status
)) {
39 ASSERT (PrivateData
->Signature
== TLS_AUTH_CONFIG_PRIVATE_DATA_SIGNATURE
);
41 gBS
->UninstallMultipleProtocolInterfaces (
48 TlsAuthConfigFormUnload (PrivateData
);
54 This is the declaration of an EFI image entry point. This entry point is
55 the same for UEFI Applications, UEFI OS Loaders, and UEFI Drivers including
56 both device drivers and bus drivers.
58 @param ImageHandle The firmware allocated handle for the UEFI image.
59 @param SystemTable A pointer to the EFI System Table.
61 @retval EFI_SUCCESS The operation completed successfully.
62 @retval Others An unexpected error occurred.
66 TlsAuthConfigDxeDriverEntryPoint (
67 IN EFI_HANDLE ImageHandle
,
68 IN EFI_SYSTEM_TABLE
*SystemTable
73 TLS_AUTH_CONFIG_PRIVATE_DATA
*PrivateData
;
78 // If already started, return.
80 Status
= gBS
->OpenProtocol (
86 EFI_OPEN_PROTOCOL_TEST_PROTOCOL
88 if (!EFI_ERROR (Status
)) {
89 return EFI_ALREADY_STARTED
;
93 // Initialize the private data structure.
95 PrivateData
= AllocateZeroPool (sizeof (TLS_AUTH_CONFIG_PRIVATE_DATA
));
96 if (PrivateData
== NULL
) {
97 return EFI_OUT_OF_RESOURCES
;
101 // Initialize the HII configuration form.
103 Status
= TlsAuthConfigFormInit (PrivateData
);
104 if (EFI_ERROR (Status
)) {
109 // Install private GUID.
111 Status
= gBS
->InstallMultipleProtocolInterfaces (
117 if (EFI_ERROR (Status
)) {
124 TlsAuthConfigFormUnload (PrivateData
);