--- cci/d/event/init.x 2019/07/28 12:24:19 1.1 +++ cci/d/event/init.x 2019/07/28 12:30:53 1.1.1.2 @@ -20,6 +20,17 @@ /* */ /* 14-June-85 : run arithmetic fault test with FPP or option bit set */ /* */ +/* Modified 11/20/85 to include two subtests (9 and A) that */ +/* will generate an alignment fault when the error is in */ +/* the intermediate address of a deferred addressing mode. */ +/* */ +/* Modified 04/22/86 to fix an intermittent failure that occured */ +/* due to clock or console receive interrupts. The ISP, KSP and */ +/* Usp were seperated throughout the test to solve this problem. */ +/* Before this change the test would fail intermittently when run */ +/* with the printout turned on. Also added the release date that */ +/* can be read from memory. The date will be after the jump to */ +/* of test at location 0x800 */ /* privileged registers addresses */ #include "prvreg.h" @@ -50,7 +61,7 @@ .set HIGH,0x1f /*mask for disabling all interrupts */ .set MCKVEC,4 /*scb offset for machinecheck vector */ - .set NISP,2 /*no. of interrupt stack pages */ + .set NISP,512 /*size of interrupt stack */ .set DONE,255 /*user process done code */ .text @@ -60,7 +71,8 @@ .globl _Entry _Entry: jmp start - .space (1024-6) + .long 0x00042286 /* date of realese */ + .space (1024-10) @@ -71,7 +83,7 @@ _Entry: /*physical page 3 */ - .set NLWU,34 /*no. of longwords already used */ + .set NLWU,36 /*no. of longwords already used */ /*this must be changed when you define */ /*additional variables below before */ /*_dbuf */ @@ -135,6 +147,14 @@ _savvec7: _savvec8: .space 4 + .globl _savvec9 /*save vectors area */ +_savvec9: + .space 4 + + .globl _savveca /*save vectors area */ +_savveca: + .space 4 + .globl badrtn badrtn: .long tfail @@ -200,14 +220,29 @@ edbuf: .globl _intstack /* Interrupt stack */ _intstack: /* Physical pages 4 & 5 */ - .space NISP*NBPG + .space NISP eintstack: + .globl _usrstack /* User stack */ +_usrstack: /* Physical pages 6 & 7 */ + .space NISP +eusrstack: + + .globl _kerstack /* Kernal stack */ +_kerstack: /* Physical pages 8 & 9 */ + .space NISP +ekerstack: + + .globl _tmpstack /* temp stack */ +_tmpstack: /* Physical pages 8 & 9 */ + .space NISP +etmpstack: + .set SYSPTSIZE,512 /* No. of entries in SPT */ /* - System Page Table -- physical page 6 & 7 + System Page Table -- physical page 10 & 11 */ .align 2 .globl _Sysmap @@ -217,12 +252,12 @@ eSysmap: .globl _Syssize .set _Syssize,(eSysmap-_Sysmap)/4 /* should be SYSPTSIZE */ - .globl _iomap /* Physical page 8 */ + .globl _iomap /* Physical page 12 */ _iomap: .space 1024 /* IOMAP - unused */ .globl _eiomap _eiomap: - .globl _pcb0 /* Physical page 9 */ + .globl _pcb0 /* Physical page 13 */ _pcb0: .space 128 /*process control block 0 */ .globl _pcb1 _pcb1: .space 128 /*process control block 1 */ @@ -241,7 +276,7 @@ _pcb7: .space 128 /*process control blo /* *user #0 page tables -- P0PT, P1PT, P2PT - *physical memory -- page10, 11, & 12 respectively + *physical memory -- page14, 15, & 16 respectively */ .align 2 .globl _u0p0pt @@ -258,7 +293,7 @@ eu0p2pt: /* *user #1 page tables -- P0PT, P1PT, P2PT - *physical memory -- page13 ,14, & 15 respectively + *physical memory -- page17 ,18, & 19 respectively */ .align 2 .globl _u1p0pt @@ -276,7 +311,7 @@ eu1p2pt: /* *user #2 page tables -- P0PT, P1PT, P2PT - *physical memory -- page 16, 17 , & 18 respectively + *physical memory -- page 20, 21 , & 22 respectively */ .align 2 .globl _u2p0pt @@ -294,7 +329,7 @@ eu2p2pt: /* *user #3 page tables -- P0PT, P1PT, P2PT - *physical memory -- page 19, 20 , & 21 respectively + *physical memory -- page 23, 24 , & 25 respectively */ .align 2 .globl _u3p0pt @@ -311,7 +346,7 @@ eu3p2pt: /* *user #4 thru 6 page tables - *physical memory -- pages 22 thru 30 + *physical memory -- pages 26 thru 34 */ .globl _u4p0pt _u4p0pt: @@ -321,7 +356,7 @@ eu6p2pt: /* *user #7 page tables -- P0PT, P1PT, P2PT - *physical memory -- page 31, 32 , & 33 respectively + *physical memory -- page 35, 36 , & 37 respectively */ .align 2 .globl _u7p0pt @@ -430,12 +465,17 @@ extest: bneq 1b - movl $_intstack+NISP*NBPG,r0 + movl $_intstack+NISP,r0 andl2 $0x3fffffff,r0 /* Mask out bit 30,31 */ mtpr r0,$ISP /* init. ISP */ movl r0,sp /* in case we get exception */ movab (sp),fp /* Initialize FP */ + movl $_usrstack+NISP,r0 + andl2 $0x3fffffff,r0 /* Mask out bit 30,31 */ + mtpr r0,$KSP /* init. KSP */ + + /* Clear system data area all the way upto system code this includes dump buffer,interrupt stack,spt,iomap,pcbs,user @@ -531,6 +571,18 @@ t0: tstl _lptest bneq t0 nxt1: + movab (sp),r0 + andl2 $0x3fffffff,r0 /* Mask out bit 30,31 */ + mtpr r0,$ISP /* init. ISP */ + + movl $_usrstack+NISP,r0 + andl2 $0x3fffffff,r0 /* Mask out bit 30,31 */ + mtpr r0,$USP /* init. USP */ + + movl $_kerstack+NISP,r0 + andl2 $0x3fffffff,r0 /* Mask out bit 30,31 */ + mtpr r0,$KSP /* init. KSP */ + cmpl $0,_tno beql t1 cmpl $2,_tno @@ -711,7 +763,7 @@ nxt12: vmode: mtpr $0,$P0LR - movl $_intstack+NISP*NBPG,r0 + movl $_intstack+NISP,r0 mtpr r0,$ISP /* init. ISP,sp to virtual address */ movl r0,sp @@ -799,12 +851,13 @@ t16: tstl _lptest bneq t16 nxt17: + incl _cycle cmpl $0,_tno jneq last cmpl $-1,_Cycle /* If Cycle == -1; loop forever */ beql 1f /* and skip the last test */ subl3 _cycle,_Cycle,r0 - cmpl $1,r0 /* Only (ALL tests and last cycle) */ + cmpl $0,r0 /* Only (ALL tests and last cycle) */ jlss last /* turn on this test */ t17: pushl $M18 /* Display msg */ @@ -820,18 +873,16 @@ last: cmpl $-1,_Cycle /* If Cycle == -1; loop forever */ beql 1f - incl _cycle cmpl _cycle,_Cycle bgeq passed -1: - mfpr $SBR,r0 + +1: mfpr $SBR,r0 mfpr $SLR,r1 orl2 $0xc0000000,r0 mtpr r0,$P0BR mtpr r1,$P0LR /* Map user to system space */ jmp extest - .globl passed passed: tstl _ss1 jeql 1f