mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
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>
This commit is contained in:
parent
7ee89453b5
commit
0333faf50e
@ -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
|
||||
|
@ -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
|
||||
@ -34,19 +34,6 @@ TimerConstructor (
|
||||
// Check if the ARM Generic Timer Extension is implemented.
|
||||
//
|
||||
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).
|
||||
@ -76,10 +63,7 @@ GetPlatformTimerFreq (
|
||||
{
|
||||
UINTN TimerFreq;
|
||||
|
||||
TimerFreq = PcdGet32 (PcdArmArchTimerFreqInHz);
|
||||
if (TimerFreq == 0) {
|
||||
TimerFreq = ArmGenericTimerGetTimerFreq ();
|
||||
}
|
||||
TimerFreq = ArmGenericTimerGetTimerFreq ();
|
||||
|
||||
return TimerFreq;
|
||||
}
|
||||
|
@ -29,4 +29,3 @@
|
||||
ArmGenericTimerCounterLib
|
||||
|
||||
[Pcd]
|
||||
gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz
|
||||
|
Loading…
x
Reference in New Issue
Block a user