summaryrefslogtreecommitdiff
path: root/mem
diff options
context:
space:
mode:
Diffstat (limited to 'mem')
-rw-r--r--mem/bus.cc1
-rw-r--r--mem/packet.hh6
-rw-r--r--mem/vport.hh33
3 files changed, 7 insertions, 33 deletions
diff --git a/mem/bus.cc b/mem/bus.cc
index 8031dae96..5e84beb83 100644
--- a/mem/bus.cc
+++ b/mem/bus.cc
@@ -57,6 +57,7 @@ Bus::findPort(Addr addr, int id)
if (portList[i].range == addr) {
dest_id = portList[i].portId;
found = true;
+ DPRINTF(Bus, "Found Addr: %llx on device %d\n", addr, dest_id);
}
i++;
}
diff --git a/mem/packet.hh b/mem/packet.hh
index 91e56385d..843d34ac0 100644
--- a/mem/packet.hh
+++ b/mem/packet.hh
@@ -128,6 +128,12 @@ struct Packet
/** Accessor function that returns the destination index of
the packet. */
short getDest() const { return dest; }
+
+ Packet()
+ : result(Unknown)
+ {}
+
+ void reset() { result = Unknown; }
};
#endif //__MEM_PACKET_HH
diff --git a/mem/vport.hh b/mem/vport.hh
index da036b981..fbc230ba3 100644
--- a/mem/vport.hh
+++ b/mem/vport.hh
@@ -63,39 +63,6 @@ class VirtualPort : public FunctionalPort
*/
bool nullExecContext() { return xc != NULL; }
- /** Write a piece of data into a virtual address.
- * @param vaddr virtual address to write to
- * @param data data to write
- */
- template <typename T>
- inline void write(Addr vaddr, T data)
- {
- Addr paddr;
- if (xc)
- paddr = TheISA::vtophys(xc,vaddr);
- else
- paddr = TheISA::vtophys(vaddr);
-
- FunctionalPort::write(paddr, data);
- }
-
- /** Read data from a virtual address and return it.
- * @param vaddr address to read
- * @return data read
- */
-
- template <typename T>
- inline T read(Addr vaddr)
- {
- Addr paddr;
- if (xc)
- paddr = TheISA::vtophys(xc,vaddr);
- else
- paddr = TheISA::vtophys(vaddr);
-
- return FunctionalPort::read<T>(paddr);
- }
-
/** Version of readblob that translates virt->phys and deals
* with page boundries. */
virtual void readBlob(Addr addr, uint8_t *p, int size);