summaryrefslogtreecommitdiff
path: root/ArmPkg
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2015-12-15 13:08:48 +0000
committerabiesheuvel <abiesheuvel@Edk2>2015-12-15 13:08:48 +0000
commit33ed33f187df97ea37854c2e3f6f385c12169a19 (patch)
treebb33e8803bf022e5c364f4c89091913dca52fefc /ArmPkg
parentd9ac8a457671d6425f345ede4110c1af5ee02956 (diff)
downloadedk2-platforms-33ed33f187df97ea37854c2e3f6f385c12169a19.tar.xz
ArmPkg/ArmGic: fix bug in GICv3 distributor configuration
In the function ArmGicEnableDistributor (), the Affinity Routing Enable (ARE) bit, which essentially defines whether the GIC runs in v2 or v3 mode, is inadvertently cleared when enabling the GIC distributor if it is running in v3 mode. So fix that. Reported-by: Supreeth Venkatesh <Supreeth.Venkatesh@arm.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19274 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPkg')
-rw-r--r--ArmPkg/Drivers/ArmGic/ArmGicNonSecLib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ArmPkg/Drivers/ArmGic/ArmGicNonSecLib.c b/ArmPkg/Drivers/ArmGic/ArmGicNonSecLib.c
index 31572438d9..f90391b716 100644
--- a/ArmPkg/Drivers/ArmGic/ArmGicNonSecLib.c
+++ b/ArmPkg/Drivers/ArmGic/ArmGicNonSecLib.c
@@ -33,9 +33,9 @@ ArmGicEnableDistributor (
MmioWrite32 (GicDistributorBase + ARM_GIC_ICDDCR, 0x1);
} else {
if (MmioRead32 (GicDistributorBase + ARM_GIC_ICDDCR) & ARM_GIC_ICDDCR_ARE) {
- MmioWrite32 (GicDistributorBase + ARM_GIC_ICDDCR, 0x2);
+ MmioOr32 (GicDistributorBase + ARM_GIC_ICDDCR, 0x2);
} else {
- MmioWrite32 (GicDistributorBase + ARM_GIC_ICDDCR, 0x1);
+ MmioOr32 (GicDistributorBase + ARM_GIC_ICDDCR, 0x1);
}
}
}