1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 /* 3 * linux/arch/unicore32/include/asm/pgtable-hwdef.h 4 * 5 * Code specific to PKUnity SoC and UniCore ISA 6 * 7 * Copyright (C) 2001-2010 GUAN Xue-tao 8 */ 9 #ifndef __UNICORE_PGTABLE_HWDEF_H__ 10 #define __UNICORE_PGTABLE_HWDEF_H__ 11 12 /* 13 * Hardware page table definitions. 14 * 15 * + Level 1 descriptor (PMD) 16 * - common 17 */ 18 #define PMD_TYPE_MASK (3 << 0) 19 #define PMD_TYPE_TABLE (0 << 0) 20 /*#define PMD_TYPE_LARGE (1 << 0) */ 21 #define PMD_TYPE_INVALID (2 << 0) 22 #define PMD_TYPE_SECT (3 << 0) 23 24 #define PMD_PRESENT (1 << 2) 25 #define PMD_YOUNG (1 << 3) 26 27 /*#define PMD_SECT_DIRTY (1 << 4) */ 28 #define PMD_SECT_CACHEABLE (1 << 5) 29 #define PMD_SECT_EXEC (1 << 6) 30 #define PMD_SECT_WRITE (1 << 7) 31 #define PMD_SECT_READ (1 << 8) 32 33 /* 34 * + Level 2 descriptor (PTE) 35 * - common 36 */ 37 #define PTE_TYPE_MASK (3 << 0) 38 #define PTE_TYPE_SMALL (0 << 0) 39 #define PTE_TYPE_MIDDLE (1 << 0) 40 #define PTE_TYPE_LARGE (2 << 0) 41 #define PTE_TYPE_INVALID (3 << 0) 42 43 #define PTE_PRESENT (1 << 2) 44 #define PTE_YOUNG (1 << 3) 45 #define PTE_DIRTY (1 << 4) 46 #define PTE_CACHEABLE (1 << 5) 47 #define PTE_EXEC (1 << 6) 48 #define PTE_WRITE (1 << 7) 49 #define PTE_READ (1 << 8) 50 51 #endif 52