1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * linux/arch/unicore32/include/asm/pgtable-hwdef.h
5 * Code specific to PKUnity SoC and UniCore ISA
7 * Copyright (C) 2001-2010 GUAN Xue-tao
9 #ifndef __UNICORE_PGTABLE_HWDEF_H__
10 #define __UNICORE_PGTABLE_HWDEF_H__
13 * Hardware page table definitions.
15 * + Level 1 descriptor (PMD)
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)
24 #define PMD_PRESENT (1 << 2)
25 #define PMD_YOUNG (1 << 3)
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)
34 * + Level 2 descriptor (PTE)
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)
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)