diff options
author | Benjamin Nash <benash@umich.edu> | 2005-06-28 14:03:04 -0400 |
---|---|---|
committer | Benjamin Nash <benash@umich.edu> | 2005-06-28 14:03:04 -0400 |
commit | bc76a807af2a2a874be461f0c6be9a6c5ec8bfad (patch) | |
tree | 423bd4e153fcc425dc9b7266978bd42778e55c32 /sim | |
parent | 8b042182626b94ed6380f0ba6b99c0e862aa710f (diff) | |
parent | 036a8ceb8da8aff10b819b4aab32584d41282a64 (diff) | |
download | gem5-bc76a807af2a2a874be461f0c6be9a6c5ec8bfad.tar.xz |
Merge m5read@m5.eecs.umich.edu:/bk/m5
into zed.eecs.umich.edu:/z/benash/bk/m5
--HG--
extra : convert_revision : 453615c8194ae9ca96330b7493c6b19fc89c3a72
Diffstat (limited to 'sim')
-rw-r--r-- | sim/system.cc | 19 | ||||
-rw-r--r-- | sim/system.hh | 5 |
2 files changed, 23 insertions, 1 deletions
diff --git a/sim/system.cc b/sim/system.cc index a51cc03bf..8397b8e01 100644 --- a/sim/system.cc +++ b/sim/system.cc @@ -147,7 +147,7 @@ System::System(Params *p) * Set the hardware reset parameter block system type and revision * information to Tsunami. */ - if (consoleSymtab->findAddress("xxm_rpb", addr)) { + if (consoleSymtab->findAddress("m5_rpb", addr)) { Addr paddr = vtophys(physmem, addr); char *hwrpb = (char *)physmem->dma_addr(paddr, sizeof(uint64_t)); @@ -180,6 +180,23 @@ System::~System() #endif } +void +System::setAlphaAccess(Addr access) +{ + Addr addr = 0; + if (consoleSymtab->findAddress("m5AlphaAccess", addr)) { + Addr paddr = vtophys(physmem, addr); + uint64_t *m5AlphaAccess = + (uint64_t *)physmem->dma_addr(paddr, sizeof(uint64_t)); + + if (!m5AlphaAccess) + panic("could not translate m5AlphaAccess addr\n"); + + *m5AlphaAccess = htoa(EV5::Phys2K0Seg(access)); + } else + panic("could not find m5AlphaAccess\n"); +} + bool System::breakpoint() { diff --git a/sim/system.hh b/sim/system.hh index c3e4d6d68..ab6d264ea 100644 --- a/sim/system.hh +++ b/sim/system.hh @@ -128,6 +128,11 @@ class System : public SimObject public: /** + * Set the m5AlphaAccess pointer in the console + */ + void setAlphaAccess(Addr access); + + /** * Returns the addess the kernel starts at. * @return address the kernel starts at */ |