1 /**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 **************************************************************************** 11 ****************************************************************************/ 12 #ifndef _ASMARM_PGTABLE_HWDEF_H 13 #define _ASMARM_PGTABLE_HWDEF_H 14 15 #define PMD_TYPE_MASK (3 << 0) 16 #define PMD_TYPE_FAULT (0 << 0) 17 #define PMD_TYPE_TABLE (1 << 0) 18 #define PMD_TYPE_SECT (2 << 0) 19 #define PMD_BIT4 (1 << 4) 20 #define PMD_DOMAIN(x) ((x) << 5) 21 #define PMD_PROTECTION (1 << 9) 22 23 #define PMD_SECT_BUFFERABLE (1 << 2) 24 #define PMD_SECT_CACHEABLE (1 << 3) 25 #define PMD_SECT_XN (1 << 4) 26 #define PMD_SECT_AP_WRITE (1 << 10) 27 #define PMD_SECT_AP_READ (1 << 11) 28 #define PMD_SECT_TEX(x) ((x) << 12) 29 #define PMD_SECT_APX (1 << 15) 30 #define PMD_SECT_S (1 << 16) 31 #define PMD_SECT_nG (1 << 17) 32 #define PMD_SECT_SUPER (1 << 18) 33 34 #define PMD_SECT_UNCACHED (0) 35 #define PMD_SECT_BUFFERED (PMD_SECT_BUFFERABLE) 36 #define PMD_SECT_WT (PMD_SECT_CACHEABLE) 37 #define PMD_SECT_WB (PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE) 38 #define PMD_SECT_MINICACHE (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE) 39 #define PMD_SECT_WBWA (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE) 40 #define PMD_SECT_NONSHARED_DEV (PMD_SECT_TEX(2)) 41 42 #define PTE_TYPE_MASK (3 << 0) 43 #define PTE_TYPE_FAULT (0 << 0) 44 #define PTE_TYPE_LARGE (1 << 0) 45 #define PTE_TYPE_SMALL (2 << 0) 46 #define PTE_TYPE_EXT (3 << 0) 47 #define PTE_BUFFERABLE (1 << 2) 48 #define PTE_CACHEABLE (1 << 3) 49 50 #define PTE_EXT_XN (1 << 0) 51 #define PTE_EXT_AP_MASK (3 << 4) 52 #define PTE_EXT_AP0 (1 << 4) 53 #define PTE_EXT_AP1 (2 << 4) 54 #define PTE_EXT_AP_UNO_SRO (0 << 4) 55 #define PTE_EXT_AP_UNO_SRW (PTE_EXT_AP0) 56 #define PTE_EXT_AP_URO_SRW (PTE_EXT_AP1) 57 #define PTE_EXT_AP_URW_SRW (PTE_EXT_AP1|PTE_EXT_AP0) 58 #define PTE_EXT_TEX(x) ((x) << 6) 59 #define PTE_EXT_APX (1 << 9) 60 #define PTE_EXT_COHERENT (1 << 9) 61 #define PTE_EXT_SHARED (1 << 10) 62 #define PTE_EXT_NG (1 << 11) 63 64 #define PTE_SMALL_AP_MASK (0xff << 4) 65 #define PTE_SMALL_AP_UNO_SRO (0x00 << 4) 66 #define PTE_SMALL_AP_UNO_SRW (0x55 << 4) 67 #define PTE_SMALL_AP_URO_SRW (0xaa << 4) 68 #define PTE_SMALL_AP_URW_SRW (0xff << 4) 69 70 #endif 71