summaryrefslogtreecommitdiffstats
path: root/ArmPkg
diff options
context:
space:
mode:
authorLeif Lindholm <quic_llindhol@quicinc.com>2024-06-19 18:29:30 +0100
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-06-26 01:51:15 +0000
commit0333faf50e49d3b3ea2c624b4d403b405b3107a1 (patch)
tree6ef3759c7de38f353bbe846475cb0d7edb611e66 /ArmPkg
parent7ee89453b5a20199e96d08eb80db8dbaf06280e8 (diff)
downloadedk2-0333faf50e49d3b3ea2c624b4d403b405b3107a1.tar.gz
edk2-0333faf50e49d3b3ea2c624b4d403b405b3107a1.tar.bz2
edk2-0333faf50e49d3b3ea2c624b4d403b405b3107a1.zip
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')
-rw-r--r--ArmPkg/ArmPkg.dec5
-rw-r--r--ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.c20
-rw-r--r--ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf1
3 files changed, 2 insertions, 24 deletions
diff --git a/ArmPkg/ArmPkg.dec b/ArmPkg/ArmPkg.dec
index 4ce59f3e1f..c0861140e8 100644
--- a/ArmPkg/ArmPkg.dec
+++ b/ArmPkg/ArmPkg.dec
@@ -314,11 +314,6 @@
gArmTokenSpaceGuid.PcdEmbeddedControllerFirmwareRelease|0xFFFF|UINT16|0x30000059
[PcdsFixedAtBuild.common, PcdsDynamic.common]
- #
- # ARM Architectural Timer
- #
- gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|0|UINT32|0x00000034
-
# ARM Architectural Timer Interrupt(GIC PPI) numbers
gArmTokenSpaceGuid.PcdArmArchTimerSecIntrNum|29|UINT32|0x00000035
gArmTokenSpaceGuid.PcdArmArchTimerIntrNum|30|UINT32|0x00000036
diff --git a/ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.c b/ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.c
index 00700395ef..ccb4f6474b 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 6f576ceab9..273b1e9555 100644
--- a/ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf
+++ b/ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf
@@ -29,4 +29,3 @@
ArmGenericTimerCounterLib
[Pcd]
- gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz