dev-arm: GICv3 LPI tables are using physical addresses
authorGiacomo Travaglini <giacomo.travaglini@arm.com>
Tue, 23 Apr 2019 16:06:23 +0000 (17:06 +0100)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Thu, 2 May 2019 12:44:13 +0000 (12:44 +0000)
Change-Id: I439112f318720ae74c43a374fd3a524c607b3a23
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/+/18591
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/dev/arm/gic_v3_redistributor.cc

index 3039e1e55ec6b631b34b3912555ee7ea0e038fc2..d5a405a84c70fc20182de0567edfd1a24b98a2d6 100644 (file)
@@ -732,7 +732,7 @@ Gicv3Redistributor::invalLpiConfig(uint32_t lpi_entry_index)
     Addr lpi_table_entry_ptr = lpiConfigurationTablePtr +
         lpi_entry_index * sizeof(LPIConfigurationTableEntry);
     ThreadContext * tc = gic->getSystem()->getThreadContext(cpuId);
-    tc->getVirtProxy().readBlob(lpi_table_entry_ptr,
+    tc->getPhysProxy().readBlob(lpi_table_entry_ptr,
             (uint8_t*) &lpiConfigurationTable[lpi_entry_index],
             sizeof(LPIConfigurationTableEntry));
 }
@@ -833,9 +833,10 @@ Gicv3Redistributor::update()
     const uint32_t largest_lpi_id = 1 << (lpiIDBits + 1);
     char lpi_pending_table[largest_lpi_id / 8];
     ThreadContext * tc = gic->getSystem()->getThreadContext(cpuId);
-    tc->getVirtProxy().readBlob(lpiPendingTablePtr,
+    tc->getPhysProxy().readBlob(lpiPendingTablePtr,
                                 (uint8_t *) lpi_pending_table,
                                 sizeof(lpi_pending_table));
+
     for (int lpi_id = SMALLEST_LPI_ID; lpi_id < largest_lpi_id;
          lpi_id++) {
         uint32_t lpi_pending_entry_byte = lpi_id / 8;
@@ -892,7 +893,7 @@ Gicv3Redistributor::setClrLPI(uint64_t data, bool set)
     Addr lpi_pending_entry_ptr = lpiPendingTablePtr + (lpi_id / 8);
     uint8_t lpi_pending_entry;
     ThreadContext * tc = gic->getSystem()->getThreadContext(cpuId);
-    tc->getVirtProxy().readBlob(lpi_pending_entry_ptr,
+    tc->getPhysProxy().readBlob(lpi_pending_entry_ptr,
             (uint8_t*) &lpi_pending_entry,
             sizeof(lpi_pending_entry));
     uint8_t lpi_pending_entry_bit_position = lpi_id % 8;
@@ -916,7 +917,7 @@ Gicv3Redistributor::setClrLPI(uint64_t data, bool set)
         lpi_pending_entry &= ~(1 << (lpi_pending_entry_bit_position));
     }
 
-    tc->getVirtProxy().writeBlob(lpi_pending_entry_ptr,
+    tc->getPhysProxy().writeBlob(lpi_pending_entry_ptr,
             (uint8_t*) &lpi_pending_entry,
             sizeof(lpi_pending_entry));
     updateAndInformCPUInterface();