mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-24 22:24:37 +02:00
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>
This commit is contained in:
parent
5cc25cff5d
commit
b7ae5efb79
@ -25,7 +25,7 @@ ArmGicArchLibInitialize (
|
|||||||
// feature is implemented on the CPU. This is also convenient as our GICv3
|
// 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
|
// driver requires SRE. If only Memory mapped access is available we try to
|
||||||
// drive the GIC as a v2.
|
// 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
|
// Make sure System Register access is enabled (SRE). This depends on the
|
||||||
// higher privilege level giving us permission, otherwise we will either
|
// 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
|
// cause an exception here, or the write doesn't stick in which case we need
|
||||||
|
@ -25,7 +25,7 @@ ArmGicArchLibInitialize (
|
|||||||
// feature is implemented on the CPU. This is also convenient as our GICv3
|
// 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
|
// driver requires SRE. If only Memory mapped access is available we try to
|
||||||
// drive the GIC as a v2.
|
// 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
|
// Make sure System Register access is enabled (SRE). This depends on the
|
||||||
// higher privilege level giving us permission, otherwise we will either
|
// 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
|
// cause an exception here, or the write doesn't stick in which case we need
|
||||||
|
@ -23,7 +23,7 @@ ArmGicGetSupportedArchRevision (
|
|||||||
// feature is implemented on the CPU. This is also convenient as our GICv3
|
// 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
|
// driver requires SRE. If only Memory mapped access is available we try to
|
||||||
// drive the GIC as a v2.
|
// 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
|
// Make sure System Register access is enabled (SRE). This depends on the
|
||||||
// higher privilege level giving us permission, otherwise we will either
|
// 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
|
// cause an exception here, or the write doesn't stick in which case we need
|
||||||
|
@ -23,7 +23,7 @@ ArmGicGetSupportedArchRevision (
|
|||||||
// feature is implemented on the CPU. This is also convenient as our GICv3
|
// 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
|
// driver requires SRE. If only Memory mapped access is available we try to
|
||||||
// drive the GIC as a v2.
|
// 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
|
// Make sure System Register access is enabled (SRE). This depends on the
|
||||||
// higher privilege level giving us permission, otherwise we will either
|
// 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
|
// cause an exception here, or the write doesn't stick in which case we need
|
||||||
|
Loading…
x
Reference in New Issue
Block a user