summaryrefslogtreecommitdiffstats
path: root/ArmPkg/Drivers
diff options
context:
space:
mode:
authorMing Huang <huangming@linux.alibaba.com>2021-02-25 11:32:12 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-03-01 13:09:24 +0000
commit0996a7883c6dd939d6e769b1ce1fd2b2e250bcfb (patch)
tree1ec6b6512354f16cc8e3089e489635a2693db8ef /ArmPkg/Drivers
parentf7ee9e9253644a79a255b630ce6e22e019e3bf09 (diff)
downloadedk2-0996a7883c6dd939d6e769b1ce1fd2b2e250bcfb.tar.gz
edk2-0996a7883c6dd939d6e769b1ce1fd2b2e250bcfb.tar.bz2
edk2-0996a7883c6dd939d6e769b1ce1fd2b2e250bcfb.zip
ArmPkg/ArmGicLib: Fix GICR_IPRIORITYR address wrong issue
The register address of GICR_IPRIORITYR is in SGI_base frame. Add IPRIORITY_ADDRESS macro for getting GICR_IPRIORITYR address. Otherwise GIC RAS error(Uncorrected software error) may report in ArmGicDxe. This resolves BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3236 Signed-off-by: Ming Huang <huangming@linux.alibaba.com> Reviewed-by: Leif Lindholm <leif@nuviainc.com> Tested-by: Ard Biesheuvel <ardb@kernel.org> # QEMU/kvm guest on ThunderX2 Tested-by: Quan Nguyen <quan@os.amperecomputing.com>
Diffstat (limited to 'ArmPkg/Drivers')
-rw-r--r--ArmPkg/Drivers/ArmGic/ArmGicLib.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ArmPkg/Drivers/ArmGic/ArmGicLib.c b/ArmPkg/Drivers/ArmGic/ArmGicLib.c
index 5d04ed3dac..6b01c88206 100644
--- a/ArmPkg/Drivers/ArmGic/ArmGicLib.c
+++ b/ArmPkg/Drivers/ArmGic/ArmGicLib.c
@@ -30,6 +30,9 @@
#define ICENABLER_ADDRESS(base,offset) ((base) + \
ARM_GICR_CTLR_FRAME_SIZE + ARM_GICR_ICENABLER + 4 * (offset))
+#define IPRIORITY_ADDRESS(base,offset) ((base) + \
+ ARM_GICR_CTLR_FRAME_SIZE + ARM_GIC_ICDIPR + 4 * (offset))
+
/**
*
* Return whether the Source interrupt index refers to a shared interrupt (SPI)
@@ -236,7 +239,7 @@ ArmGicSetInterruptPriority (
}
MmioAndThenOr32 (
- GicCpuRedistributorBase + ARM_GIC_ICDIPR + (4 * RegOffset),
+ IPRIORITY_ADDRESS (GicCpuRedistributorBase, RegOffset),
~(0xff << RegShift),
Priority << RegShift
);