]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPkg/ArmGic: fix bug in GICv3 distributor configuration
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Tue, 15 Dec 2015 13:08:48 +0000 (13:08 +0000)
committerabiesheuvel <abiesheuvel@Edk2>
Tue, 15 Dec 2015 13:08:48 +0000 (13:08 +0000)
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

ArmPkg/Drivers/ArmGic/ArmGicNonSecLib.c

index 31572438d9a1eac027c7cc3c6241fca7f11471bc..f90391b716b5299a3e39934cc8b8c9ca090fd83b 100644 (file)
@@ -33,9 +33,9 @@ ArmGicEnableDistributor (
     MmioWrite32 (GicDistributorBase + ARM_GIC_ICDDCR, 0x1);\r
   } else {\r
     if (MmioRead32 (GicDistributorBase + ARM_GIC_ICDDCR) & ARM_GIC_ICDDCR_ARE) {\r
-      MmioWrite32 (GicDistributorBase + ARM_GIC_ICDDCR, 0x2);\r
+      MmioOr32 (GicDistributorBase + ARM_GIC_ICDDCR, 0x2);\r
     } else {\r
-      MmioWrite32 (GicDistributorBase + ARM_GIC_ICDDCR, 0x1);\r
+      MmioOr32 (GicDistributorBase + ARM_GIC_ICDDCR, 0x1);\r
     }\r
   }\r
 }\r