tlb.cc (6428:9e35cdc95e81) tlb.cc (6737:b3ab661715ac)
1/*
2 * Copyright (c) 2007-2008 The Hewlett-Packard Development Company
3 * All rights reserved.
4 *
5 * Redistribution and use of this software in source and binary forms,
6 * with or without modification, are permitted provided that the
7 * following conditions are met:
8 *

--- 618 unchanged lines hidden (view full) ---

627#else
628 DPRINTF(TLB, "Handling a TLB miss for "
629 "address %#x at pc %#x.\n",
630 vaddr, tc->readPC());
631
632 Process *p = tc->getProcessPtr();
633 TlbEntry newEntry;
634 bool success = p->pTable->lookup(vaddr, newEntry);
1/*
2 * Copyright (c) 2007-2008 The Hewlett-Packard Development Company
3 * All rights reserved.
4 *
5 * Redistribution and use of this software in source and binary forms,
6 * with or without modification, are permitted provided that the
7 * following conditions are met:
8 *

--- 618 unchanged lines hidden (view full) ---

627#else
628 DPRINTF(TLB, "Handling a TLB miss for "
629 "address %#x at pc %#x.\n",
630 vaddr, tc->readPC());
631
632 Process *p = tc->getProcessPtr();
633 TlbEntry newEntry;
634 bool success = p->pTable->lookup(vaddr, newEntry);
635 if(!success && mode != Execute) {
635 if (!success && mode != Execute) {
636 p->checkAndAllocNextPage(vaddr);
637 success = p->pTable->lookup(vaddr, newEntry);
638 }
636 p->checkAndAllocNextPage(vaddr);
637 success = p->pTable->lookup(vaddr, newEntry);
638 }
639 if(!success) {
640 panic("Tried to execute unmapped address %#x.\n", vaddr);
639 if (!success) {
640 const char *modeStr = "";
641 if (mode == Execute)
642 modeStr = "execute";
643 else if (mode == Read)
644 modeStr = "read";
645 else if (mode == Write)
646 modeStr = "write";
647 else
648 modeStr = "?";
649 panic("Tried to %s unmapped address %#x.\n",
650 modeStr, vaddr);
641 } else {
642 Addr alignedVaddr = p->pTable->pageAlign(vaddr);
643 DPRINTF(TLB, "Mapping %#x to %#x\n", alignedVaddr,
644 newEntry.pageStart());
645 entry = insert(alignedVaddr, newEntry);
646 }
647 DPRINTF(TLB, "Miss was serviced.\n");
648#endif

--- 112 unchanged lines hidden ---
651 } else {
652 Addr alignedVaddr = p->pTable->pageAlign(vaddr);
653 DPRINTF(TLB, "Mapping %#x to %#x\n", alignedVaddr,
654 newEntry.pageStart());
655 entry = insert(alignedVaddr, newEntry);
656 }
657 DPRINTF(TLB, "Miss was serviced.\n");
658#endif

--- 112 unchanged lines hidden ---