1/* 2 * Copyright (c) 2001-2005 The Regents of The University of Michigan 3 * Copyright (c) 2007 MIPS Technologies, Inc. 4 * Copyright (c) 2007-2008 The Florida State University 5 * Copyright (c) 2009 The University of Edinburgh 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 104 unchanged lines hidden (view full) --- 113 assert(Index<size); 114 return &table[Index]; 115} 116 117int 118TLB::probeEntry(Addr vpn,uint8_t asn) const 119{ 120 // assume not found... |
121 int Ind = -1; 122 PageTable::const_iterator i = lookupTable.find(vpn); 123 if (i != lookupTable.end()) { 124 while (i->first == vpn) { 125 int index = i->second; 126 PowerISA::PTE *pte = &table[index]; 127 Addr Mask = pte->Mask; 128 Addr InvMask = ~Mask; 129 Addr VPN = pte->VPN; 130 if (((vpn & InvMask) == (VPN & InvMask)) 131 && (pte->G || (asn == pte->asid))) { 132 133 // We have a VPN + ASID Match |
134 Ind = index; 135 break; 136 } 137 ++i; 138 } 139 } 140 141 DPRINTF(Power, "VPN: %x, asid: %d, Result of TLBP: %d\n", vpn, asn, Ind); --- 203 unchanged lines hidden --- |