From bc300d3112877fba8aadc58fc71b64f849842f63 Mon Sep 17 00:00:00 2001 From: Giacomo Travaglini Date: Tue, 23 Apr 2019 17:06:23 +0100 Subject: [PATCH] dev-arm: GICv3 LPI tables are using physical addresses Change-Id: I439112f318720ae74c43a374fd3a524c607b3a23 Signed-off-by: Giacomo Travaglini Reviewed-by: Andreas Sandberg Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18591 Maintainer: Andreas Sandberg Tested-by: kokoro --- src/dev/arm/gic_v3_redistributor.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/dev/arm/gic_v3_redistributor.cc b/src/dev/arm/gic_v3_redistributor.cc index 3039e1e55..d5a405a84 100644 --- a/src/dev/arm/gic_v3_redistributor.cc +++ b/src/dev/arm/gic_v3_redistributor.cc @@ -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(); -- 2.30.2