TianoCore EDK2
master
Loading...
Searching...
No Matches
Tcg2PlatformDxe.c
Go to the documentation of this file.
1
9
#include <
PiDxe.h
>
10
11
#include <
Library/DebugLib.h
>
12
#include <
Library/UefiBootServicesTableLib.h
>
13
#include <
Library/UefiLib.h
>
14
#include <
Library/TpmPlatformHierarchyLib.h
>
15
#include <
Protocol/DxeSmmReadyToLock.h
>
16
26
VOID
27
EFIAPI
28
SmmReadyToLockEventCallBack
(
29
IN
EFI_EVENT
Event,
30
IN
VOID *Context
31
)
32
{
33
EFI_STATUS
Status;
34
VOID *Interface;
35
36
//
37
// Try to locate it because EfiCreateProtocolNotifyEvent will trigger it once when registration.
38
// Just return if it is not found.
39
//
40
Status =
gBS
->LocateProtocol (
41
&gEfiDxeSmmReadyToLockProtocolGuid,
42
NULL
,
43
&Interface
44
);
45
if
(EFI_ERROR (Status)) {
46
return
;
47
}
48
49
ConfigureTpmPlatformHierarchy
();
50
51
gBS
->CloseEvent (Event);
52
}
53
64
EFI_STATUS
65
EFIAPI
66
Tcg2PlatformDxeEntryPoint
(
67
IN
EFI_HANDLE
ImageHandle,
68
IN
EFI_SYSTEM_TABLE
*SystemTable
69
)
70
{
71
VOID *Registration;
72
EFI_EVENT
Event;
73
74
Event =
EfiCreateProtocolNotifyEvent
(
75
&gEfiDxeSmmReadyToLockProtocolGuid,
76
TPL_CALLBACK,
77
SmmReadyToLockEventCallBack
,
78
NULL
,
79
&Registration
80
);
81
82
ASSERT (Event !=
NULL
);
83
84
return
EFI_SUCCESS
;
85
}
DxeSmmReadyToLock.h
NULL
#define NULL
Definition:
Base.h:319
IN
#define IN
Definition:
Base.h:279
DebugLib.h
ConfigureTpmPlatformHierarchy
VOID EFIAPI ConfigureTpmPlatformHierarchy()
Definition:
PeiDxeTpmPlatformHierarchyLib.c:243
PiDxe.h
Tcg2PlatformDxeEntryPoint
EFI_STATUS EFIAPI Tcg2PlatformDxeEntryPoint(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
Definition:
Tcg2PlatformDxe.c:66
SmmReadyToLockEventCallBack
VOID EFIAPI SmmReadyToLockEventCallBack(IN EFI_EVENT Event, IN VOID *Context)
Definition:
Tcg2PlatformDxe.c:28
TpmPlatformHierarchyLib.h
EFI_STATUS
RETURN_STATUS EFI_STATUS
Definition:
UefiBaseType.h:29
EFI_EVENT
VOID * EFI_EVENT
Definition:
UefiBaseType.h:37
EFI_HANDLE
VOID * EFI_HANDLE
Definition:
UefiBaseType.h:33
EFI_SUCCESS
#define EFI_SUCCESS
Definition:
UefiBaseType.h:112
UefiBootServicesTableLib.h
gBS
EFI_BOOT_SERVICES * gBS
Definition:
UefiBootServicesTableLib.c:17
UefiLib.h
EfiCreateProtocolNotifyEvent
EFI_EVENT EFIAPI EfiCreateProtocolNotifyEvent(IN EFI_GUID *ProtocolGuid, IN EFI_TPL NotifyTpl, IN EFI_EVENT_NOTIFY NotifyFunction, IN VOID *NotifyContext OPTIONAL, OUT VOID **Registration)
Definition:
UefiLib.c:134
EFI_SYSTEM_TABLE
Definition:
UefiSpec.h:2028
SecurityPkg
Tcg
Tcg2PlatformDxe
Tcg2PlatformDxe.c
Generated on Fri Nov 15 2024 18:01:24 for TianoCore EDK2 by
1.9.6