xref: /netbsd-src/sys/arch/sun3/include/pte.h (revision cda4f8f6ee55684e8d311b86c99ea59191e6b74f)
1 
2 #ifndef _MACHINE_PTE_H
3 #define _MACHINE_PTE_H
4 
5 #define NCONTEXT 8
6 #define NBSG 131072
7 #define SEGINV 255
8 #define NPAGSEG 16
9 #define NSEGMAP 2048
10 
11 #define PG_VALID   0x80000000
12 #define PG_WRITE   0x40000000
13 #define PG_SYSTEM  0x20000000
14 #define PG_NC      0x10000000
15 #define PG_TYPE    0x0C000000
16 #define PG_ACCESS  0x02000000
17 #define PG_MOD     0x01000000
18 
19 #define PG_SPECIAL (PG_VALID|PG_WRITE|PG_SYSTEM|PG_NC|PG_ACCESS|PG_MOD)
20 #define PG_PERM    (PG_VALID|PG_WRITE|PG_SYSTEM|PG_NC)
21 #define PG_FRAME   0x0007FFFF
22 
23 #define PG_MOD_SHIFT 24
24 #define PG_PERM_SHIFT 28
25 
26 #define PG_MMEM      0
27 #define PG_OBIO      1
28 #define PG_VME16D    2
29 #define PG_VME32D    3
30 #define PG_TYPE_SHIFT 26
31 
32 #define PG_INVAL   0x0
33 
34 #define MAKE_PGTYPE(x) ((x) << PG_TYPE_SHIFT)
35 #define PG_PGNUM(pte) (pte & PG_FRAME)
36 #define PG_PA(pte) ((pte & PG_FRAME) <<PGSHIFT)
37 
38 #define VA_PTE_NUM_SHIFT  13
39 #define VA_PTE_NUM_MASK (0xF << VA_PTE_NUM_SHIFT)
40 #define VA_PTE_NUM(va) ((va & VA_PTE_NUM_MASK) >> VA_PTE_NUM_SHIFT)
41 
42 
43 #endif /* !_MACHINE_PTE_H*/
44