46a47
> #include "arch/x86/pagetable_walker.hh"
58,60c59
< #if FULL_SYSTEM
< #include "arch/x86/pagetable_walker.hh"
< #else
---
> #if !FULL_SYSTEM
64a64,65
> #include "sim/full_system.hh"
>
75d75
< #if FULL_SYSTEM
78d77
< #endif
296,317c295,300
< #if FULL_SYSTEM
< Fault fault = walker->start(tc, translation, req, mode);
< if (timing || fault != NoFault) {
< // This gets ignored in atomic mode.
< delayedResponse = true;
< return fault;
< }
< entry = lookup(vaddr);
< assert(entry);
< #else
< DPRINTF(TLB, "Handling a TLB miss for "
< "address %#x at pc %#x.\n",
< vaddr, tc->instAddr());
<
< Process *p = tc->getProcessPtr();
< TlbEntry newEntry;
< bool success = p->pTable->lookup(vaddr, newEntry);
< if (!success && mode != Execute) {
< // Check if we just need to grow the stack.
< if (p->fixupStackFault(vaddr)) {
< // If we did, lookup the entry for the new page.
< success = p->pTable->lookup(vaddr, newEntry);
---
> if (FullSystem) {
> Fault fault = walker->start(tc, translation, req, mode);
> if (timing || fault != NoFault) {
> // This gets ignored in atomic mode.
> delayedResponse = true;
> return fault;
319,321c302,303
< }
< if (!success) {
< return new PageFault(vaddr, true, mode, true, false);
---
> entry = lookup(vaddr);
> assert(entry);
323,328c305,328
< Addr alignedVaddr = p->pTable->pageAlign(vaddr);
< DPRINTF(TLB, "Mapping %#x to %#x\n", alignedVaddr,
< newEntry.pageStart());
< entry = insert(alignedVaddr, newEntry);
< }
< DPRINTF(TLB, "Miss was serviced.\n");
---
> #if !FULL_SYSTEM
> DPRINTF(TLB, "Handling a TLB miss for "
> "address %#x at pc %#x.\n",
> vaddr, tc->instAddr());
>
> Process *p = tc->getProcessPtr();
> TlbEntry newEntry;
> bool success = p->pTable->lookup(vaddr, newEntry);
> if (!success && mode != Execute) {
> // Check if we just need to grow the stack.
> if (p->fixupStackFault(vaddr)) {
> // If we did, lookup the entry for the new page.
> success = p->pTable->lookup(vaddr, newEntry);
> }
> }
> if (!success) {
> return new PageFault(vaddr, true, mode, true, false);
> } else {
> Addr alignedVaddr = p->pTable->pageAlign(vaddr);
> DPRINTF(TLB, "Mapping %#x to %#x\n", alignedVaddr,
> newEntry.pageStart());
> entry = insert(alignedVaddr, newEntry);
> }
> DPRINTF(TLB, "Miss was serviced.\n");
329a330
> }
331,333d331
<
< DPRINTF(TLB, "Entry found with paddr %#x, "
< "doing protection checks.\n", entry->paddr);
350a349,351
>
> DPRINTF(TLB, "Entry found with paddr %#x, "
> "doing protection checks.\n", entry->paddr);