summaryrefslogtreecommitdiffstats
path: root/UefiCpuPkg/Library/CpuTimerLib/BaseCpuTimerLib.inf
diff options
context:
space:
mode:
Diffstat (limited to 'UefiCpuPkg/Library/CpuTimerLib/BaseCpuTimerLib.inf')
-rw-r--r--UefiCpuPkg/Library/CpuTimerLib/BaseCpuTimerLib.inf15
1 files changed, 13 insertions, 2 deletions
diff --git a/UefiCpuPkg/Library/CpuTimerLib/BaseCpuTimerLib.inf b/UefiCpuPkg/Library/CpuTimerLib/BaseCpuTimerLib.inf
index f0f4ae902a..4a1c7c0510 100644
--- a/UefiCpuPkg/Library/CpuTimerLib/BaseCpuTimerLib.inf
+++ b/UefiCpuPkg/Library/CpuTimerLib/BaseCpuTimerLib.inf
@@ -1,10 +1,15 @@
## @file
# Base CPU Timer Library
#
-# Provides basic timer support using CPUID Leaf 0x15 XTAL frequency. The performance
+# Provides basic timer support.
+#
+# In x86, using CPUID Leaf 0x15 XTAL frequency. The performance
# counter features are provided by the processors time stamp counter.
#
+# In LoongArch64, using CPUCFG 0x4 and 0x5 for Stable Counter frequency.
+#
# Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2024, Loongson Technology Corporation Limited. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
@@ -18,10 +23,13 @@
LIBRARY_CLASS = TimerLib
MODULE_UNI_FILE = BaseCpuTimerLib.uni
-[Sources]
+[Sources.IA32, Sources.X64]
CpuTimerLib.c
BaseCpuTimerLib.c
+[Sources.LoongArch64]
+ LoongArch64/CpuTimerLib.c
+
[Packages]
MdePkg/MdePkg.dec
UefiCpuPkg/UefiCpuPkg.dec
@@ -31,5 +39,8 @@
DebugLib
PcdLib
+[LibraryClasses.LoongArch64]
+ SafeIntLib
+
[Pcd]
gUefiCpuPkgTokenSpaceGuid.PcdCpuCoreCrystalClockFrequency ## CONSUMES