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; --- 65 unchanged lines hidden (view full) --- 74 75 PageTable(Process *_process, Addr _pageSize = TheISA::VMPageSize); 76 77 ~PageTable(); 78 79 Addr pageAlign(Addr a) { return (a & ~offsetMask); } 80 Addr pageOffset(Addr a) { return (a & offsetMask); } 81 |
82 void allocate(Addr vaddr, int64_t size, bool clobber = false); |
83 void remap(Addr vaddr, int64_t size, Addr new_vaddr); 84 void deallocate(Addr vaddr, int64_t size); 85 86 /** |
87 * Check if any pages in a region are already allocated 88 * @param vaddr The starting virtual address of the region. 89 * @param size The length of the region. 90 * @return True if no pages in the region are mapped. 91 */ 92 bool isUnmapped(Addr vaddr, int64_t size); 93 94 /** |
95 * Lookup function 96 * @param vaddr The virtual address. 97 * @return entry The page table entry corresponding to vaddr. 98 */ 99 bool lookup(Addr vaddr, TheISA::TlbEntry &entry); 100 101 /** 102 * Translate function --- 42 unchanged lines hidden --- |