revert between 56095 -> 55830 in arch
[AROS.git] / arch / arm-all / include / asm / mmu.h
blob59802e35ebd64e8d4d8df8f8bb2cd306c3d5eb5e
1 #ifndef ASM_ARM_MMU_H
2 #define ASM_ARM_MMU_H
4 /*
5 Copyright © 2013, The AROS Development Team. All rights reserved.
6 $Id$
7 */
9 #include <exec/types.h>
10 #include <inttypes.h>
12 typedef struct pte_ {
13 union {
14 struct {
15 unsigned type:2;
16 unsigned sbz:3;
17 unsigned domain:4;
18 unsigned imp:1;
19 unsigned base_address:22;
20 } coarse;
21 struct {
22 unsigned type:2;
23 unsigned b:1;
24 unsigned c:1;
25 unsigned xn:1;
26 unsigned domain:4;
27 unsigned imp:1;
28 unsigned ap:2;
29 unsigned tex:3;
30 unsigned apx:1;
31 unsigned s:1;
32 unsigned ng:1;
33 unsigned supersection:1;
34 unsigned sbz:1;
35 unsigned base_address:12;
36 } section;
37 struct {
38 unsigned type:2;
39 unsigned b:1;
40 unsigned c:1;
41 unsigned xn:1;
42 unsigned base_address_3:4;
43 unsigned imp:1;
44 unsigned ap:2;
45 unsigned tex:3;
46 unsigned apx:1;
47 unsigned s:1;
48 unsigned ng:1;
49 unsigned supersection:1;
50 unsigned sbz:1;
51 unsigned base_address_2:4;
52 unsigned base_address_1:8;
53 } supersection;
54 uint32_t raw;
56 } pde_t;
58 typedef struct {
59 union {
60 struct {
61 unsigned type:2;
62 unsigned b:1;
63 unsigned c:1;
64 unsigned ap:2;
65 unsigned sbz:3;
66 unsigned apx:1;
67 unsigned s:1;
68 unsigned ng:1;
69 unsigned tex:3;
70 unsigned xn:1;
71 unsigned base_address:16;
72 } large_page;
73 struct {
74 unsigned type:2;
75 unsigned b:1;
76 unsigned c:1;
77 unsigned ap:2;
78 unsigned tex:3;
79 unsigned apx:1;
80 unsigned s:1;
81 unsigned ng:1;
82 unsigned base_address:20;
83 } page;
84 uint32_t raw;
86 } pte_t;
88 #define PDE_TYPE_FAULT 0
89 #define PDE_TYPE_COARSE 1
90 #define PDE_TYPE_SECTION 2
91 #define PDE_TYPE_RESERVED 3
93 #define PTE_TYPE_FAULT 0
94 #define PTE_TYPE_LARGE_PAGE 1
95 #define PTE_TYPE_PAGE 2
96 #define PTE_TYPE_PAGE_XN 3
99 #endif /* ASM_ARM_MMU_H */