20UINT64 mTimerLibStartValue = 0;
25UINT64 mTimerLibEndValue = 0;
58 UINT64 TimestampValue;
65 if (mTimerLibStartValue > mTimerLibEndValue) {
71 return TimestampValue;
91 if (Properties ==
NULL) {
92 return EFI_INVALID_PARAMETER;
98 CopyMem ((VOID *)Properties, (VOID *)&mTimestampProperties,
sizeof (mTimestampProperties));
131 TimestampHandle =
NULL;
141 if (mTimerLibEndValue > mTimerLibStartValue) {
142 mTimestampProperties.
EndValue = mTimerLibEndValue - mTimerLibStartValue;
144 mTimestampProperties.
EndValue = mTimerLibStartValue - mTimerLibEndValue;
147 DEBUG ((DEBUG_INFO,
"TimerFrequency:0x%lx, TimerLibStartTime:0x%lx, TimerLibEndtime:0x%lx\n", mTimestampProperties.
Frequency, mTimerLibStartValue, mTimerLibEndValue));
152 Status =
gBS->InstallMultipleProtocolInterfaces (
154 &gEfiTimestampProtocolGuid,
UINT64 EFIAPI GetPerformanceCounterProperties(OUT UINT64 *StartValue OPTIONAL, OUT UINT64 *EndValue OPTIONAL)
UINT64 EFIAPI GetPerformanceCounter(VOID)
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
#define ASSERT_EFI_ERROR(StatusParameter)
#define DEBUG(Expression)
UINT64 EFIAPI TimestampDriverGetTimestamp(VOID)
EFI_STATUS EFIAPI TimestampDriverGetProperties(OUT EFI_TIMESTAMP_PROPERTIES *Properties)
EFI_STATUS EFIAPI TimestampDriverInitialize(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)