|
|
1.1 root 1: /* machdep.s 4.2 23-Aug-85 */
2:
3: .set _scb, 0x0 # mask for total disable
4: .set HIGH, 0x1f # mask for total disable
5: .set BERVEC, 0x80 # offset into scb of the bus error vector
6: .set RESTVEC, 0x8 # offset into scb of the restart vector
7:
8: .set IPL, 0x8 # Interupt Priority Level register
9: .set SCBB, 0x12 # SCB Block pointer register
10:
11: /* MER bits */
12:
13: .set ERRCD, 0x07 # Error code (mask)
14: .set APE, 1 # Address parity error
15: .set DPE, 2 # Data parity error
16: .set DCE, 3 # Data check error
17: .set VTO, 4 # Versabus timeout
18: .set VBE, 5 # Versabus error
19: .set NEM, 6 # Non-existent memory
20:
21:
22: .globl _mtpr
23: _mtpr:
24: .word 0x00 # don't keep anything
25: mtpr 4(fp),8(fp)
26: ret
27:
28:
29: .globl _mfpr
30: _mfpr:
31: .word 0x00 # don't keep anything
32: mfpr 4(fp),r0
33: ret
34:
35: /* Copy bytes within kernel */
36:
37: .globl _bcopy
38: _bcopy:
39: .word 0x07 # Keep r2,r1,r0
40: movl 4(fp),r0
41: movl 8(fp),r1
42: movl 12(fp),r2
43: movblk
44: ret
45:
46:
47: /* badaddr(addr, len) */
48: /* see if access addr with a len type instruction causes a machine check */
49: /* len is length of access (1=byte, 2=short, 4=long) */
50: /* r0 = 0 means good(exists); r0 =1 means does not exist. */
51:
52: .globl _badaddr
53: _badaddr:
54: .word 0x1e # Keep r5,r4,r3,r2,r1
55: mfpr $IPL,r1
56: mtpr $HIGH,$IPL
57: mfpr $SCBB,r5
58: mtpr $0,$SCBB
59: movl *$BERVEC,r2
60: movl 4(fp),r3
61: movl 8(fp),r4
62: movab 9f,*$BERVEC
63: bbc $0,r4,1f; tstb (r3)
64: 1: bbc $1,r4,1f; tstw (r3)
65: 1: bbc $2,r4,1f; tstl (r3)
66: 1: clrl r0 # made it w/o machine checks
67: 2: movl r2,*$BERVEC
68: mtpr r1,$IPL
69: mtpr r5,$SCBB
70: ret
71:
72: .align 2
73: 9: # Here we catch buss error (if it comes)
74: andl3 4(sp),$ERRCD,r0
75: cmpl r0,$APE
76: jneq 1f
77: halt # Address parity error !!!
78: 1: cmpl r0,$VBE
79: jneq 1f
80: halt # Versabus error
81: 1:
82: movl $1,r0 # Anything else = bad address
83: movab 8(sp),sp # discard buss error trash
84: movab 2b,(sp) # new program counter on stack.
85: rei
86:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.