18UINT64 gCurrentMonotonicCount = 0;
22GetNextMonotonicCount (
27 return EFI_INVALID_PARAMETER;
30 *Count = gCurrentMonotonicCount++;
36GetNextHighMonotonicCount (
40 if (HighCount ==
NULL) {
41 return EFI_INVALID_PARAMETER;
44 gCurrentMonotonicCount += 0x0000000100000000ULL;
46 *HighCount = (UINT32)
RShiftU64 (gCurrentMonotonicCount, 32) & 0xFFFFFFFF;
53MonotonicCounterDriverInitialize (
65 gBS->GetNextMonotonicCount = GetNextMonotonicCount;
66 gRT->GetNextHighMonotonicCount = GetNextHighMonotonicCount;
69 Status =
gBS->InstallMultipleProtocolInterfaces (
71 &gEfiMonotonicCounterArchProtocolGuid,
UINT64 EFIAPI RShiftU64(IN UINT64 Operand, IN UINTN Count)
EFI_RUNTIME_SERVICES * gRT
#define ASSERT_PROTOCOL_ALREADY_INSTALLED(Handle, Guid)