2 The DriverEntryPoint for TlsAuthConfigDxe driver.
4 Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
6 This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php.
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 #include "TlsAuthConfigImpl.h"
21 @param ImageHandle Handle that identifies the image to be unloaded.
23 @retval EFI_SUCCESS The image has been unloaded.
24 @retval EFI_INVALID_PARAMETER ImageHandle is not a valid image handle.
29 TlsAuthConfigDxeUnload (
30 IN EFI_HANDLE ImageHandle
34 TLS_AUTH_CONFIG_PRIVATE_DATA
*PrivateData
;
36 Status
= gBS
->HandleProtocol (
39 (VOID
**) &PrivateData
41 if (EFI_ERROR (Status
)) {
45 ASSERT (PrivateData
->Signature
== TLS_AUTH_CONFIG_PRIVATE_DATA_SIGNATURE
);
47 gBS
->UninstallMultipleProtocolInterfaces (
54 TlsAuthConfigFormUnload (PrivateData
);
60 This is the declaration of an EFI image entry point. This entry point is
61 the same for UEFI Applications, UEFI OS Loaders, and UEFI Drivers including
62 both device drivers and bus drivers.
64 @param ImageHandle The firmware allocated handle for the UEFI image.
65 @param SystemTable A pointer to the EFI System Table.
67 @retval EFI_SUCCESS The operation completed successfully.
68 @retval Others An unexpected error occurred.
72 TlsAuthConfigDxeDriverEntryPoint (
73 IN EFI_HANDLE ImageHandle
,
74 IN EFI_SYSTEM_TABLE
*SystemTable
79 TLS_AUTH_CONFIG_PRIVATE_DATA
*PrivateData
;
84 // If already started, return.
86 Status
= gBS
->OpenProtocol (
92 EFI_OPEN_PROTOCOL_TEST_PROTOCOL
94 if (!EFI_ERROR (Status
)) {
95 return EFI_ALREADY_STARTED
;
99 // Initialize the private data structure.
101 PrivateData
= AllocateZeroPool (sizeof (TLS_AUTH_CONFIG_PRIVATE_DATA
));
102 if (PrivateData
== NULL
) {
103 return EFI_OUT_OF_RESOURCES
;
107 // Initialize the HII configuration form.
109 Status
= TlsAuthConfigFormInit (PrivateData
);
110 if (EFI_ERROR (Status
)) {
115 // Install private GUID.
117 Status
= gBS
->InstallMultipleProtocolInterfaces (
123 if (EFI_ERROR (Status
)) {
130 TlsAuthConfigFormUnload (PrivateData
);
131 FreePool (PrivateData
);