summaryrefslogtreecommitdiffstats
path: root/ArmPkg/Library/ArmGicArchLib
diff options
context:
space:
mode:
authorLeif Lindholm <leif@nuviainc.com>2020-12-18 12:05:44 +0000
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2020-12-18 15:27:26 +0000
commitb7ae5efb79919a1e7bd893ad2e612456ebb608d3 (patch)
treec0d080b2766ef12b497a2c0c59b696123cb82aa0 /ArmPkg/Library/ArmGicArchLib
parent5cc25cff5de191583f3ecb2d9a7e9a13baa70071 (diff)
downloadedk2-b7ae5efb79919a1e7bd893ad2e612456ebb608d3.tar.gz
edk2-b7ae5efb79919a1e7bd893ad2e612456ebb608d3.tar.bz2
edk2-b7ae5efb79919a1e7bd893ad2e612456ebb608d3.zip
ArmPkg: use ID register helper for ArmGicArch(Sec)Lib
Use ArmHasGicSystemRegisters () instead of direct ID register tests. Cc: Ard Biesheuvel <ard.biesheuvel@arm.com> Signed-off-by: Leif Lindholm <leif@nuviainc.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
Diffstat (limited to 'ArmPkg/Library/ArmGicArchLib')
-rw-r--r--ArmPkg/Library/ArmGicArchLib/AArch64/ArmGicArchLib.c2
-rw-r--r--ArmPkg/Library/ArmGicArchLib/Arm/ArmGicArchLib.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/ArmPkg/Library/ArmGicArchLib/AArch64/ArmGicArchLib.c b/ArmPkg/Library/ArmGicArchLib/AArch64/ArmGicArchLib.c
index 4086a294da..6fd69658e0 100644
--- a/ArmPkg/Library/ArmGicArchLib/AArch64/ArmGicArchLib.c
+++ b/ArmPkg/Library/ArmGicArchLib/AArch64/ArmGicArchLib.c
@@ -25,7 +25,7 @@ ArmGicArchLibInitialize (
// feature is implemented on the CPU. This is also convenient as our GICv3
// driver requires SRE. If only Memory mapped access is available we try to
// drive the GIC as a v2.
- if (ArmReadIdPfr0 () & AARCH64_PFR0_GIC) {
+ if (ArmHasGicSystemRegisters ()) {
// Make sure System Register access is enabled (SRE). This depends on the
// higher privilege level giving us permission, otherwise we will either
// cause an exception here, or the write doesn't stick in which case we need
diff --git a/ArmPkg/Library/ArmGicArchLib/Arm/ArmGicArchLib.c b/ArmPkg/Library/ArmGicArchLib/Arm/ArmGicArchLib.c
index 222d805982..7e7e46e69f 100644
--- a/ArmPkg/Library/ArmGicArchLib/Arm/ArmGicArchLib.c
+++ b/ArmPkg/Library/ArmGicArchLib/Arm/ArmGicArchLib.c
@@ -25,7 +25,7 @@ ArmGicArchLibInitialize (
// feature is implemented on the CPU. This is also convenient as our GICv3
// driver requires SRE. If only Memory mapped access is available we try to
// drive the GIC as a v2.
- if (ArmReadIdPfr1 () & ARM_PFR1_GIC) {
+ if (ArmHasGicSystemRegisters ()) {
// Make sure System Register access is enabled (SRE). This depends on the
// higher privilege level giving us permission, otherwise we will either
// cause an exception here, or the write doesn't stick in which case we need