page_table.cc (2809:9cb5fba079ed) | page_table.cc (2979:88f767122b58) |
---|---|
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; --- 50 unchanged lines hidden (view full) --- 59 pTableCache[2].vaddr = 0; 60} 61 62PageTable::~PageTable() 63{ 64} 65 66Fault | 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; --- 50 unchanged lines hidden (view full) --- 59 pTableCache[2].vaddr = 0; 60} 61 62PageTable::~PageTable() 63{ 64} 65 66Fault |
67PageTable::page_check(Addr addr, int size) const | 67PageTable::page_check(Addr addr, int64_t size) const |
68{ 69 if (size < sizeof(uint64_t)) { 70 if (!isPowerOf2(size)) { 71 panic("Invalid request size!\n"); 72 return genMachineCheckFault(); 73 } 74 75 if ((size - 1) & addr) --- 11 unchanged lines hidden (view full) --- 87 88 return NoFault; 89} 90 91 92 93 94void | 68{ 69 if (size < sizeof(uint64_t)) { 70 if (!isPowerOf2(size)) { 71 panic("Invalid request size!\n"); 72 return genMachineCheckFault(); 73 } 74 75 if ((size - 1) & addr) --- 11 unchanged lines hidden (view full) --- 87 88 return NoFault; 89} 90 91 92 93 94void |
95PageTable::allocate(Addr vaddr, int size) | 95PageTable::allocate(Addr vaddr, int64_t size) |
96{ 97 // starting address must be page aligned 98 assert(pageOffset(vaddr) == 0); 99 100 for (; size > 0; size -= pageSize, vaddr += pageSize) { 101 m5::hash_map<Addr,Addr>::iterator iter = pTable.find(vaddr); 102 103 if (iter != pTable.end()) { --- 58 unchanged lines hidden --- | 96{ 97 // starting address must be page aligned 98 assert(pageOffset(vaddr) == 0); 99 100 for (; size > 0; size -= pageSize, vaddr += pageSize) { 101 m5::hash_map<Addr,Addr>::iterator iter = pTable.find(vaddr); 102 103 if (iter != pTable.end()) { --- 58 unchanged lines hidden --- |