diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2015-12-15 13:08:48 +0000 |
---|---|---|
committer | abiesheuvel <abiesheuvel@Edk2> | 2015-12-15 13:08:48 +0000 |
commit | 33ed33f187df97ea37854c2e3f6f385c12169a19 (patch) | |
tree | bb33e8803bf022e5c364f4c89091913dca52fefc /ArmPkg | |
parent | d9ac8a457671d6425f345ede4110c1af5ee02956 (diff) | |
download | edk2-33ed33f187df97ea37854c2e3f6f385c12169a19.zip edk2-33ed33f187df97ea37854c2e3f6f385c12169a19.tar.gz edk2-33ed33f187df97ea37854c2e3f6f385c12169a19.tar.bz2 |
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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ArmPkg/Drivers/ArmGic/ArmGicNonSecLib.c b/ArmPkg/Drivers/ArmGic/ArmGicNonSecLib.c index 3157243..f90391b 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);
}
}
}
|