|
|
Power 6/32 Unix version 1.2b
/* machdep.s 4.2 23-Aug-85 */ .set _scb, 0x0 # mask for total disable .set HIGH, 0x1f # mask for total disable .set BERVEC, 0x80 # offset into scb of the bus error vector .set RESTVEC, 0x8 # offset into scb of the restart vector .set IPL, 0x8 # Interupt Priority Level register .set SCBB, 0x12 # SCB Block pointer register /* MER bits */ .set ERRCD, 0x07 # Error code (mask) .set APE, 1 # Address parity error .set DPE, 2 # Data parity error .set DCE, 3 # Data check error .set VTO, 4 # Versabus timeout .set VBE, 5 # Versabus error .set NEM, 6 # Non-existent memory .globl _mtpr _mtpr: .word 0x00 # don't keep anything mtpr 4(fp),8(fp) ret .globl _mfpr _mfpr: .word 0x00 # don't keep anything mfpr 4(fp),r0 ret /* Copy bytes within kernel */ .globl _bcopy _bcopy: .word 0x07 # Keep r2,r1,r0 movl 4(fp),r0 movl 8(fp),r1 movl 12(fp),r2 movblk ret /* badaddr(addr, len) */ /* see if access addr with a len type instruction causes a machine check */ /* len is length of access (1=byte, 2=short, 4=long) */ /* r0 = 0 means good(exists); r0 =1 means does not exist. */ .globl _badaddr _badaddr: .word 0x1e # Keep r5,r4,r3,r2,r1 mfpr $IPL,r1 mtpr $HIGH,$IPL mfpr $SCBB,r5 mtpr $0,$SCBB movl *$BERVEC,r2 movl 4(fp),r3 movl 8(fp),r4 movab 9f,*$BERVEC bbc $0,r4,1f; tstb (r3) 1: bbc $1,r4,1f; tstw (r3) 1: bbc $2,r4,1f; tstl (r3) 1: clrl r0 # made it w/o machine checks 2: movl r2,*$BERVEC mtpr r1,$IPL mtpr r5,$SCBB ret .align 2 9: # Here we catch buss error (if it comes) andl3 4(sp),$ERRCD,r0 cmpl r0,$APE jneq 1f halt # Address parity error !!! 1: cmpl r0,$VBE jneq 1f halt # Versabus error 1: movl $1,r0 # Anything else = bad address movab 8(sp),sp # discard buss error trash movab 2b,(sp) # new program counter on stack. rei
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.