TianoCore EDK2 master
Loading...
Searching...
No Matches
Tcg2StandaloneMm.c
Go to the documentation of this file.
1
18#include "Tcg2Smm.h"
20#include <Library/HobLib.h>
21
25VOID
27 VOID
28 )
29{
30 // Do nothing
31}
32
44BOOLEAN
47 IN UINT64 Length
48 )
49{
50 return TRUE;
51}
52
64BOOLEAN
67 IN UINT64 Length
68 )
69{
70 return MmIsBufferOutsideMmValid (Buffer, Length);
71}
72
79BOOLEAN
81 VOID
82 )
83{
84 VOID *GuidHob;
85
86 GuidHob = GetFirstGuidHob (&gEdkiiTpmInstanceHobGuid);
87 if (GuidHob != NULL) {
88 if (CompareGuid ((EFI_GUID *)GET_GUID_HOB_DATA (GuidHob), &gEfiTpmDeviceInstanceTpm20DtpmGuid)) {
89 return TRUE;
90 }
91
92 DEBUG ((DEBUG_ERROR, "No TPM2 DTPM instance required! - %g\n", (EFI_GUID *)GET_GUID_HOB_DATA (GuidHob)));
93 } else {
94 DEBUG ((DEBUG_ERROR, "No gEdkiiTpmInstanceHobGuid!\n"));
95 }
96
97 return FALSE;
98}
99
114EFIAPI
116 IN EFI_HANDLE ImageHandle,
117 IN EFI_MM_SYSTEM_TABLE *SystemTable
118 )
119{
120 return InitializeTcgCommon ();
121}
VOID *EFIAPI GetFirstGuidHob(IN CONST EFI_GUID *Guid)
Definition: HobLib.c:215
BOOLEAN EFIAPI CompareGuid(IN CONST GUID *Guid1, IN CONST GUID *Guid2)
Definition: MemLibGuid.c:73
#define NULL
Definition: Base.h:319
#define TRUE
Definition: Base.h:301
#define FALSE
Definition: Base.h:307
#define IN
Definition: Base.h:279
#define DEBUG(Expression)
Definition: DebugLib.h:434
BOOLEAN EFIAPI MmIsBufferOutsideMmValid(IN EFI_PHYSICAL_ADDRESS Buffer, IN UINT64 Length)
EFI_STATUS InitializeTcgCommon(VOID)
Definition: Tcg2Smm.c:214
BOOLEAN IsTpm20Dtpm(VOID)
BOOLEAN Tcg2IsNonPrimaryBufferValid(IN EFI_PHYSICAL_ADDRESS Buffer, IN UINT64 Length)
EFI_STATUS EFIAPI InitializeTcgStandaloneMm(IN EFI_HANDLE ImageHandle, IN EFI_MM_SYSTEM_TABLE *SystemTable)
VOID Tcg2NotifyMmReady(VOID)
BOOLEAN Tcg2IsPrimaryBufferValid(IN EFI_PHYSICAL_ADDRESS Buffer, IN UINT64 Length)
UINT64 EFI_PHYSICAL_ADDRESS
Definition: UefiBaseType.h:50
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33
Definition: Base.h:213