From 830391cad9764b923edd8f761e9fe5d11fd9d837 Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Mon, 9 Jul 2012 12:35:33 -0400 Subject: Port: Add getAddrRanges to master port (asking slave port) This patch adds getAddrRanges to the master port, and thus avoids going through getSlavePort to be able to ask the slave. Similar to the previous patch that added isSnooping to the SlavePort, this patch aims to introduce an additional level of hierarchy in the ports (base port being protocol-agnostic) and getSlave/MasterPort will return port pointers to these base classes. The function is named getAddrRanges also on the master port, but does nothing besides asking the connected slave port. The slave port, as before, has to provide an implementation and actually produce a list of address ranges. The initial design used the name getSlaveAddrRanges for the new function, but the more verbose name was later changed. --- src/kern/tru64/tru64_events.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/kern') diff --git a/src/kern/tru64/tru64_events.cc b/src/kern/tru64/tru64_events.cc index 89f2990b9..fd4c20bdd 100644 --- a/src/kern/tru64/tru64_events.cc +++ b/src/kern/tru64/tru64_events.cc @@ -62,7 +62,8 @@ BadAddrEvent::process(ThreadContext *tc) MasterPort &dataPort = tc->getCpuPtr()->getDataPort(); - AddrRangeList resp = dataPort.getSlavePort().getAddrRanges(); + // get the address ranges of the connected slave port + AddrRangeList resp = dataPort.getAddrRanges(); for (iter = resp.begin(); iter != resp.end(); iter++) { if (*iter == (K0Seg2Phys(a0) & PAddrImplMask)) found = true; -- cgit v1.2.3