|
|
1.1 root 1:
2: #define ALINE 80 /* 80 char maximun in aline */
3: #define SPACE ' '
4: #define CR '\n'
5: #define MINUS '-'
6: #define COMMA ','
7: #define EQUAL '='
8: #define ATYPE 'h'
9: #define NTYPE 'h'
10: #define HEX 'h'
11: #define DEC 'd'
12: #define NOBYTES 13
13: #define NULL '\0'
14:
15:
16:
17: /* TAHOE PRIVILEGE REGISTERS */
18:
19: asm(" .set SBR,0");
20: asm(" .set SLR,1");
21: asm(" .set P0BR,2");
22: asm(" .set P0LR,3");
23: asm(" .set P1BR,4");
24: asm(" .set P1LR,5");
25: asm(" .set P2BR,6");
26: asm(" .set P2LR,7");
27: asm(" .set IPL,8");
28: asm(" .set MAPEN,9");
29: asm(" .set MME,9");
30: asm(" .set TBIA,10");
31: asm(" .set TBIS,11");
32: asm(" .set DCK,12");
33: asm(" .set CCK,13");
34: asm(" .set PCBB,14");
35: asm(" .set KSP,19");
36: asm(" .set USP,20");
37: asm(" .set CPMDCB,21");
38: asm(" .set PADC,25");
39: asm(" .set DCR,27"); /* Diagnostic control register */
40: asm(" .set DC_ON,1"); /* DCR opcode of Enable data cache */
41: asm(" .set DC_OFF,2"); /* DCR opcode of Disable data cache */
42: asm(" .set TB_ON,256"); /* DCR opcode of Enable Trans. buffer */
43: asm(" .set TB_OFF,512"); /* DCR opcode of Disable Trans. buffer */
44:
45: #define SBR 0
46: #define SLR 1
47: #define P0BR 2
48: #define P0LR 3
49: #define P1BR 4
50: #define P1LR 5
51: #define P2BR 6
52: #define P2LR 7
53: #define IPL 8
54: #define MME 9
55: #define MAPEN 9
56: #define TBIA 10
57: #define TBIS 11
58: #define DCK 12
59: #define CCK 13
60: #define PCBB 14
61: #define KSP 19
62: #define USP 20
63: #define PADC 25
64: #define DCR 27 /* Diagnostic control register */
65: #define SCB 0x800 /* address of SCB is at page 2 */
66:
67:
68:
69:
70: /* offsets to elements in PCB */
71:
72: #define PCB_KSP 0
73: #define PCB_USP 1*4
74: #define PCB_R0 2*4
75: #define PCB_R1 3*4
76: #define PCB_R2 4*4
77: #define PCB_R3 5*4
78: #define PCB_R4 6*4
79:
80: #define PCB_PC 16*4 /* Offset to PC in Process Control Block */
81: #define PCB_PSL 17*4
82: #define PCB_P0BR 18*4
83: #define PCB_P0LR 19*4
84: #define PCB_P1BR 20*4
85: #define PCB_P1LR 21*4
86: #define PCB_P2BR 22*4
87: #define PCB_P2LR 23*4
88:
89:
90: /* Offsets to vectors in SCB */
91:
92: #define CHMK_VEC 0x2b /* Offset to System call vector in SCB */
93: #define PROT_VEC 0x2f /* Protection fault vector */
94: #define TRANS_VEC 0x30 /* Translation fault vector */
95: #define RESV_INST 0x2c /* Reserved opcode */
96: #define RESV_ADRM 0x2e /* Reserved addr. mode */
97: #define ALIGN_FLT 0x35 /* Data alignment fault */
98:
99: /* PSL */
100: #define PSL_TP 0x40000000
101: #define PSL_IS 0x4000000
102: #define PSL_USR 0x1000000
103:
104:
105:
106: #define NBPG 1024
107: #define PGSHIFT 10
108: #define ENDVMEM 0xc01fffff /* max system virtual mem : 2 meg */
109: #define WRITE 1
110: #define READ 0
111: #define TRUE 1
112: #define FALSE 0
113: #define USER 1
114: #define KERNEL 0
115: #define LENGTH 1
116: #define VALID 0
117:
118: #define PTE_V 0x80000000 /* Valid bit */
119: #define PTE_PROT 0x78000000 /* Access bits in PTE */
120: #define PTE_UC 0x1000000 /* Uncachable bit */
121: #define PTE_M 0x800000 /* position of Modify bit in PTE */
122: #define PTE_U 0x400000 /* Used bit */
123: #define PTE_PFN 0x3fffff /* Page frame number in PTE */
124:
125: #define PTE_NOACC 0 /* No access */
126: #define PTE_KR 0x40000000 /* Kernel read */
127: #define PTE_KW 0x60000000 /* Kernel read/write */
128: #define PTE_URKR 0x50000000 /* User/Kernel read */
129: #define PTE_URKW 0x70000000 /* User read, Kernel read/write */
130: #define PTE_UW 0x78000000 /* User/Kernel read/write */
131:
132: #define SADDR 0xc0000000 /* Bit 30-31 of System, P0, P1, P2 */
133: #define P0ADDR 0 /* virtual address */
134: #define P1ADDR 0x40000000
135: #define P2ADDR 0x80000000
136:
137:
138:
139: /* CONSTANT USED IN MEMORY MANAGEMENT TEST */
140:
141: #define IOB0 (((unsigned)(&iob0) & 0x3ffffc00) >> PGSHIFT) & 0xfffff
142: #define IOB1 (((unsigned)(&iob1) & 0x3ffffc00) >> PGSHIFT) & 0xfffff
143: #define IOB2 (((unsigned)(&iob2) & 0x3ffffc00) >> PGSHIFT) & 0xfffff
144: #define IOB3 (((unsigned)(&iob3) & 0x3ffffc00) >> PGSHIFT) & 0xfffff
145: #define U0_P0PT (((unsigned)(&u0p0pt) & 0x3ffffc00) >> PGSHIFT) & 0xfffff
146: #define U0_P1PT (((unsigned)(&u0p1pt) & 0x3ffffc00) >> PGSHIFT) & 0xfffff
147:
148: #define TEST_PTESYS unused /* PTE no. used to test SBR */
149: #define TEST_PTEP0 68 /* PTE no. used to test P0PT */
150: #define TEST_PTEP1 0 /* PTE no. used to test P1PT */
151: #define TEST_PTEP2 LAST_VPGNO /* PTE no. used to test P2PT */
152: #define LAST_VPGNO 0xfffff /* Last virtual page no in subspaces */
153:
154:
155: #define LAST_P0PTE 99
156: #define LAST_P1PTE 9
157: #define FIRST_P2PTE 0
158: #define MAX_P0PTE 100
159: #define MAX_P1PTE 10
160: #define MAX_P2PTE 10
161:
162:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.