]>
git.proxmox.com Git - mirror_edk2.git/blob - UefiCpuPkg/Library/CpuTimerLib/BaseCpuTimerLib.c
2 CPUID Leaf 0x15 for Core Crystal Clock frequency instance as Base Timer Library.
4 Copyright (c) 2019 Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
10 #include <Library/TimerLib.h>
11 #include <Library/BaseLib.h>
14 CPUID Leaf 0x15 for Core Crystal Clock Frequency.
16 The TSC counting frequency is determined by using CPUID leaf 0x15. Frequency in MHz = Core XTAL frequency * EBX/EAX.
17 In newer flavors of the CPU, core xtal frequency is returned in ECX or 0 if not supported.
18 @return The number of TSC counts per second.
22 CpuidCoreClockCalculateTscFrequency (
27 Internal function to retrieves the 64-bit frequency in Hz.
29 Internal function to retrieves the 64-bit frequency in Hz.
31 @return The frequency in Hz.
35 InternalGetPerformanceCounterFrequency (
39 return CpuidCoreClockCalculateTscFrequency ();