diff options
author | Leif Lindholm <quic_llindhol@quicinc.com> | 2024-06-19 18:29:30 +0100 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-06-26 01:51:15 +0000 |
commit | 0333faf50e49d3b3ea2c624b4d403b405b3107a1 (patch) | |
tree | 6ef3759c7de38f353bbe846475cb0d7edb611e66 /ArmPkg/Library | |
parent | 7ee89453b5a20199e96d08eb80db8dbaf06280e8 (diff) | |
download | edk2-0333faf50e49d3b3ea2c624b4d403b405b3107a1.zip edk2-0333faf50e49d3b3ea2c624b4d403b405b3107a1.tar.gz edk2-0333faf50e49d3b3ea2c624b4d403b405b3107a1.tar.bz2 |
ArmPkg: delete PcdArmArchTimerFreqInHz
PcdArmArchTimerFreqInHz lets platforms override the architectural timer
frequency, but this really isn't supported in hardware by anything lower
than EL3. And we no longer support running edk2 at EL3.
So drop this Pcd and update ArmArchTimerLib to unconditionally use
ArmGenericTimerGetTimerFreq () instead.
Signed-off-by: Leif Lindholm <quic_llindhol@quicinc.com>
Diffstat (limited to 'ArmPkg/Library')
-rw-r--r-- | ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.c | 20 | ||||
-rw-r--r-- | ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf | 1 |
2 files changed, 2 insertions, 19 deletions
diff --git a/ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.c b/ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.c index 0070039..ccb4f64 100644 --- a/ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.c +++ b/ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.c @@ -15,7 +15,7 @@ #include <Library/PcdLib.h>
#include <Library/ArmGenericTimerCounterLib.h>
-#define TICKS_PER_MICRO_SEC (PcdGet32 (PcdArmArchTimerFreqInHz)/1000000U)
+#define TICKS_PER_MICRO_SEC (ArmGenericTimerGetTimerFreq ()/1000000U)
// Select appropriate multiply function for platform architecture.
#ifdef MDE_CPU_ARM
@@ -35,19 +35,6 @@ TimerConstructor ( //
if (ArmIsArchTimerImplemented ()) {
//
- // Check if Architectural Timer frequency is pre-determined by the platform
- // (ie. nonzero).
- //
- if (PcdGet32 (PcdArmArchTimerFreqInHz) != 0) {
- //
- // Check if ticks/uS is not 0. The Architectural timer runs at constant
- // frequency, irrespective of CPU frequency. According to Generic Timer
- // Ref manual, lower bound of the frequency is in the range of 1-10MHz.
- //
- ASSERT (TICKS_PER_MICRO_SEC);
- }
-
- //
// Architectural Timer Frequency must be set in Secure privileged
// mode (if secure extension is supported).
// If the reset value (0) is returned, just ASSERT.
@@ -76,10 +63,7 @@ GetPlatformTimerFreq ( {
UINTN TimerFreq;
- TimerFreq = PcdGet32 (PcdArmArchTimerFreqInHz);
- if (TimerFreq == 0) {
- TimerFreq = ArmGenericTimerGetTimerFreq ();
- }
+ TimerFreq = ArmGenericTimerGetTimerFreq ();
return TimerFreq;
}
diff --git a/ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf b/ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf index 6f576ce..273b1e9 100644 --- a/ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf +++ b/ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf @@ -29,4 +29,3 @@ ArmGenericTimerCounterLib
[Pcd]
- gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz
|