[edk2-devel] [PATCH 6/9] ArmPkg: use helper to check for Security extensions in ArmArchTimerLib

Leif Lindholm leif at nuviainc.com
Fri Dec 18 14:16:14 UTC 2020


Use the helper ArmHasSecurityExtensions () instead of accessing
ID_PFR1 directly. Only affects ARM build.

Cc: Ard Biesheuvel <ard.biesheuvel at arm.com>
Signed-off-by: Leif Lindholm <leif at nuviainc.com>
---
 ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.c b/ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.c
index 7c698fe471f3..24d9dae4e660 100644
--- a/ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.c
+++ b/ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.c
@@ -56,7 +56,7 @@ TimerConstructor (
       // If the security extension is not implemented, set Timer Frequency
       // here.
       //
-      if ((ArmReadIdPfr1 () & ARM_PFR1_SEC) == 0x0) {
+      if (ArmHasSecurityExtensions ()) {
         ArmGenericTimerSetTimerFreq (PcdGet32 (PcdArmArchTimerFreqInHz));
       }
 #endif
-- 
2.20.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#69202): https://edk2.groups.io/g/devel/message/69202
Mute This Topic: https://groups.io/mt/79061639/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list