1/* 2 * Copyright (c) 2003 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 79 unchanged lines hidden (view full) --- 88{ 89 assert(pageOffset(vaddr) == 0); 90 assert(pageOffset(new_vaddr) == 0); 91 92 DPRINTF(MMU, "moving pages from vaddr %08p to %08p, size = %d\n", vaddr, 93 new_vaddr, size); 94 95 for (; size > 0; size -= pageSize, vaddr += pageSize, new_vaddr += pageSize) { |
96 assert(pTable.find(vaddr) != pTable.end()); |
97 |
98 pTable[new_vaddr] = pTable[vaddr]; 99 pTable.erase(vaddr); 100 pTable[new_vaddr].updateVaddr(new_vaddr); 101 updateCache(new_vaddr, pTable[new_vaddr]); 102 } 103} 104 105void 106PageTable::unmap(Addr vaddr, int64_t size) 107{ 108 assert(pageOffset(vaddr) == 0); 109 110 DPRINTF(MMU, "Unmapping page: %#x-%#x\n", vaddr, vaddr+ size); 111 112 for (; size > 0; size -= pageSize, vaddr += pageSize) { |
113 assert(pTable.find(vaddr) != pTable.end()); |
114 |
115 pTable.erase(vaddr); 116 } 117 118} 119 120bool 121PageTable::isUnmapped(Addr vaddr, int64_t size) 122{ --- 112 unchanged lines hidden --- |