Warning: This file is not a C or C++ file. It does not have highlighting.
| 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
|---|---|
| 2 | #ifndef _ASM_X86_PGTABLE_3LEVEL_DEFS_H |
| 3 | #define _ASM_X86_PGTABLE_3LEVEL_DEFS_H |
| 4 | |
| 5 | #ifndef __ASSEMBLER__ |
| 6 | #include <linux/types.h> |
| 7 | |
| 8 | typedef u64 pteval_t; |
| 9 | typedef u64 pmdval_t; |
| 10 | typedef u64 pudval_t; |
| 11 | typedef u64 p4dval_t; |
| 12 | typedef u64 pgdval_t; |
| 13 | typedef u64 pgprotval_t; |
| 14 | |
| 15 | typedef union { |
| 16 | struct { |
| 17 | unsigned long pte_low, pte_high; |
| 18 | }; |
| 19 | pteval_t pte; |
| 20 | } pte_t; |
| 21 | |
| 22 | typedef union { |
| 23 | struct { |
| 24 | unsigned long pmd_low, pmd_high; |
| 25 | }; |
| 26 | pmdval_t pmd; |
| 27 | } pmd_t; |
| 28 | #endif /* !__ASSEMBLER__ */ |
| 29 | |
| 30 | #define ARCH_PAGE_TABLE_SYNC_MASK PGTBL_PMD_MODIFIED |
| 31 | |
| 32 | /* |
| 33 | * PGDIR_SHIFT determines what a top-level page table entry can map |
| 34 | */ |
| 35 | #define PGDIR_SHIFT 30 |
| 36 | #define PTRS_PER_PGD 4 |
| 37 | |
| 38 | /* |
| 39 | * PMD_SHIFT determines the size of the area a middle-level |
| 40 | * page table can map |
| 41 | */ |
| 42 | #define PMD_SHIFT 21 |
| 43 | #define PTRS_PER_PMD 512 |
| 44 | |
| 45 | /* |
| 46 | * entries per page directory level |
| 47 | */ |
| 48 | #define PTRS_PER_PTE 512 |
| 49 | |
| 50 | #define MAX_POSSIBLE_PHYSMEM_BITS 36 |
| 51 | #define PGD_KERNEL_START (CONFIG_PAGE_OFFSET >> PGDIR_SHIFT) |
| 52 | |
| 53 | #endif /* _ASM_X86_PGTABLE_3LEVEL_DEFS_H */ |
| 54 |
Warning: This file is not a C or C++ file. It does not have highlighting.
