36 DEBUG ((DEBUG_ERROR,
"No TPM12 instance required!\n"));
37 return EFI_UNSUPPORTED;
41 if (EFI_ERROR (Status)) {
42 DEBUG ((DEBUG_ERROR,
"TPM not detected!\n"));
46 Status =
gBS->LocateProtocol (&gEfiTcgProtocolGuid,
NULL, (VOID **)&TcgProtocol);
47 if (EFI_ERROR (Status)) {
51 Status =
gBS->OpenProtocol (
57 EFI_OPEN_PROTOCOL_TEST_PROTOCOL
59 if (!EFI_ERROR (Status)) {
60 return EFI_ALREADY_STARTED;
67 if (PrivateData ==
NULL) {
68 return EFI_OUT_OF_RESOURCES;
72 if (PrivateData->Configuration ==
NULL) {
73 Status = EFI_OUT_OF_RESOURCES;
77 PrivateData->TcgProtocol = TcgProtocol;
83 if (EFI_ERROR (Status)) {
90 Status =
gBS->InstallMultipleProtocolInterfaces (
97 if (EFI_ERROR (Status)) {
104 if (PrivateData !=
NULL) {
129 Status =
gBS->HandleProtocol (
132 (VOID **)&PrivateData
134 if (EFI_ERROR (Status)) {
138 ASSERT (PrivateData->Signature == TCG_CONFIG_PRIVATE_DATA_SIGNATURE);
140 gBS->UninstallMultipleProtocolInterfaces (
BOOLEAN EFIAPI CompareGuid(IN CONST GUID *Guid1, IN CONST GUID *Guid2)
VOID *EFIAPI AllocateCopyPool(IN UINTN AllocationSize, IN CONST VOID *Buffer)
#define DEBUG(Expression)
#define PcdGetPtr(TokenName)
VOID *EFIAPI AllocatePool(IN UINTN AllocationSize)
EFI_STATUS EFIAPI TcgConfigDriverUnload(IN EFI_HANDLE ImageHandle)
EFI_STATUS EFIAPI TcgConfigDriverEntryPoint(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
EFI_STATUS InstallTcgConfigForm(IN OUT TCG_CONFIG_PRIVATE_DATA *PrivateData)
VOID UninstallTcgConfigForm(IN OUT TCG_CONFIG_PRIVATE_DATA *PrivateData)
EFI_STATUS EFIAPI Tpm12RequestUseTpm(VOID)