tlb.cc (12455:c88f0b37f433) | tlb.cc (12461:a4cb506cda74) |
---|---|
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(); | 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 TlbEntry *newEntry = p->pTable->lookup(vaddr); 361 if (!newEntry && mode != Execute) { | 360 const EmulationPageTable::Entry *pte = 361 p->pTable->lookup(vaddr); 362 if (!pte && mode != Execute) { |
362 // Check if we just need to grow the stack. 363 if (p->fixupStackFault(vaddr)) { 364 // If we did, lookup the entry for the new page. | 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. |
365 newEntry = p->pTable->lookup(vaddr); | 366 pte = p->pTable->lookup(vaddr); |
366 } 367 } | 367 } 368 } |
368 if (!newEntry) { | 369 if (!pte) { |
369 return std::make_shared<PageFault>(vaddr, true, mode, 370 true, false); 371 } else { 372 Addr alignedVaddr = p->pTable->pageAlign(vaddr); 373 DPRINTF(TLB, "Mapping %#x to %#x\n", alignedVaddr, | 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, |
374 newEntry->pageStart()); 375 entry = insert(alignedVaddr, *newEntry); | 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)); |
376 } 377 DPRINTF(TLB, "Miss was serviced.\n"); 378 } 379 } 380 381 DPRINTF(TLB, "Entry found with paddr %#x, " 382 "doing protection checks.\n", entry->paddr); 383 // Do paging protection checks. --- 137 unchanged lines hidden --- | 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 --- |