m8820x_pte.h Source File
Back to the index.
Go to the documentation of this file.
56 #define PG_BITS PAGE_SHIFT
63 #define PG_FRAME 0xfffff000
64 #define PG_SHIFT PG_BITS
65 #define PG_PFNUM(x) (((x) & PG_FRAME) >> PG_SHIFT)
68 #define CACHE_DFL 0x00000000
69 #define CACHE_INH 0x00000040
70 #define CACHE_GLOBAL 0x00000080
71 #define CACHE_WT 0x00000200
73 #define CACHE_MASK (CACHE_INH | CACHE_GLOBAL | CACHE_WT)
81 #define APR_V 0x00000001
87 #define PATC_ENTRIES 56
93 #define BATC_V 0x00000001
94 #define BATC_PROT 0x00000002
95 #define BATC_INH 0x00000004
96 #define BATC_GLOBAL 0x00000008
97 #define BATC_WT 0x00000010
98 #define BATC_SO 0x00000020
107 #define SG_V 0x00000001
108 #define SG_NV 0x00000000
109 #define SG_PROT 0x00000004
110 #define SG_RO 0x00000004
111 #define SG_RW 0x00000000
112 #define SG_SO 0x00000100
114 #define SDT_VALID(sdt) (*(sdt) & SG_V)
115 #define SDT_SUP(sdt) (*(sdt) & SG_SO)
116 #define SDT_WP(sdt) (*(sdt) & SG_PROT)
124 #define PG_V 0x00000001
125 #define PG_NV 0x00000000
126 #define PG_PROT 0x00000004
127 #define PG_U 0x00000008
128 #define PG_M 0x00000010
129 #define PG_M_U 0x00000018
130 #define PG_RO 0x00000004
131 #define PG_RW 0x00000000
132 #define PG_SO 0x00000100
133 #define PG_W 0x00000020
134 #define PG_U0 0x00000400
135 #define PG_U1 0x00000800
137 #define PDT_VALID(pte) (*(pte) & PG_V)
138 #define PDT_SUP(pte) (*(pte) & PG_SO)
139 #define PDT_WP(pte) (*(pte) & PG_PROT)
148 #define IND_V 0x00000001
149 #define IND_NV 0x00000000
150 #define IND_MASKED 0x00000002
151 #define IND_UNMASKED 0x00000003
152 #define IND_MASK 0x00000003
154 #define IND_FRAME 0xfffffffc
157 #define IND_PDA(x) ((x) & IND_FRAME >> IND_SHIFT)
163 #define SDT_ENTRIES (1<<(SDT_BITS))
164 #define PDT_ENTRIES (1<<(PDT_BITS))
170 #define SDT_SIZE (sizeof(sdt_entry_t) * SDT_ENTRIES)
171 #define PDT_SIZE (sizeof(pt_entry_t) * PDT_ENTRIES)
177 #define SDT_SHIFT (PDT_BITS + PG_BITS)
178 #define PDT_SHIFT (PG_BITS)
180 #define SDT_MASK (((1 << SDT_BITS) - 1) << SDT_SHIFT)
181 #define PDT_MASK (((1 << PDT_BITS) - 1) << PDT_SHIFT)
183 #define SDTIDX(va) (((va) & SDT_MASK) >> SDT_SHIFT)
184 #define PDTIDX(va) (((va) & PDT_MASK) >> PDT_SHIFT)
191 #define BATC_BLKSHIFT 19
193 #define BATC_BLKBYTES (1 << BATC_BLKSHIFT)
195 #define BATC_BLKMASK (BATC_BLKBYTES-1)
200 #define BATC_PSHIFT 6
201 #define BATC_VSHIFT (BATC_PSHIFT + (32 - BATC_BLKSHIFT))
203 #define BATC_BLK_ALIGNED(x) ((x & BATC_BLKMASK) == 0)
205 #define M88K_BTOBLK(x) (x >> BATC_BLKSHIFT)
216 (
"xmem %0, %2, r0" :
"=r"(oldpte) :
"0"(oldpte),
"r"(pte));
217 __asm__ __volatile__ (
"tb1 0, r0, 0");
Generated on Tue Mar 24 2020 14:04:48 for GXemul by
1.8.17