2 * linux/arch/unicore32/include/asm/pgtable-hwdef.h
4 * Code specific to PKUnity SoC and UniCore ISA
6 * Copyright (C) 2001-2010 GUAN Xue-tao
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
12 #ifndef __UNICORE_PGTABLE_HWDEF_H__
13 #define __UNICORE_PGTABLE_HWDEF_H__
16 * Hardware page table definitions.
18 * + Level 1 descriptor (PMD)
21 #define PMD_TYPE_MASK (3 << 0)
22 #define PMD_TYPE_TABLE (0 << 0)
23 /*#define PMD_TYPE_LARGE (1 << 0) */
24 #define PMD_TYPE_INVALID (2 << 0)
25 #define PMD_TYPE_SECT (3 << 0)
27 #define PMD_PRESENT (1 << 2)
28 #define PMD_YOUNG (1 << 3)
30 /*#define PMD_SECT_DIRTY (1 << 4) */
31 #define PMD_SECT_CACHEABLE (1 << 5)
32 #define PMD_SECT_EXEC (1 << 6)
33 #define PMD_SECT_WRITE (1 << 7)
34 #define PMD_SECT_READ (1 << 8)
37 * + Level 2 descriptor (PTE)
40 #define PTE_TYPE_MASK (3 << 0)
41 #define PTE_TYPE_SMALL (0 << 0)
42 #define PTE_TYPE_MIDDLE (1 << 0)
43 #define PTE_TYPE_LARGE (2 << 0)
44 #define PTE_TYPE_INVALID (3 << 0)
46 #define PTE_PRESENT (1 << 2)
47 #define PTE_YOUNG (1 << 3)
48 #define PTE_DIRTY (1 << 4)
49 #define PTE_CACHEABLE (1 << 5)
50 #define PTE_EXEC (1 << 6)
51 #define PTE_WRITE (1 << 7)
52 #define PTE_READ (1 << 8)