TianoCore EDK2 master
Loading...
Searching...
No Matches
TimestampDxe.c File Reference

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
 

Detailed Description

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.

Function Documentation

◆ TimestampDriverGetProperties()

EFI_STATUS EFIAPI TimestampDriverGetProperties ( OUT EFI_TIMESTAMP_PROPERTIES Properties)

Obtains timestamp counter properties including frequency and value limits.

Parameters
[out]PropertiesThe properties of the timestamp counter.
Return values
EFI_SUCCESSThe properties were successfully retrieved.
EFI_DEVICE_ERRORAn error occurred trying to retrieve the properties of the timestamp counter subsystem. Properties is not pedated.
EFI_INVALID_PARAMETERProperties is NULL.

Definition at line 87 of file TimestampDxe.c.

◆ TimestampDriverGetTimestamp()

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.

Return values
Thecurrent value of the free running timestamp counter.

Definition at line 51 of file TimestampDxe.c.

◆ TimestampDriverInitialize()

EFI_STATUS EFIAPI TimestampDriverInitialize ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Entry point of the Timestamp Protocol driver.

Parameters
ImageHandleThe image handle of this driver.
SystemTableThe pointer of EFI_SYSTEM_TABLE.
Return values
EFI_SUCCESSWatchdog Timer Architectural Protocol successfully installed.

Definition at line 122 of file TimestampDxe.c.

Variable Documentation

◆ mTimerLibEndValue

UINT64 mTimerLibEndValue = 0

Definition at line 25 of file TimestampDxe.c.

◆ mTimerLibStartValue

UINT64 mTimerLibStartValue = 0

Definition at line 20 of file TimestampDxe.c.

◆ mTimestamp

Initial value:
= {
}
UINT64 EFIAPI TimestampDriverGetTimestamp(VOID)
Definition: TimestampDxe.c:51
EFI_STATUS EFIAPI TimestampDriverGetProperties(OUT EFI_TIMESTAMP_PROPERTIES *Properties)
Definition: TimestampDxe.c:87

Definition at line 106 of file TimestampDxe.c.

◆ mTimestampProperties

EFI_TIMESTAMP_PROPERTIES mTimestampProperties
Initial value:
= {
0,
0
}

Definition at line 30 of file TimestampDxe.c.