pagetable.hh (11800:54436a1784dc) | pagetable.hh (12457:b9b7bdb5a8ac) |
---|---|
1/* 2 * Copyright (c) 2014 Advanced Micro Devices, Inc. 3 * Copyright (c) 2007 The Hewlett-Packard Development Company 4 * All rights reserved. 5 * 6 * The license below extends only to copyright in the software and shall 7 * not be construed as granting a license to any other intellectual 8 * property including but not limited to intellectual property relating --- 165 unchanged lines hidden (view full) --- 174 void setPTEFields(PageTableEntry& PTE, uint64_t flags = 0) 175 { 176 PTE.p = flags & PTE_NotPresent ? 0 : 1; 177 PTE.pcd = flags & PTE_Uncacheable ? 1 : 0; 178 PTE.w = flags & PTE_ReadOnly ? 0 : 1; 179 PTE.u = flags & PTE_Supervisor ? 0 : 1; 180 } 181 | 1/* 2 * Copyright (c) 2014 Advanced Micro Devices, Inc. 3 * Copyright (c) 2007 The Hewlett-Packard Development Company 4 * All rights reserved. 5 * 6 * The license below extends only to copyright in the software and shall 7 * not be construed as granting a license to any other intellectual 8 * property including but not limited to intellectual property relating --- 165 unchanged lines hidden (view full) --- 174 void setPTEFields(PageTableEntry& PTE, uint64_t flags = 0) 175 { 176 PTE.p = flags & PTE_NotPresent ? 0 : 1; 177 PTE.pcd = flags & PTE_Uncacheable ? 1 : 0; 178 PTE.w = flags & PTE_ReadOnly ? 0 : 1; 179 PTE.u = flags & PTE_Supervisor ? 0 : 1; 180 } 181 |
182 /** returns the physical memory address of the page table */ 183 Addr getBasePtr(ThreadContext* tc) 184 { 185 CR3 cr3 = pageTablePhysAddr; 186 DPRINTF(MMU, "CR3: %d\n", cr3); 187 return cr3.longPdtb; 188 } 189 | |
190 /** returns the page number out of a page table entry */ 191 Addr getPnum(PageTableEntry PTE) 192 { 193 return PTE.base; 194 } 195 196 bool isUncacheable(const PageTableEntry PTE) 197 { --- 27 unchanged lines hidden --- | 182 /** returns the page number out of a page table entry */ 183 Addr getPnum(PageTableEntry PTE) 184 { 185 return PTE.base; 186 } 187 188 bool isUncacheable(const PageTableEntry PTE) 189 { --- 27 unchanged lines hidden --- |