diff options
author | Ali Saidi <saidi@eecs.umich.edu> | 2006-11-29 17:11:10 -0500 |
---|---|---|
committer | Ali Saidi <saidi@eecs.umich.edu> | 2006-11-29 17:11:10 -0500 |
commit | b2eecd643c1706d0d070568d5370aafa3910c104 (patch) | |
tree | 0682423ae87ee5eeab96e9b74525d9b99ccaa630 /src/arch/sparc/tlb.cc | |
parent | 6e9cf9411f2ec9bcf9a093ab30f6ce0925f97fa2 (diff) | |
download | gem5-b2eecd643c1706d0d070568d5370aafa3910c104.tar.xz |
Add support for mmapped iprs to atomic cpu
src/arch/SConscript:
add mmaped_ipr.hh to switch headers
src/arch/sparc/asi.hh:
make ASI_IMPLICT=0 so by default nothing needs to be done
src/arch/sparc/miscregfile.hh:
miscregfile no longer needs to include asi.hh
src/arch/sparc/tlb.cc:
src/arch/sparc/tlb.hh:
implement panic instructions for mmaped ipr reads
src/cpu/simple/atomic.cc:
add check for mmaped iprs and handle them if it exists
src/mem/request.hh:
allocate space in the flags for mmaped iprs. Put in in the first 8 bits so that by default its fast. Move the other flags up 8 bits
--HG--
extra : convert_revision : 31255b0494588c4d06a727fe35241121d741b115
Diffstat (limited to 'src/arch/sparc/tlb.cc')
-rw-r--r-- | src/arch/sparc/tlb.cc | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/src/arch/sparc/tlb.cc b/src/arch/sparc/tlb.cc index 9b7943ed9..5fde4d36d 100644 --- a/src/arch/sparc/tlb.cc +++ b/src/arch/sparc/tlb.cc @@ -508,13 +508,31 @@ DTB::translate(RequestPtr &req, ThreadContext *tc, bool write) req->setPaddr(e->pte.paddr() & ~e->pte.size() | req->getVaddr() & e->pte.size()); return NoFault; - /*** End of normal Path ***/ + /** Normal flow ends here. */ -handleMmuRegAccess: handleScratchRegAccess: - panic("How are we ever going to deal with this?\n"); + if (vaddr > 0x38 || (vaddr >= 0x20 && vaddr < 0x30 && !hpriv)) { + writeSfr(tc, vaddr, write, Primary, true, IllegalAsi, asi); + return new DataAccessException; + } +handleMmuRegAccess: + req->setMmapedIpr(true); + req->setPaddr(req->getVaddr()); + return NoFault; }; +Tick +DTB::doMmuRegRead(ThreadContext *tc, Packet *pkt) +{ + panic("need to implement DTB::doMmuRegRead()\n"); +} + +Tick +DTB::doMmuRegWrite(ThreadContext *tc, Packet *pkt) +{ + panic("need to implement DTB::doMmuRegWrite()\n"); +} + void TLB::serialize(std::ostream &os) { |