1: /*
2: * SCCS id @(#)l.s 1.5 (Berkeley) 3/14/83
3: *
4: * Low Core
5: *
6: */
7:
8: #define LOCORE
9: #include "whoami.h" /* for localopts */
10: #include <sys/trap.h>
11: #include <sys/iopage.m>
12: #include <sys/koverlay.h> /* for definition of OVLY_TABLE_BASE */
13:
14: #include "dh.h"
15: #include "dn.h"
16: #include "dz.h"
17: #include "hk.h"
18: #include "hp.h"
19: #include "hs.h"
20: #include "ht.h"
21: #include "kl.h"
22: #include "lp.h"
23: #include "rk.h"
24: #include "rl.h"
25: #include "rm.h"
26: #include "rp.h"
27: #include "tm.h"
28: #include "ts.h"
29: #include "vp.h"
30: #include "xp.h"
31:
32: .globl call, trap, buserr, start, _panic
33: #ifdef NONFP
34: .globl instrap
35: #else
36: # define instrap trap
37: #endif
38: #ifdef MENLO_OVLY
39: .globl emt
40: #else
41: # define emt trap
42: #endif
43: #ifdef UCB_AUTOBOOT
44: .globl powrdown
45: #else
46: # define powrdown trap
47: #endif
48:
49: #ifndef KERN_NONSEP
50: .data
51: #endif
52:
53: ZERO:
54:
55: br4 = 200
56: br5 = 240
57: br6 = 300
58: br7 = 340
59:
60: . = ZERO+0
61: #ifdef KERN_NONSEP
62: / If vectors at 110 and 444 are unused,
63: / autoconfig will set these to something more reasonable.
64: / On jump, this will branch to 112, which branches to 50.
65: / On trap, will vector to 444, where a ZEROTRAP will be simulated.
66: 42 / illegal instruction if jump
67: 777 / trace trap at high priority if trap
68: #else
69: trap; br7+ZEROTRAP. / trap-to-zero trap
70: #endif
71:
72: / trap vectors
73: . = ZERO+4
74: buserr; br7+BUSFLT. / bus error
75: instrap; br7+INSTRAP. / illegal instruction
76: trap; br7+BPTTRAP. / bpt-trace trap
77: trap; br7+IOTTRAP. / iot trap
78: powrdown; br7+POWRFAIL. / power fail
79: emt; br7+EMTTRAP. / emulator trap
80: start;br7+SYSCALL. / system (overlaid by 'syscall')
81:
82: . = ZERO+40
83: #ifdef UCB_AUTOBOOT
84: .globl do_panic
85: jmp do_panic
86: #else
87: br .
88: #endif
89:
90: .globl dump
91: . = ZERO+44
92: jmp dump
93: #ifdef KERN_NONSEP
94: / Handler for jump-to-zero panic.
95: . = ZERO+50
96: mov $zjmp, -(sp)
97: jsr pc, _panic
98: #endif
99:
100: . = ZERO+60
101: klin; br4
102: klou; br4
103:
104: . = ZERO+100
105: kwlp; br6
106: kwlp; br6
107:
108: . = ZERO+114
109: trap; br7+PARITYFLT. / 11/70 parity
110: trap; br7+SEGFLT. / segmentation violation
111:
112: #if NRL > 0
113: . = ZERO+160
114: rlio; br5
115: #endif
116:
117: #if NHK > 0
118: . = ZERO+210
119: hkio; br5
120: #endif
121:
122: #if NRK > 0
123: . = ZERO+220
124: rkio; br5
125: #endif
126:
127: . = ZERO+240
128: trap; br7+PIRQ. / programmed interrupt
129: trap; br7+ARITHTRAP. / floating point
130: trap; br7+SEGFLT. / segmentation violation
131:
132: . = ZERO+254
133: #if NXP > 0
134: xpio; br5
135: #else
136: #if NHP > 0
137: hpio; br5
138: #else
139: #if NRM > 0
140: rmio; br5
141: #endif
142: #endif
143: #endif
144:
145: / floating vectors
146: . = ZERO + 1000
147: endvec = . / endvec should be past vector space
148: / (if NONSEP, should be at least 450)
149:
150: #ifdef MENLO_KOV
151: / overlay descriptor tables
152: . = ZERO+OVLY_TABLE_BASE
153: .globl ova, ovd, ovend
154: ova: .=.+20 / overlay addresses
155: ovd: .=.+20 / overlay sizes
156: ovend: .=.+2 / end of overlays
157: #endif
158:
159: //////////////////////////////////////////////////////
160: / interface code to C
161: //////////////////////////////////////////////////////
162:
163: #ifndef KERN_NONSEP
164: .text
165: / This is text location 0 for separate I/D kernels.
166: mov $zjmp, -(sp)
167: jsr pc, _panic
168: /*NOTREACHED*/
169:
170: / Unmap is called from _doboot to turn off memory management.
171: / The "return" is arranged by putting a jmp at unmap+2 (data space).
172:
173: reset= 5
174: .globl unmap
175: unmap:
176: reset
177: / The next instruction executed is from unmap+2 in physical memory,
178: / which is unmap+2 in data space.
179:
180: #endif KERN_NONSEP
181:
182: .data
183: zjmp: <jump to 0\0>
184: .text
185:
186: / CGOOD and CBAD are used by autoconfig.
187: / All unused vectors are set to CBAD
188: / before probing the devices.
189:
190: .globl CGOOD, CBAD, _conf_int
191: rtt = 6
192: CGOOD: mov $1, _conf_int ; rtt
193: CBAD: mov $-1,_conf_int ; rtt
194:
195: .globl _klrint
196: klin: jsr r0,call; jmp _klrint
197: .globl _klxint
198: klou: jsr r0,call; jmp _klxint
199:
200: .globl _clock
201: kwlp: jsr r0,call; jmp _clock
202:
203: #if NDH > 0
204: .globl _dhrint
205: dhin: jsr r0,call; jmp _dhrint
206: .globl _dhxint
207: dhou: jsr r0,call; jmp _dhxint
208: #endif
209:
210: #if NDM > 0
211: .globl _dmintr
212: dmin: jsr r0,call; jmp _dmintr
213: #endif
214:
215: #if NDZ > 0
216: .globl _dzrint
217: dzin: jsr r0,call; jmp _dzrint
218: #ifndef DZ_PDMA
219: .globl _dzxint
220: dzou: jsr r0,call; jmp _dzxint
221: #endif DZ_PDMA
222: #endif NDZ
223:
224: #if NHK > 0
225: .globl _hkintr
226: hkio: jsr r0,call; jmp _hkintr
227: #endif
228:
229: #if NHP > 0
230: .globl _hpintr
231: hpio: jsr r0,call; jmp _hpintr
232: #endif
233:
234: #if NHS > 0
235: .globl _hsintr
236: hsio: jsr r0,call; jmp _hsintr
237: #endif
238:
239: #if NHT > 0
240: .globl _htintr
241: htio: jsr r0,call; jmp _htintr
242: #endif
243:
244: #if NLP > 0
245: .globl _lpintr
246: lpio: jsr r0,call; jmp _lpintr
247: #endif
248:
249: #if NRK > 0
250: .globl _rkintr
251: rkio: jsr r0,call; jmp _rkintr
252: #endif
253:
254: #if NRL > 0
255: .globl _rlintr
256: rlio: jsr r0,call; jmp _rlintr
257: #endif
258:
259: #if NRM > 0
260: .globl _rmintr
261: rmio: jsr r0,call; jmp _rmintr
262: #endif
263:
264: #if NRP > 0
265: .globl _rpintr
266: rpio: jsr r0,call; jmp _rpintr
267: #endif
268:
269: #if NTM > 0
270: .globl _tmintr
271: tmio: jsr r0,call; jmp _tmintr
272: #endif
273:
274: #if NTS > 0
275: .globl _tsintr
276: tsio: jsr r0,call; jmp _tsintr
277: #endif
278:
279: #if NVP > 0
280: .globl _vpintr
281: vpio: jsr r0,call; jmp _vpintr
282: #endif
283:
284: #if NXP > 0
285: .globl _xpintr
286: xpio: jsr r0,call; jmp _xpintr
287: #endif
Defined functions
CBAD
declared in line
190; defined in line
193; used 1 times
CGOOD
declared in line
190; defined in line
192; used 1 times
dhin
defined in line
205;
never used
dhou
defined in line
207;
never used
dmin
defined in line
212;
never used
dzin
defined in line
217;
never used
dzou
defined in line
220;
never used
hkio
defined in line
226; used 1 times
hpio
defined in line
231; used 1 times
hsio
defined in line
236;
never used
htio
defined in line
241;
never used
klin
defined in line
196; used 1 times
klou
defined in line
198; used 1 times
kwlp
defined in line
201; used 2 times
lpio
defined in line
246;
never used
rkio
defined in line
251; used 1 times
rlio
defined in line
256; used 1 times
rmio
defined in line
261; used 1 times
rpio
defined in line
266;
never used
tmio
defined in line
271;
never used
tsio
defined in line
276;
never used
unmap
declared in line
174; defined in line
175; used 1 times
vpio
defined in line
281;
never used
xpio
defined in line
286; used 1 times
Defined variables
ZERO
defined in line
53; used 15 times
br4
defined in line
55; used 2 times
br5
defined in line
56; used 6 times
br6
defined in line
57; used 2 times
br7
defined in line
58; used 13 times
ova
declared in line
153; defined in line
154; used 1 times
ovd
declared in line
153; defined in line
155; used 1 times
ovend
declared in line
153; defined in line
156; used 1 times
zjmp
defined in line
183; used 2 times
Defined macros
LOCORE
defined in line
8;
never used
emt
defined in line
41; used 2 times