ruby: Implement support for functional accesses to PIO ranges
authorAndreas Sandberg <andreas.sandberg@arm.com>
Wed, 10 Aug 2016 14:27:13 +0000 (15:27 +0100)
committerAndreas Sandberg <andreas.sandberg@arm.com>
Wed, 10 Aug 2016 14:27:13 +0000 (15:27 +0100)
There are cases where we want to put boot ROMs on the PIO bus. Ruby
currently doesn't support functional accesses to such memories since
functional accesses are always assumed to go to physical memory. Add
the required support for routing functional accesses to the PIO bus.

Change-Id: Ia5b0fcbe87b9642bfd6ff98a55f71909d1a804e3
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Brad Beckmann <brad.beckmann@amd.com>
Reviewed-by: Michael LeBeane <michael.lebeane@amd.com>
configs/ruby/Ruby.py
src/mem/ruby/system/RubyPort.cc

index 6d78dd89d609aa6dceccee7d1557101ec9e7d47f..3ee92c2f66f9ad6c95dc6e4b5b2d881fab209f52 100644 (file)
@@ -194,6 +194,8 @@ def create_system(options, full_system, system, piobus = None, dma_ports = []):
     # independent of the protocol and kept in the protocol-agnostic
     # part (i.e. here).
     sys_port_proxy = RubyPortProxy(ruby_system = ruby)
+    if piobus is not None:
+        sys_port_proxy.pio_master_port = piobus.slave
 
     # Give the system port proxy a SimObject parent without creating a
     # full-fledged controller
index bf4002126d524d67215d2429f4dc8ccd7953c0db..7f0e6f82d92ade1f16dbe8a885d2864e994e9552 100644 (file)
@@ -312,9 +312,10 @@ RubyPort::MemSlavePort::recvFunctional(PacketPtr pkt)
     // Check for pio requests and directly send them to the dedicated
     // pio port.
     if (!isPhysMemAddress(pkt->getAddr())) {
-        assert(rp->memMasterPort.isConnected());
         DPRINTF(RubyPort, "Pio Request for address: 0x%#x\n", pkt->getAddr());
-        panic("RubyPort::PioMasterPort::recvFunctional() not implemented!\n");
+        assert(rp->pioMasterPort.isConnected());
+        rp->pioMasterPort.sendFunctional(pkt);
+        return;
     }
 
     assert(pkt->getAddr() + pkt->getSize() <=