Lines Matching +full:page +full:- +full:level

1 /*-
2 * SPDX-License-Identifier: BSD-4-Clause
42 * Page Table Entries
46 /* 32-bit PTE */
56 /* 64-bit (long) PTE */
82 /* 32-bit PTE definitions */
100 #define PTE_SW 0x00000001 /* Super. Write-Only (U: RO, S: RW) */
106 #define PTE_EXEC 0x00000200 /* pseudo bit in attrs; page is exec */
108 /* 64-bit PTE definitions */
118 #define LPTE_BIG 0x0000000000000004ULL /* 4kb/16Mb page */
123 #define LP_4K_16M 0x38 /* 4KB base, 16MB actual page size */
125 #define EXTEND_PTE(x) UINT64_C(x) /* make constants 64-bit */
141 #define LPTE_SW EXTEND_PTE( PTE_SW ) /* Super. Write-Only */
150 #define HPT_SP_MASK (HPT_SP_SIZE - 1)
232 * Page Table Entry definitions and macros.
234 * RPN need only be 32-bit because Book-E has 36-bit addresses, and the smallest
235 * page size is 4k (12-bit mask), so RPN can really fit into 24 bits.
277 * Page Table Entry definitions and macros.
279 * We use the hardware page table entry format:
282 * ---------------------------------------------------------------
284 * ---------------------------------------------------------------
288 #define PTE_TSIZE_SHIFT (63-54)
290 #define PTE_TSIZE_SHIFT_DIRECT (63-55)
292 #define PTE_PS_DIRECT(ps) (ps<<PTE_TSIZE_SHIFT_DIRECT) /* Direct Entry Page Size */
293 #define PTE_PS(ps) (ps<<PTE_TSIZE_SHIFT) /* Page Size */
312 /* Book-E page table format, broken out for the generic pmap.h. */
320 * 4K page size
321 * +-----+-----------+-------+-------------+-------------+----------------+
322 * | - | pg_root |pdir_l1| dir# | pte# | off in 4K page |
323 * +-----+-----------+-------+-------------+-------------+----------------+
326 * index in 1 page of pointers
328 * 1st level - Root page table
331 * second level entity, i.e. the page table directory (pdir).
337 #define PG_ROOT_NUM (PG_ROOT_H - PG_ROOT_L + 1)
338 #define PG_ROOT_MASK ((1 << PG_ROOT_NUM) - 1)
344 * 2nd level - page directory directory (pdir l1)
347 * second level entity, i.e. the actual page table (ptbl).
349 #define PDIR_L1_H (PG_ROOT_L-1)
351 #define PDIR_L1_NUM (PDIR_L1_H-PDIR_L1_L+1)
353 #define PDIR_L1_MASK ((1<<PDIR_L1_NUM)-1)
361 * 3rd level - page table directory (pdir)
364 * second level entity, i.e. the actual page table (ptbl).
366 #define PDIR_H (PDIR_L1_L-1)
368 #define PDIR_NUM (PDIR_H-PDIR_L+1)
370 #define PDIR_MASK ((1<<PDIR_NUM)-1)
378 * 4th level - page table (ptbl)
380 * Page table covers PTBL_NENTRIES page table entries. Page
382 * for a single page.
384 #define PTBL_H (PDIR_L-1)
386 #define PTBL_NUM (PTBL_H-PTBL_L+1)
387 #define PTBL_MASK ((1<<PTBL_NUM)-1)
397 * 1st level - page table directory (pdir)
400 * second level entity, i.e. the actual page table (ptbl).
404 #define PDIR_MASK (~(PDIR_SIZE - 1))
405 #define PDIR_NENTRIES 1024 /* number of page tables in pdir */
413 * 2nd level - page table (ptbl)
415 * Page table covers 1024 page table entries. Page
417 * for a single page.
421 #define PTBL_MASK ((PDIR_SIZE - 1) & ~((1 << PAGE_SHIFT) - 1))