Another merge with the main repository.
authorGabe Black <gblack@eecs.umich.edu>
Sat, 7 Jan 2012 10:16:37 +0000 (02:16 -0800)
committerGabe Black <gblack@eecs.umich.edu>
Sat, 7 Jan 2012 10:16:37 +0000 (02:16 -0800)
1  2 
src/arch/x86/tlb.cc
src/base/remote_gdb.cc
src/cpu/o3/fetch_impl.hh
src/dev/io_device.cc
src/mem/page_table.cc

index 53f7f978e4b46e01f9a2f2f9990722cec695c0ba,131909e50f3c049c8427aa219e8e8925fdf16b64..ff65eb04cce8dd46f91b4eaf75dcba3cd8f223f5
@@@ -287,41 -293,44 +287,44 @@@ TLB::translate(RequestPtr req, ThreadCo
              // The vaddr already has the segment base applied.
              TlbEntry *entry = lookup(vaddr);
              if (!entry) {
 -#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;
                      }
 -                }
 -                if (!success) {
 -                    return new PageFault(vaddr, true, mode, true, false);
 +                    entry = lookup(vaddr);
 +                    assert(entry);
                  } else {
 -                    Addr alignedVaddr = p->pTable->pageAlign(vaddr);
 -                    DPRINTF(TLB, "Mapping %#x to %#x\n", alignedVaddr,
 -                            newEntry.pageStart());
 -                    entry = insert(alignedVaddr, newEntry);
 +                    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");
                  }
 -                DPRINTF(TLB, "Miss was serviced.\n");
 -#endif
              }
+             DPRINTF(TLB, "Entry found with paddr %#x, "
+                     "doing protection checks.\n", entry->paddr);
              // Do paging protection checks.
              bool inUser = (m5Reg.cpl == 3 &&
                      !(flags & (CPL0FlagBit << FlagShift)));
Simple merge
Simple merge
Simple merge
Simple merge