summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mem/physical.cc7
-rw-r--r--mem/port.hh5
-rw-r--r--sim/process.cc2
3 files changed, 13 insertions, 1 deletions
diff --git a/mem/physical.cc b/mem/physical.cc
index 02563ac70..031d832dd 100644
--- a/mem/physical.cc
+++ b/mem/physical.cc
@@ -164,6 +164,13 @@ PhysicalMemory::prot_memset(Addr addr, uint8_t val, int size)
memset(pmem_addr + addr - base_addr, val, size);
}
+int
+PhysicalMemory::deviceBlockSize()
+{
+ //For now the largest accesses we can take are Page Sized
+ return VMPageSize;
+}
+
void
PhysicalMemory::serialize(ostream &os)
{
diff --git a/mem/port.hh b/mem/port.hh
index c6dcb5d81..88cca885b 100644
--- a/mem/port.hh
+++ b/mem/port.hh
@@ -93,6 +93,11 @@ class Port
*/
void setPeer(Port *port) { peer = port; }
+ /** Function to set the pointer for the peer port.
+ @todo should be called by the configuration stuff (python).
+ */
+ Port *getPeer(Port *port) { return peer; }
+
protected:
/** These functions are protected because they should only be
diff --git a/sim/process.cc b/sim/process.cc
index 013ac0890..2335d5cc8 100644
--- a/sim/process.cc
+++ b/sim/process.cc
@@ -154,7 +154,7 @@ Process::startup()
if (execContexts.empty())
fatal("Process %s is not associated with any CPUs!\n", name());
- initVirtMem = new TranslatingPort(system->physmem->getPort("any"), pTable);
+ initVirtMem = new TranslatingPort((system->physmem->getPort("any"))->getPeer(), pTable);
// first exec context for this process... initialize & enable
ExecContext *xc = execContexts[0];