mem/physical.cc:
Implement the blockSize function, return VMPageSize for the physical memory
mem/port.hh:
Add a function to get a pointer to a peer, needed for initVirtMem to work in the loader.
sim/process.cc:
The way the translating port is setup we don't want the memory port, we want the peer port associated with that memory. We may need to revisit this.
--HG--
extra : convert_revision :
46a51d448d1683db7bd5afe64adbe167a5743060
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)
{
*/
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
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];