tlb.cc (8798:adaa92be9037) | tlb.cc (8806:669e93d79ed9) |
---|---|
1/* 2 * Copyright (c) 2001-2005 The Regents of The University of Michigan 3 * Copyright (c) 2007 MIPS Technologies, Inc. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 281 unchanged lines hidden (view full) --- 290 hits = read_hits + write_hits; 291 misses = read_misses + write_misses; 292 accesses = read_accesses + write_accesses; 293} 294 295Fault 296TLB::translateInst(RequestPtr req, ThreadContext *tc) 297{ | 1/* 2 * Copyright (c) 2001-2005 The Regents of The University of Michigan 3 * Copyright (c) 2007 MIPS Technologies, Inc. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 281 unchanged lines hidden (view full) --- 290 hits = read_hits + write_hits; 291 misses = read_misses + write_misses; 292 accesses = read_accesses + write_accesses; 293} 294 295Fault 296TLB::translateInst(RequestPtr req, ThreadContext *tc) 297{ |
298 if (!FullSystem) { 299 Process * p = tc->getProcessPtr(); | 298 if (FullSystem) 299 panic("translateInst not implemented in MIPS.\n"); |
300 | 300 |
301 Fault fault = p->pTable->translate(req); 302 if (fault != NoFault) 303 return fault; | 301 Process * p = tc->getProcessPtr(); |
304 | 302 |
305 return NoFault; 306 } else { 307 panic("translateInst not implemented in MIPS.\n"); 308 } | 303 Fault fault = p->pTable->translate(req); 304 if (fault != NoFault) 305 return fault; 306 307 return NoFault; |
309} 310 311Fault 312TLB::translateData(RequestPtr req, ThreadContext *tc, bool write) 313{ | 308} 309 310Fault 311TLB::translateData(RequestPtr req, ThreadContext *tc, bool write) 312{ |
314 if (!FullSystem) { 315 Process * p = tc->getProcessPtr(); | 313 if (FullSystem) 314 panic("translateData not implemented in MIPS.\n"); |
316 | 315 |
317 Fault fault = p->pTable->translate(req); 318 if (fault != NoFault) 319 return fault; | 316 Process * p = tc->getProcessPtr(); |
320 | 317 |
321 return NoFault; 322 } else { 323 panic("translateData not implemented in MIPS.\n"); 324 } | 318 Fault fault = p->pTable->translate(req); 319 if (fault != NoFault) 320 return fault; 321 322 return NoFault; |
325} 326 327Fault 328TLB::translateAtomic(RequestPtr req, ThreadContext *tc, Mode mode) 329{ 330 if (mode == Execute) 331 return translateInst(req, tc); 332 else --- 28 unchanged lines hidden --- | 323} 324 325Fault 326TLB::translateAtomic(RequestPtr req, ThreadContext *tc, Mode mode) 327{ 328 if (mode == Execute) 329 return translateInst(req, tc); 330 else --- 28 unchanged lines hidden --- |