1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #ifndef ASM__RISCV__PAGE_BITS_H
4 #define ASM__RISCV__PAGE_BITS_H
5 
6 #define PAGE_SHIFT              12 /* 4 KiB Pages */
7 #define PADDR_BITS              56 /* 44-bit PPN */
8 
9 #ifdef CONFIG_RISCV_64
10 #define PAGETABLE_ORDER         (9)
11 #else /* CONFIG_RISCV_32 */
12 #define PAGETABLE_ORDER         (10)
13 #endif
14 
15 #define PAGETABLE_ENTRIES       (1 << PAGETABLE_ORDER)
16 
17 #define PTE_PPN_SHIFT           10
18 
19 #endif /* ASM__RISCV__PAGE_BITS_H */
20