| Attribute | Value |
|---|---|
| Index | 0001 |
| Module | TimestampDxe |
| Size (EFI) | 4,928 bytes (1340h) |
| Phase | DXE |
| Platform | All (common UEFI driver) |
| Framework | UEFI Standard |
| Source Lines | 1,459 (2 files) |
TimestampDxe implements the EFI_TIMESTAMP_PROTOCOL by calibrating the x86 Time-Stamp Counter (TSC) against a hardware reference counter at I/O port 0x508. It enables the TCO/REF counter via PCIe configuration space, performs a spin-wait calibration loop with interrupts disabled, computes TSC frequency in Hz, and publishes GetTimestamp and GetProperties protocol services. This driver is sourced from MdeModulePkg/Universal/TimestampDxe in the EDK II tree.
ModuleEntryPoint -- Entry point; calibrates TSC frequency and installs EFI_TIMESTAMP_PROTOCOLCalibrateTscFrequency -- Core calibration routine using TIMESTAMP_CALIBRATION_PORT (0x508)GetTimestamp -- Returns the current TSC value from RDTSCGetProperties -- Returns timestamp counter properties (frequency, end value)DebugPrint -- Debug output via DebugLib protocolDebugAssert -- Assertion handler via DebugLib protocolGetHobList -- Locates HOB list from system configuration tableLocateProtocol -- Wraps gBS->LocateProtocol()IsGuidEqual -- GUID comparison using two 64-bit unaligned reads