dev-arm: Fix GICv3 LPIs priority value
authorGiacomo Travaglini <giacomo.travaglini@arm.com>
Thu, 25 Apr 2019 09:45:58 +0000 (10:45 +0100)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Thu, 2 May 2019 12:44:13 +0000 (12:44 +0000)
Priority bits in the LPI configuration table entry are only the MSBits
([7:2]) and need to be shifted in order to get the real LPI priority
value.

Change-Id: Id04dd4fa9113a32712c73a7094df498de3c0d2b5
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18594
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/dev/arm/gic_v3_redistributor.cc

index be28d3a2b0e478bbf6904c709ef7d91acf87f8c5..e22d830aed98171ace5efbbdcff00ef985fac3c8 100644 (file)
@@ -839,7 +839,7 @@ Gicv3Redistributor::update()
             bool group_enabled = distributor->groupEnabled(lpi_group);
 
             if (lpi_is_pending && lpi_is_enable && group_enabled) {
-                uint8_t lpi_priority =config_entry.priority;
+                uint8_t lpi_priority = config_entry.priority << 2;
 
                 if ((lpi_priority < cpuInterface->hppi.prio) ||
                     (lpi_priority == cpuInterface->hppi.prio &&