68 return EFI_UNSUPPORTED;
75 return EFI_INVALID_PARAMETER;
81 OldTpl =
gBS->RaiseTPL (TPL_HIGH_LEVEL);
84 gBS->RestoreTPL (OldTpl);
90 if ((((UINT32)mEfiMtc) ^ ((UINT32)*Count)) & BIT31) {
91 gBS->SignalEvent (mEfiMtcEvent);
136 OUT UINT32 *HighCount
144 if (HighCount ==
NULL) {
145 return EFI_INVALID_PARAMETER;
152 OldTpl =
gBS->RaiseTPL (TPL_HIGH_LEVEL);
153 *HighCount = (UINT32)
RShiftU64 (mEfiMtc, 32) + 1;
155 gBS->RestoreTPL (OldTpl);
157 *HighCount = (UINT32)
RShiftU64 (mEfiMtc, 32) + 1;
220 Status =
gBS->CreateEvent (
232 BufferSize =
sizeof (UINT32);
240 if (EFI_ERROR (Status)) {
265 Status =
gBS->InstallMultipleProtocolInterfaces (
266 &mMonotonicCounterHandle,
267 &gEfiMonotonicCounterArchProtocolGuid,
UINT64 EFIAPI RShiftU64(IN UINT64 Operand, IN UINTN Count)
UINT64 EFIAPI LShiftU64(IN UINT64 Operand, IN UINTN Count)
EFI_RUNTIME_SERVICES * gRT
#define ASSERT_EFI_ERROR(StatusParameter)
#define ASSERT_PROTOCOL_ALREADY_INSTALLED(Handle, Guid)
VOID EFIAPI EfiMtcEventHandler(IN EFI_EVENT Event, IN VOID *Context)
EFI_STATUS EFIAPI MonotonicCounterDriverGetNextHighMonotonicCount(OUT UINT32 *HighCount)
EFI_STATUS EFIAPI MonotonicCounterDriverInitialize(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
EFI_STATUS EFIAPI MonotonicCounterDriverGetNextMonotonicCount(OUT UINT64 *Count)
#define EFI_VARIABLE_NON_VOLATILE
EFI_STATUS EFIAPI EfiGetVariable(IN CHAR16 *VariableName, IN EFI_GUID *VendorGuid, OUT UINT32 *Attributes OPTIONAL, IN OUT UINTN *DataSize, OUT VOID *Data)
BOOLEAN EFIAPI EfiAtRuntime(VOID)
EFI_STATUS EFIAPI EfiSetVariable(IN CHAR16 *VariableName, IN EFI_GUID *VendorGuid, IN UINT32 Attributes, IN UINTN DataSize, IN VOID *Data)