16GUID mCpuCrystalFrequencyHobGuid = {
17 0xe1ec5ad0, 0x8569, 0x46bd, { 0x8d, 0xcd, 0x3b, 0x9f, 0x6f, 0x45, 0x82, 0x7a }
47 UINT64 CoreXtalFrequency;
62 if ((RegEax == 0) || (RegEbx == 0)) {
73 CoreXtalFrequency =
PcdGet64 (PcdCpuCoreCrystalClockFrequency);
75 CoreXtalFrequency = (UINT64)RegEcx;
81 TscFrequency =
DivU64x32 (
MultU64x32 (CoreXtalFrequency, RegEbx) + (UINT64)(RegEax >> 1), RegEax);
223 OUT UINT64 *StartValue OPTIONAL,
224 OUT UINT64 *EndValue OPTIONAL
227 if (StartValue !=
NULL) {
231 if (EndValue !=
NULL) {
232 *EndValue = 0xffffffffffffffffULL;
UINT64 EFIAPI AsmReadTsc(VOID)
UINT64 EFIAPI DivU64x32(IN UINT64 Dividend, IN UINT32 Divisor)
UINT64 EFIAPI MultU64x64(IN UINT64 Multiplicand, IN UINT64 Multiplier)
VOID EFIAPI CpuPause(VOID)
UINT64 EFIAPI RShiftU64(IN UINT64 Operand, IN UINTN Count)
UINT64 EFIAPI MultU64x32(IN UINT64 Multiplicand, IN UINT32 Multiplier)
UINT64 EFIAPI DivU64x64Remainder(IN UINT64 Dividend, IN UINT64 Divisor, OUT UINT64 *Remainder OPTIONAL)
INTN EFIAPI HighBitSet64(IN UINT64 Operand)
UINT64 EFIAPI GetTimeInNanoSecond(IN UINT64 Ticks)
UINT64 EFIAPI GetPerformanceCounterProperties(OUT UINT64 *StartValue, OPTIONAL OUT UINT64 *EndValue OPTIONAL)
UINT64 EFIAPI GetPerformanceCounter(VOID)
UINTN EFIAPI MicroSecondDelay(IN UINTN MicroSeconds)
UINTN EFIAPI NanoSecondDelay(IN UINTN NanoSeconds)
UINT64 InternalGetPerformanceCounterFrequency(VOID)
VOID InternalCpuDelay(IN UINT64 Delay)
UINT64 CpuidCoreClockCalculateTscFrequency(VOID)
#define CPUID_TIME_STAMP_COUNTER
UINT32 EFIAPI AsmCpuid(IN UINT32 Index, OUT UINT32 *RegisterEax OPTIONAL, OUT UINT32 *RegisterEbx OPTIONAL, OUT UINT32 *RegisterEcx OPTIONAL, OUT UINT32 *RegisterEdx OPTIONAL)
#define PcdGet64(TokenName)