Deleted Added
sdiff udiff text old ( 5222:bb733a878f85 ) new ( 5224:0e354459fb8a )
full compact
1/*
2 * Copyright 2007 MIPS Technologies, Inc. All Rights Reserved
3 *
4 * This software is part of the M5 simulator.
5 *
6 * THIS IS A LEGAL AGREEMENT. BY DOWNLOADING, USING, COPYING, CREATING
7 * DERIVATIVE WORKS, AND/OR DISTRIBUTING THIS SOFTWARE YOU ARE AGREEING
8 * TO THESE TERMS AND CONDITIONS.

--- 33 unchanged lines hidden (view full) ---

42#include "arch/mips/pagetable.hh"
43#include "arch/mips/tlb.hh"
44#include "arch/mips/faults.hh"
45#include "arch/mips/utility.hh"
46#include "base/inifile.hh"
47#include "base/str.hh"
48#include "base/trace.hh"
49#include "cpu/thread_context.hh"
50#include "params/MipsDTB.hh"
51#include "params/MipsITB.hh"
52#include "params/MipsTLB.hh"
53#include "params/MipsUTB.hh"
54
55
56using namespace std;
57using namespace MipsISA;

--- 251 unchanged lines hidden (view full) ---

309 hits = read_hits + write_hits;
310 misses = read_misses + write_misses;
311 accesses = read_accesses + write_accesses;
312}
313
314Fault
315ITB::translate(RequestPtr &req, ThreadContext *tc)
316{
317 if(MipsISA::IsKSeg0(req->getVaddr()))
318 {
319 // Address will not be translated through TLB, set response, and go!
320 req->setPaddr(MipsISA::KSeg02Phys(req->getVaddr()));
321 if(MipsISA::getOperatingMode(tc->readMiscReg(MipsISA::Status)) != mode_kernel || req->isMisaligned())
322 {
323 AddressErrorFault *Flt = new AddressErrorFault();
324 /* BadVAddr must be set */

--- 86 unchanged lines hidden (view full) ---

411 Flt->BadVAddr = req->getVaddr();
412
413 /* Context must be set */
414 Flt->Context_BadVPN2 = (VPN >> 2);
415 return Flt;
416 }
417 }
418 return checkCacheability(req);
419}
420
421Fault
422DTB::translate(RequestPtr &req, ThreadContext *tc, bool write)
423{
424 if(MipsISA::IsKSeg0(req->getVaddr()))
425 {
426 // Address will not be translated through TLB, set response, and go!
427 req->setPaddr(MipsISA::KSeg02Phys(req->getVaddr()));
428 if(MipsISA::getOperatingMode(tc->readMiscReg(MipsISA::Status)) != mode_kernel || req->isMisaligned())
429 {
430 StoreAddressErrorFault *Flt = new StoreAddressErrorFault();
431 /* BadVAddr must be set */

--- 107 unchanged lines hidden (view full) ---

539 Flt->BadVAddr = req->getVaddr();
540
541 /* Context must be set */
542 Flt->Context_BadVPN2 = (VPN >> 2);
543 return Flt;
544 }
545 }
546 return checkCacheability(req);
547}
548
549///////////////////////////////////////////////////////////////////////
550//
551// Mips ITB
552//
553ITB::ITB(const Params *p)
554 : TLB(p)

--- 70 unchanged lines hidden ---