1/* 2 * Copyright (c) 2007-2008 The Hewlett-Packard Development Company 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 --- 343 unchanged lines hidden (view full) --- 352 // This gets ignored in atomic mode. 353 delayedResponse = true; 354 return fault; 355 } 356 entry = lookup(vaddr); 357 assert(entry); 358 } else { 359 Process *p = tc->getProcessPtr(); |
360 const EmulationPageTable::Entry *pte = 361 p->pTable->lookup(vaddr); 362 if (!pte && mode != Execute) { |
363 // Check if we just need to grow the stack. 364 if (p->fixupStackFault(vaddr)) { 365 // If we did, lookup the entry for the new page. |
366 pte = p->pTable->lookup(vaddr); |
367 } 368 } |
369 if (!pte) { |
370 return std::make_shared<PageFault>(vaddr, true, mode, 371 true, false); 372 } else { 373 Addr alignedVaddr = p->pTable->pageAlign(vaddr); 374 DPRINTF(TLB, "Mapping %#x to %#x\n", alignedVaddr, |
375 pte->paddr); 376 entry = insert(alignedVaddr, TlbEntry( 377 p->pTable->pid(), alignedVaddr, pte->paddr, 378 pte->flags & EmulationPageTable::Uncacheable, 379 pte->flags & EmulationPageTable::ReadOnly)); |
380 } 381 DPRINTF(TLB, "Miss was serviced.\n"); 382 } 383 } 384 385 DPRINTF(TLB, "Entry found with paddr %#x, " 386 "doing protection checks.\n", entry->paddr); 387 // Do paging protection checks. --- 137 unchanged lines hidden --- |