summaryrefslogtreecommitdiffstats
path: root/ArmPkg
diff options
context:
space:
mode:
authorLeif Lindholm <quic_llindhol@quicinc.com>2024-06-19 15:41:33 +0100
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-06-26 01:51:15 +0000
commita715d456de47187cbaad1747a398499180cac710 (patch)
treeb911de0e8f891f1cf96f2b08c0f6222eee93fade /ArmPkg
parent2fbaaa96d11ad61a9133df1728e3fe965d1457a5 (diff)
downloadedk2-a715d456de47187cbaad1747a398499180cac710.tar.gz
edk2-a715d456de47187cbaad1747a398499180cac710.tar.bz2
edk2-a715d456de47187cbaad1747a398499180cac710.zip
ArmPkg: drop manual ARM programming of generic timer frequency
There is a bit of legacy code in ArmArchTimerLib that attempts to program the generic timer based on a Pcd. This was only ever done for (32-bit) ARM in case the cpu lacked the Security Extensions (because if they were there, Secure firmware would be expected to have configured this before switching to Non-secure state). We don't support operation without Secure firmware anymore, but also the code has been incorrectly invoked only on platforms that *do* implement the Security Extensions since December 2020 and commit 0dd0d42ab5b6 ("ArmPkg: use helper to check for Security extensions in ArmArchTimerLib") As a result, edk2 has been overriding any programming done by Secure Firmware on ARM platforms. Which is wrong. Drop this programming in preparation for deleting the Pcd completely. Signed-off-by: Leif Lindholm <quic_llindhol@quicinc.com>
Diffstat (limited to 'ArmPkg')
-rw-r--r--ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.c b/ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.c
index d663a76a9b..00700395ef 100644
--- a/ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.c
+++ b/ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.c
@@ -45,19 +45,6 @@ TimerConstructor (
// Ref manual, lower bound of the frequency is in the range of 1-10MHz.
//
ASSERT (TICKS_PER_MICRO_SEC);
-
- #ifdef MDE_CPU_ARM
- //
- // Only set the frequency for ARMv7. We expect the secure firmware to
- // have already done it.
- // If the security extension is not implemented, set Timer Frequency
- // here.
- //
- if (ArmHasSecurityExtensions ()) {
- ArmGenericTimerSetTimerFreq (PcdGet32 (PcdArmArchTimerFreqInHz));
- }
-
- #endif
}
//