1/* |
2 * Copyright (c) 2010 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software 9 * licensed hereunder. You may use the software subject to the license 10 * terms below provided that you ensure that this notice is replicated 11 * unmodified and in its entirety in all distributions of the software, 12 * modified or unmodified, in source code or in binary form. 13 * |
14 * Copyright (c) 2001-2005 The Regents of The University of Michigan 15 * Copyright (c) 2007 MIPS Technologies, Inc. 16 * Copyright (c) 2007-2008 The Florida State University 17 * All rights reserved. 18 * 19 * Redistribution and use in source and binary forms, with or without 20 * modification, are permitted provided that the following conditions are 21 * met: redistributions of source code must retain the above copyright --- 263 unchanged lines hidden (view full) --- 285 hits = read_hits + write_hits; 286 misses = read_misses + write_misses; 287 accesses = read_accesses + write_accesses; 288} 289 290Fault 291TLB::translateAtomic(RequestPtr req, ThreadContext *tc, Mode mode) 292{ |
293 Addr vaddr = req->getVaddr() & ~PcModeMask; |
294#if !FULL_SYSTEM 295 Process * p = tc->getProcessPtr(); 296 |
297 Addr paddr; 298 if (!p->pTable->translate(vaddr, paddr)) 299 return Fault(new GenericPageTableFault(vaddr)); 300 req->setPaddr(paddr); |
301 302 return NoFault; 303#else 304 SCTLR sctlr = tc->readMiscReg(MISCREG_SCTLR); 305 if (!sctlr.m) { |
306 req->setPaddr(vaddr); |
307 return NoFault; 308 } 309 panic("MMU translation not implemented\n"); 310 return NoFault; 311 312 313#endif 314} --- 25 unchanged lines hidden --- |