tlb.cc (5912:d113f6def227) tlb.cc (5917:7d7df4ad7486)
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 *

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

644 DPRINTF(TLB, "Mapping %#x to %#x\n", alignedVaddr,
645 newEntry.pageStart());
646 entry = insert(alignedVaddr, newEntry);
647 }
648 DPRINTF(TLB, "Miss was serviced.\n");
649#endif
650 }
651 // Do paging protection checks.
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 *

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

644 DPRINTF(TLB, "Mapping %#x to %#x\n", alignedVaddr,
645 newEntry.pageStart());
646 entry = insert(alignedVaddr, newEntry);
647 }
648 DPRINTF(TLB, "Miss was serviced.\n");
649#endif
650 }
651 // Do paging protection checks.
652 bool inUser = (csAttr.dpl == 3 &&
653 !(flags & (CPL0FlagBit << FlagShift)));
654 if (inUser && !entry->user ||
655 write && !entry->writable) {
656 // The page must have been present to get into the TLB in
657 // the first place. We'll assume the reserved bits are
658 // fine even though we're not checking them.
659 return new PageFault(vaddr, true, write,
660 inUser, false, execute);
661 }
662
663
652 DPRINTF(TLB, "Entry found with paddr %#x, "
653 "doing protection checks.\n", entry->paddr);
654 Addr paddr = entry->paddr | (vaddr & (entry->size-1));
655 DPRINTF(TLB, "Translated %#x -> %#x.\n", vaddr, paddr);
656 req->setPaddr(paddr);
657 } else {
658 //Use the address which already has segmentation applied.
659 DPRINTF(TLB, "Paging disabled.\n");

--- 125 unchanged lines hidden ---
664 DPRINTF(TLB, "Entry found with paddr %#x, "
665 "doing protection checks.\n", entry->paddr);
666 Addr paddr = entry->paddr | (vaddr & (entry->size-1));
667 DPRINTF(TLB, "Translated %#x -> %#x.\n", vaddr, paddr);
668 req->setPaddr(paddr);
669 } else {
670 //Use the address which already has segmentation applied.
671 DPRINTF(TLB, "Paging disabled.\n");

--- 125 unchanged lines hidden ---