TianoCore EDK2 master
|
#include <Uefi.h>
#include <Library/DebugLib.h>
#include <Library/UefiDriverEntryPoint.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/TimerLib.h>
#include <Library/BaseMemoryLib.h>
#include <Protocol/Timestamp.h>
Go to the source code of this file.
Functions | |
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) |
Variables | |
UINT64 | mTimerLibStartValue = 0 |
UINT64 | mTimerLibEndValue = 0 |
EFI_TIMESTAMP_PROPERTIES | mTimestampProperties |
EFI_TIMESTAMP_PROTOCOL | mTimestamp |
Implementation of Timestamp Protocol using UEFI APIs.
Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file TimestampDxe.c.
EFI_STATUS EFIAPI TimestampDriverGetProperties | ( | OUT EFI_TIMESTAMP_PROPERTIES * | Properties | ) |
Obtains timestamp counter properties including frequency and value limits.
[out] | Properties | The properties of the timestamp counter. |
EFI_SUCCESS | The properties were successfully retrieved. |
EFI_DEVICE_ERROR | An error occurred trying to retrieve the properties of the timestamp counter subsystem. Properties is not pedated. |
EFI_INVALID_PARAMETER | Properties is NULL. |
Definition at line 87 of file TimestampDxe.c.
UINT64 EFIAPI TimestampDriverGetTimestamp | ( | VOID | ) |
Retrieves the current value of a 64-bit free running timestamp counter.
The counter shall count up in proportion to the amount of time that has passed. The counter value will always roll over to zero. The properties of the counter can be retrieved from GetProperties(). The caller should be prepared for the function to return the same value twice across successive calls. The counter value will not go backwards other than when wrapping, as defined by EndValue in GetProperties(). The frequency of the returned timestamp counter value must remain constant. Power management operations that affect clocking must not change the returned counter frequency. The quantization of counter value updates may vary as long as the value reflecting time passed remains consistent.
The | current value of the free running timestamp counter. |
Definition at line 51 of file TimestampDxe.c.
EFI_STATUS EFIAPI TimestampDriverInitialize | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
Entry point of the Timestamp Protocol driver.
ImageHandle | The image handle of this driver. |
SystemTable | The pointer of EFI_SYSTEM_TABLE. |
EFI_SUCCESS | Watchdog Timer Architectural Protocol successfully installed. |
Definition at line 122 of file TimestampDxe.c.
UINT64 mTimerLibEndValue = 0 |
Definition at line 25 of file TimestampDxe.c.
UINT64 mTimerLibStartValue = 0 |
Definition at line 20 of file TimestampDxe.c.
EFI_TIMESTAMP_PROTOCOL mTimestamp |
Definition at line 106 of file TimestampDxe.c.
EFI_TIMESTAMP_PROPERTIES mTimestampProperties |
Definition at line 30 of file TimestampDxe.c.