Revision: 19274
          http://sourceforge.net/p/edk2/code/19274
Author:   abiesheuvel
Date:     2015-12-15 13:08:48 +0000 (Tue, 15 Dec 2015)
Log Message:
-----------
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 <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <[email protected]>
Reviewed-by: Leif Lindholm <[email protected]>

Modified Paths:
--------------
    trunk/edk2/ArmPkg/Drivers/ArmGic/ArmGicNonSecLib.c

Modified: trunk/edk2/ArmPkg/Drivers/ArmGic/ArmGicNonSecLib.c
===================================================================
--- trunk/edk2/ArmPkg/Drivers/ArmGic/ArmGicNonSecLib.c  2015-12-15 09:56:04 UTC 
(rev 19273)
+++ trunk/edk2/ArmPkg/Drivers/ArmGic/ArmGicNonSecLib.c  2015-12-15 13:08:48 UTC 
(rev 19274)
@@ -33,9 +33,9 @@
     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);
     }
   }
 }


------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to