pagetable.hh (5569:baeee670d4ce) | pagetable.hh (5570:13592d41f290) |
---|---|
1/* 2 * Copyright (c) 2002-2005 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; --- 43 unchanged lines hidden (view full) --- 52 53 Addr vpn() const { return (addr & ImplMask) >> PageShift; } 54 Addr page() const { return addr & PageMask; } 55 Addr offset() const { return addr & PageOffset; } 56 57 Addr level3() const 58 { return PteAddr(addr >> PageShift); } 59 Addr level2() const | 1/* 2 * Copyright (c) 2002-2005 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; --- 43 unchanged lines hidden (view full) --- 52 53 Addr vpn() const { return (addr & ImplMask) >> PageShift; } 54 Addr page() const { return addr & PageMask; } 55 Addr offset() const { return addr & PageOffset; } 56 57 Addr level3() const 58 { return PteAddr(addr >> PageShift); } 59 Addr level2() const |
60 { return PteAddr(addr >> NPtePageShift + PageShift); } | 60 { return PteAddr(addr >> (NPtePageShift + PageShift)); } |
61 Addr level1() const | 61 Addr level1() const |
62 { return PteAddr(addr >> 2 * NPtePageShift + PageShift); } | 62 { return PteAddr(addr >> (2 * NPtePageShift + PageShift)); } |
63}; 64 65struct PageTableEntry 66{ 67 PageTableEntry(uint64_t e) : entry(e) {} 68 uint64_t entry; 69 operator uint64_t() const { return entry; } 70 const PageTableEntry &operator=(uint64_t e) { entry = e; return *this; } --- 69 unchanged lines hidden --- | 63}; 64 65struct PageTableEntry 66{ 67 PageTableEntry(uint64_t e) : entry(e) {} 68 uint64_t entry; 69 operator uint64_t() const { return entry; } 70 const PageTableEntry &operator=(uint64_t e) { entry = e; return *this; } --- 69 unchanged lines hidden --- |