tlb.cc revision 9738
11689SN/A/* 212109SRekai.GonzalezAlberquilla@arm.com * Copyright (c) 2001-2005 The Regents of The University of Michigan 312109SRekai.GonzalezAlberquilla@arm.com * Copyright (c) 2007 MIPS Technologies, Inc. 412109SRekai.GonzalezAlberquilla@arm.com * All rights reserved. 512109SRekai.GonzalezAlberquilla@arm.com * 612109SRekai.GonzalezAlberquilla@arm.com * Redistribution and use in source and binary forms, with or without 712109SRekai.GonzalezAlberquilla@arm.com * modification, are permitted provided that the following conditions are 812109SRekai.GonzalezAlberquilla@arm.com * met: redistributions of source code must retain the above copyright 912109SRekai.GonzalezAlberquilla@arm.com * notice, this list of conditions and the following disclaimer; 1012109SRekai.GonzalezAlberquilla@arm.com * redistributions in binary form must reproduce the above copyright 1112109SRekai.GonzalezAlberquilla@arm.com * notice, this list of conditions and the following disclaimer in the 1212109SRekai.GonzalezAlberquilla@arm.com * documentation and/or other materials provided with the distribution; 1312109SRekai.GonzalezAlberquilla@arm.com * neither the name of the copyright holders nor the names of its 141689SN/A * contributors may be used to endorse or promote products derived from 159915Ssteve.reinhardt@amd.com * this software without specific prior written permission. 161689SN/A * 171689SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 181689SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 191689SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 201689SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 211689SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 221689SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 231689SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 241689SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 251689SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 261689SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 271689SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 281689SN/A * 291689SN/A * Authors: Nathan Binkert 301689SN/A * Steve Reinhardt 311689SN/A * Jaidev Patwardhan 321689SN/A * Zhengxing Li 331689SN/A * Deyuan Guo 341689SN/A */ 351689SN/A 361689SN/A#include <string> 371689SN/A#include <vector> 381689SN/A 391689SN/A#include "arch/mips/faults.hh" 402665Ssaidi@eecs.umich.edu#include "arch/mips/pagetable.hh" 412665Ssaidi@eecs.umich.edu#include "arch/mips/pra_constants.hh" 422665Ssaidi@eecs.umich.edu#include "arch/mips/tlb.hh" 431689SN/A#include "arch/mips/utility.hh" 441689SN/A#include "base/inifile.hh" 452292SN/A#include "base/str.hh" 462292SN/A#include "base/trace.hh" 471060SN/A#include "cpu/thread_context.hh" 486658Snate@binkert.org#include "debug/MipsPRA.hh" 496658Snate@binkert.org#include "debug/TLB.hh" 502165SN/A#include "mem/page_table.hh" 518793Sgblack@eecs.umich.edu#include "params/MipsTLB.hh" 522669Sktlim@umich.edu#include "sim/process.hh" 531681SN/A 546658Snate@binkert.orgusing namespace std; 551717SN/Ausing namespace MipsISA; 568232Snate@binkert.org 5712109SRekai.GonzalezAlberquilla@arm.com/////////////////////////////////////////////////////////////////////// 581060SN/A// 599919Ssteve.reinhardt@amd.com// MIPS TLB 609919Ssteve.reinhardt@amd.com// 612292SN/A 622292SN/Astatic inline mode_type 632292SN/AgetOperatingMode(MiscReg Stat) 641060SN/A{ 651060SN/A if ((Stat & 0x10000006) != 0 || (Stat & 0x18) ==0) { 669915Ssteve.reinhardt@amd.com return mode_kernel; 679915Ssteve.reinhardt@amd.com } else if ((Stat & 0x18) == 0x8) { 682107SN/A return mode_supervisor; 692107SN/A } else if ((Stat & 0x18) == 0x10) { 702669Sktlim@umich.edu return mode_user; 719920Syasuko.eckert@amd.com } else { 7212109SRekai.GonzalezAlberquilla@arm.com return mode_number; 7312109SRekai.GonzalezAlberquilla@arm.com } 7412109SRekai.GonzalezAlberquilla@arm.com} 7512109SRekai.GonzalezAlberquilla@arm.com 7612109SRekai.GonzalezAlberquilla@arm.com 7712109SRekai.GonzalezAlberquilla@arm.comTLB::TLB(const Params *p) 7812109SRekai.GonzalezAlberquilla@arm.com : BaseTLB(p), size(p->size), nlu(0) 7912109SRekai.GonzalezAlberquilla@arm.com{ 8012109SRekai.GonzalezAlberquilla@arm.com table = new PTE[size]; 812159SN/A memset(table, 0, sizeof(PTE[size])); 829915Ssteve.reinhardt@amd.com smallPages = 0; 839919Ssteve.reinhardt@amd.com} 8412105Snathanael.premillieu@arm.com 851060SN/ATLB::~TLB() 869915Ssteve.reinhardt@amd.com{ 8713501Sgabeblack@google.com if (table) 8812105Snathanael.premillieu@arm.com delete [] table; 899915Ssteve.reinhardt@amd.com} 9012109SRekai.GonzalezAlberquilla@arm.com 9112109SRekai.GonzalezAlberquilla@arm.com// look up an entry in the TLB 9212109SRekai.GonzalezAlberquilla@arm.comMipsISA::PTE * 9312109SRekai.GonzalezAlberquilla@arm.comTLB::lookup(Addr vpn, uint8_t asn) const 9412109SRekai.GonzalezAlberquilla@arm.com{ 959920Syasuko.eckert@amd.com // assume not found... 969920Syasuko.eckert@amd.com PTE *retval = NULL; 9712105Snathanael.premillieu@arm.com PageTable::const_iterator i = lookupTable.find(vpn); 9812105Snathanael.premillieu@arm.com if (i != lookupTable.end()) { 9912105Snathanael.premillieu@arm.com while (i->first == vpn) { 10012105Snathanael.premillieu@arm.com int index = i->second; 1019920Syasuko.eckert@amd.com PTE *pte = &table[index]; 1029915Ssteve.reinhardt@amd.com 10312105Snathanael.premillieu@arm.com /* 1KB TLB Lookup code - from MIPS ARM Volume III - Rev. 2.50 */ 1049915Ssteve.reinhardt@amd.com Addr Mask = pte->Mask; 10512105Snathanael.premillieu@arm.com Addr InvMask = ~Mask; 1069915Ssteve.reinhardt@amd.com Addr VPN = pte->VPN; 1079920Syasuko.eckert@amd.com if (((vpn & InvMask) == (VPN & InvMask)) && 10812109SRekai.GonzalezAlberquilla@arm.com (pte->G || (asn == pte->asid))) { 1099920Syasuko.eckert@amd.com // We have a VPN + ASID Match 11012105Snathanael.premillieu@arm.com retval = pte; 11112105Snathanael.premillieu@arm.com break; 11212105Snathanael.premillieu@arm.com } 11312109SRekai.GonzalezAlberquilla@arm.com ++i; 11412109SRekai.GonzalezAlberquilla@arm.com } 11512109SRekai.GonzalezAlberquilla@arm.com } 11612109SRekai.GonzalezAlberquilla@arm.com 11712109SRekai.GonzalezAlberquilla@arm.com DPRINTF(TLB, "lookup %#x, asn %#x -> %s ppn %#x\n", vpn, (int)asn, 11812109SRekai.GonzalezAlberquilla@arm.com retval ? "hit" : "miss", retval ? retval->PFN1 : 0); 11912109SRekai.GonzalezAlberquilla@arm.com return retval; 12012109SRekai.GonzalezAlberquilla@arm.com} 12112109SRekai.GonzalezAlberquilla@arm.com 12212109SRekai.GonzalezAlberquilla@arm.comMipsISA::PTE* 12312109SRekai.GonzalezAlberquilla@arm.comTLB::getEntry(unsigned Index) const 12412105Snathanael.premillieu@arm.com{ 12512105Snathanael.premillieu@arm.com // Make sure that Index is valid 1269920Syasuko.eckert@amd.com assert(Index<size); 1279915Ssteve.reinhardt@amd.com return &table[Index]; 1289915Ssteve.reinhardt@amd.com} 1299915Ssteve.reinhardt@amd.com 13012109SRekai.GonzalezAlberquilla@arm.comint 13112109SRekai.GonzalezAlberquilla@arm.comTLB::probeEntry(Addr vpn, uint8_t asn) const 13212109SRekai.GonzalezAlberquilla@arm.com{ 1331060SN/A // assume not found... 1342292SN/A int Ind = -1; 1352292SN/A PageTable::const_iterator i = lookupTable.find(vpn); 1362292SN/A if (i != lookupTable.end()) { 1372292SN/A while (i->first == vpn) { 1389915Ssteve.reinhardt@amd.com int index = i->second; 1399920Syasuko.eckert@amd.com PTE *pte = &table[index]; 14012109SRekai.GonzalezAlberquilla@arm.com 14112109SRekai.GonzalezAlberquilla@arm.com /* 1KB TLB Lookup code - from MIPS ARM Volume III - Rev. 2.50 */ 14212109SRekai.GonzalezAlberquilla@arm.com Addr Mask = pte->Mask; 14312109SRekai.GonzalezAlberquilla@arm.com Addr InvMask = ~Mask; 1441060SN/A Addr VPN = pte->VPN; 1459086Sandreas.hansson@arm.com if (((vpn & InvMask) == (VPN & InvMask)) && 1469086Sandreas.hansson@arm.com (pte->G || (asn == pte->asid))) { 1479086Sandreas.hansson@arm.com // We have a VPN + ASID Match 1489919Ssteve.reinhardt@amd.com Ind = index; 1499919Ssteve.reinhardt@amd.com break; 1509919Ssteve.reinhardt@amd.com } 1519919Ssteve.reinhardt@amd.com ++i; 1529086Sandreas.hansson@arm.com } 1539915Ssteve.reinhardt@amd.com } 15412105Snathanael.premillieu@arm.com DPRINTF(MipsPRA,"VPN: %x, asid: %d, Result of TLBP: %d\n",vpn,asn,Ind); 1559915Ssteve.reinhardt@amd.com return Ind; 1569915Ssteve.reinhardt@amd.com} 15712105Snathanael.premillieu@arm.com 15812109SRekai.GonzalezAlberquilla@arm.cominline Fault 15912109SRekai.GonzalezAlberquilla@arm.comTLB::checkCacheability(RequestPtr &req) 16012109SRekai.GonzalezAlberquilla@arm.com{ 16112109SRekai.GonzalezAlberquilla@arm.com Addr VAddrUncacheable = 0xA0000000; 16212109SRekai.GonzalezAlberquilla@arm.com // In MIPS, cacheability is controlled by certain bits of the virtual 1639920Syasuko.eckert@amd.com // address or by the TLB entry 1649920Syasuko.eckert@amd.com if ((req->getVaddr() & VAddrUncacheable) == VAddrUncacheable) { 16512105Snathanael.premillieu@arm.com // mark request as uncacheable 1669915Ssteve.reinhardt@amd.com req->setFlags(Request::UNCACHEABLE); 1679915Ssteve.reinhardt@amd.com } 1689915Ssteve.reinhardt@amd.com return NoFault; 1699915Ssteve.reinhardt@amd.com} 17012105Snathanael.premillieu@arm.com 17112105Snathanael.premillieu@arm.comvoid 17212105Snathanael.premillieu@arm.comTLB::insertAt(PTE &pte, unsigned Index, int _smallPages) 1739915Ssteve.reinhardt@amd.com{ 1741060SN/A smallPages = _smallPages; 1752292SN/A if (Index > size) { 17612105Snathanael.premillieu@arm.com warn("Attempted to write at index (%d) beyond TLB size (%d)", 1771060SN/A Index, size); 17812105Snathanael.premillieu@arm.com } else { 1791061SN/A // Update TLB 1801060SN/A DPRINTF(TLB, "TLB[%d]: %x %x %x %x\n", 18112106SRekai.GonzalezAlberquilla@arm.com Index, pte.Mask << 11, 18212106SRekai.GonzalezAlberquilla@arm.com ((pte.VPN << 11) | pte.asid), 1831060SN/A ((pte.PFN0 << 6) | (pte.C0 << 3) | 1841060SN/A (pte.D0 << 2) | (pte.V0 <<1) | pte.G), 18512105Snathanael.premillieu@arm.com ((pte.PFN1 <<6) | (pte.C1 << 3) | 1862455SN/A (pte.D1 << 2) | (pte.V1 <<1) | pte.G)); 18712105Snathanael.premillieu@arm.com if (table[Index].V0 == true || table[Index].V1 == true) { 1889915Ssteve.reinhardt@amd.com // Previous entry is valid 18913501Sgabeblack@google.com PageTable::iterator i = lookupTable.find(table[Index].VPN); 1902455SN/A lookupTable.erase(i); 1912455SN/A } 19212106SRekai.GonzalezAlberquilla@arm.com table[Index]=pte; 19312105Snathanael.premillieu@arm.com // Update fast lookup table 1942455SN/A lookupTable.insert(make_pair(table[Index].VPN, Index)); 1952455SN/A } 1961060SN/A} 1971060SN/A 19812109SRekai.GonzalezAlberquilla@arm.com// insert a new TLB entry 19912109SRekai.GonzalezAlberquilla@arm.comvoid 20012109SRekai.GonzalezAlberquilla@arm.comTLB::insert(Addr addr, PTE &pte) 20112109SRekai.GonzalezAlberquilla@arm.com{ 20212109SRekai.GonzalezAlberquilla@arm.com fatal("TLB Insert not yet implemented\n"); 20312109SRekai.GonzalezAlberquilla@arm.com} 20412109SRekai.GonzalezAlberquilla@arm.com 20512109SRekai.GonzalezAlberquilla@arm.comvoid 20612109SRekai.GonzalezAlberquilla@arm.comTLB::flushAll() 20712109SRekai.GonzalezAlberquilla@arm.com{ 20812109SRekai.GonzalezAlberquilla@arm.com DPRINTF(TLB, "flushAll\n"); 20912109SRekai.GonzalezAlberquilla@arm.com memset(table, 0, sizeof(PTE[size])); 21012109SRekai.GonzalezAlberquilla@arm.com lookupTable.clear(); 21112109SRekai.GonzalezAlberquilla@arm.com nlu = 0; 21212109SRekai.GonzalezAlberquilla@arm.com} 21312109SRekai.GonzalezAlberquilla@arm.com 21412109SRekai.GonzalezAlberquilla@arm.comvoid 21512109SRekai.GonzalezAlberquilla@arm.comTLB::serialize(ostream &os) 21612109SRekai.GonzalezAlberquilla@arm.com{ 21712109SRekai.GonzalezAlberquilla@arm.com SERIALIZE_SCALAR(size); 21812109SRekai.GonzalezAlberquilla@arm.com SERIALIZE_SCALAR(nlu); 21912109SRekai.GonzalezAlberquilla@arm.com 22012109SRekai.GonzalezAlberquilla@arm.com for (int i = 0; i < size; i++) { 22112109SRekai.GonzalezAlberquilla@arm.com nameOut(os, csprintf("%s.PTE%d", name(), i)); 22212109SRekai.GonzalezAlberquilla@arm.com table[i].serialize(os); 22312109SRekai.GonzalezAlberquilla@arm.com } 22412109SRekai.GonzalezAlberquilla@arm.com} 22512109SRekai.GonzalezAlberquilla@arm.com 22612109SRekai.GonzalezAlberquilla@arm.comvoid 22712109SRekai.GonzalezAlberquilla@arm.comTLB::unserialize(Checkpoint *cp, const string §ion) 22812109SRekai.GonzalezAlberquilla@arm.com{ 22912109SRekai.GonzalezAlberquilla@arm.com UNSERIALIZE_SCALAR(size); 23012109SRekai.GonzalezAlberquilla@arm.com UNSERIALIZE_SCALAR(nlu); 23112109SRekai.GonzalezAlberquilla@arm.com 23212109SRekai.GonzalezAlberquilla@arm.com for (int i = 0; i < size; i++) { 23312109SRekai.GonzalezAlberquilla@arm.com table[i].unserialize(cp, csprintf("%s.PTE%d", section, i)); 23412109SRekai.GonzalezAlberquilla@arm.com if (table[i].V0 || table[i].V1) { 23512109SRekai.GonzalezAlberquilla@arm.com lookupTable.insert(make_pair(table[i].VPN, i)); 23612109SRekai.GonzalezAlberquilla@arm.com } 23712109SRekai.GonzalezAlberquilla@arm.com } 23812109SRekai.GonzalezAlberquilla@arm.com} 23912109SRekai.GonzalezAlberquilla@arm.com 24012109SRekai.GonzalezAlberquilla@arm.comvoid 24112109SRekai.GonzalezAlberquilla@arm.comTLB::regStats() 24212109SRekai.GonzalezAlberquilla@arm.com{ 24312109SRekai.GonzalezAlberquilla@arm.com read_hits 24412109SRekai.GonzalezAlberquilla@arm.com .name(name() + ".read_hits") 24512109SRekai.GonzalezAlberquilla@arm.com .desc("DTB read hits") 24612109SRekai.GonzalezAlberquilla@arm.com ; 24712109SRekai.GonzalezAlberquilla@arm.com 24812109SRekai.GonzalezAlberquilla@arm.com read_misses 24912109SRekai.GonzalezAlberquilla@arm.com .name(name() + ".read_misses") 25012109SRekai.GonzalezAlberquilla@arm.com .desc("DTB read misses") 25112109SRekai.GonzalezAlberquilla@arm.com ; 25212109SRekai.GonzalezAlberquilla@arm.com 25312109SRekai.GonzalezAlberquilla@arm.com 25412109SRekai.GonzalezAlberquilla@arm.com read_accesses 25512109SRekai.GonzalezAlberquilla@arm.com .name(name() + ".read_accesses") 25612109SRekai.GonzalezAlberquilla@arm.com .desc("DTB read accesses") 25712109SRekai.GonzalezAlberquilla@arm.com ; 25812109SRekai.GonzalezAlberquilla@arm.com 25912109SRekai.GonzalezAlberquilla@arm.com write_hits 2609920Syasuko.eckert@amd.com .name(name() + ".write_hits") 26112105Snathanael.premillieu@arm.com .desc("DTB write hits") 2629920Syasuko.eckert@amd.com ; 26312105Snathanael.premillieu@arm.com 2649920Syasuko.eckert@amd.com write_misses 2659920Syasuko.eckert@amd.com .name(name() + ".write_misses") 26612106SRekai.GonzalezAlberquilla@arm.com .desc("DTB write misses") 26712106SRekai.GonzalezAlberquilla@arm.com ; 2689920Syasuko.eckert@amd.com 26912106SRekai.GonzalezAlberquilla@arm.com 2709920Syasuko.eckert@amd.com write_accesses 2719920Syasuko.eckert@amd.com .name(name() + ".write_accesses") 2722292SN/A .desc("DTB write accesses") 27312105Snathanael.premillieu@arm.com ; 2741060SN/A 27512105Snathanael.premillieu@arm.com hits 2761061SN/A .name(name() + ".hits") 2772690Sktlim@umich.edu .desc("DTB hits") 27812106SRekai.GonzalezAlberquilla@arm.com ; 2791060SN/A 28012105Snathanael.premillieu@arm.com misses 28112106SRekai.GonzalezAlberquilla@arm.com .name(name() + ".misses") 2821060SN/A .desc("DTB misses") 2831060SN/A ; 28412105Snathanael.premillieu@arm.com 2852455SN/A accesses 28612105Snathanael.premillieu@arm.com .name(name() + ".accesses") 2872455SN/A .desc("DTB accesses") 2882690Sktlim@umich.edu ; 28912106SRekai.GonzalezAlberquilla@arm.com 2902455SN/A hits = read_hits + write_hits; 29112109SRekai.GonzalezAlberquilla@arm.com misses = read_misses + write_misses; 29213501Sgabeblack@google.com accesses = read_accesses + write_accesses; 29312109SRekai.GonzalezAlberquilla@arm.com} 29412109SRekai.GonzalezAlberquilla@arm.com 29512109SRekai.GonzalezAlberquilla@arm.comFault 29612109SRekai.GonzalezAlberquilla@arm.comTLB::translateInst(RequestPtr req, ThreadContext *tc) 29712109SRekai.GonzalezAlberquilla@arm.com{ 29812109SRekai.GonzalezAlberquilla@arm.com if (FullSystem) 29912109SRekai.GonzalezAlberquilla@arm.com panic("translateInst not implemented in MIPS.\n"); 30012109SRekai.GonzalezAlberquilla@arm.com 30112109SRekai.GonzalezAlberquilla@arm.com Process * p = tc->getProcessPtr(); 30212109SRekai.GonzalezAlberquilla@arm.com 30312109SRekai.GonzalezAlberquilla@arm.com Fault fault = p->pTable->translate(req); 30412109SRekai.GonzalezAlberquilla@arm.com if (fault != NoFault) 30512109SRekai.GonzalezAlberquilla@arm.com return fault; 30612109SRekai.GonzalezAlberquilla@arm.com 30712109SRekai.GonzalezAlberquilla@arm.com return NoFault; 30812109SRekai.GonzalezAlberquilla@arm.com} 30912109SRekai.GonzalezAlberquilla@arm.com 31012109SRekai.GonzalezAlberquilla@arm.comFault 31112109SRekai.GonzalezAlberquilla@arm.comTLB::translateData(RequestPtr req, ThreadContext *tc, bool write) 31212109SRekai.GonzalezAlberquilla@arm.com{ 31312109SRekai.GonzalezAlberquilla@arm.com if (FullSystem) 31412109SRekai.GonzalezAlberquilla@arm.com panic("translateData not implemented in MIPS.\n"); 31512109SRekai.GonzalezAlberquilla@arm.com 3161060SN/A Process * p = tc->getProcessPtr(); 3171060SN/A 3189920Syasuko.eckert@amd.com Fault fault = p->pTable->translate(req); 31912105Snathanael.premillieu@arm.com if (fault != NoFault) 3209920Syasuko.eckert@amd.com return fault; 32112105Snathanael.premillieu@arm.com 3229920Syasuko.eckert@amd.com return NoFault; 3239920Syasuko.eckert@amd.com} 32412106SRekai.GonzalezAlberquilla@arm.com 3259920Syasuko.eckert@amd.comFault 32612106SRekai.GonzalezAlberquilla@arm.comTLB::translateAtomic(RequestPtr req, ThreadContext *tc, Mode mode) 3279920Syasuko.eckert@amd.com{ 32812109SRekai.GonzalezAlberquilla@arm.com if (mode == Execute) 32912109SRekai.GonzalezAlberquilla@arm.com return translateInst(req, tc); 33012109SRekai.GonzalezAlberquilla@arm.com else 33112109SRekai.GonzalezAlberquilla@arm.com return translateData(req, tc, mode == Write); 33212109SRekai.GonzalezAlberquilla@arm.com} 33312109SRekai.GonzalezAlberquilla@arm.com 33412109SRekai.GonzalezAlberquilla@arm.comvoid 33512109SRekai.GonzalezAlberquilla@arm.comTLB::translateTiming(RequestPtr req, ThreadContext *tc, 33612109SRekai.GonzalezAlberquilla@arm.com Translation *translation, Mode mode) 33712109SRekai.GonzalezAlberquilla@arm.com{ 33812109SRekai.GonzalezAlberquilla@arm.com assert(translation); 33912109SRekai.GonzalezAlberquilla@arm.com translation->finish(translateAtomic(req, tc, mode), req, tc, mode); 34012109SRekai.GonzalezAlberquilla@arm.com} 34112109SRekai.GonzalezAlberquilla@arm.com 34212109SRekai.GonzalezAlberquilla@arm.comFault 34312109SRekai.GonzalezAlberquilla@arm.comTLB::translateFunctional(RequestPtr req, ThreadContext *tc, Mode mode) 34412109SRekai.GonzalezAlberquilla@arm.com{ 34512109SRekai.GonzalezAlberquilla@arm.com panic("Not implemented\n"); 34612109SRekai.GonzalezAlberquilla@arm.com return NoFault; 3471060SN/A} 3481060SN/A 3499915Ssteve.reinhardt@amd.comFault 3509915Ssteve.reinhardt@amd.comTLB::finalizePhysical(RequestPtr req, ThreadContext *tc, Mode mode) const 351{ 352 return NoFault; 353} 354 355 356MipsISA::PTE & 357TLB::index(bool advance) 358{ 359 PTE *pte = &table[nlu]; 360 361 if (advance) 362 nextnlu(); 363 364 return *pte; 365} 366 367MipsISA::TLB * 368MipsTLBParams::create() 369{ 370 return new TLB(this); 371} 372