|
|
Power 6/32 Unix version 1.2b
# # interrupt stack not valid event test # # WARNING-- This test, if works, halts the machine with # r0 = 0xcafebabe, & r1 = -1. # # R0 = error code # 1 - Expected interrupt stack not valid exception did not happen # R1 = current PSL , R2 = Current ISP # 2 - Took software interrupt #3 while ISP is invalid # R1 = current ISP # .set SIVEC3,0x1c /* Offset into SCB for soft int level 3 */ # .globl _isnv_evt _isnv_evt: .word 0x1fff mtpr $0x1f,$IPL movpsl r1 andl2 $0x051f0000,r1 cmpl $0x041f0000,r1 /* PSL : IS must be ON, K mode, */ /* IPL must be 0x1f for this */ /* test to work */ beql 1f movl $1,r0 movl $0x041f0000,r2 halt /* PSL not right for this test */ /* r0 = 1; r1 = psl; r2 =exp psl */ /* Invalidate interrupt stack page table entry in SPT */ 1: movab (sp),r8 /* Get current ISP */ subl2 $4,r8 /* Address of next push */ andl2 $0x3fffffff,r8 /* Mask out bit 30, 31 */ shrl $PGSHIFT,r8,r8 /* Get page no. of this address */ andl3 _Sysmap[r8],$0x7fffffff,_Sysmap[r8] /* Set valid bit off */ mtpr $0,$TBIA /* Invalidate translation buffer */ movl _scb+SIVEC3,_savvec0 /* Set new vector for soft int #3 */ movab _sivec3,_scb+SIVEC3 mtpr $2,$IPL /* Set IPL = 2 */ movl $0xcafebabe,r1 mtpr $3,$SIRR /* Force soft int level #3 */ /* Since ISP is not valid, the machine */ /* should halt with r0 = 0, $ r1 = -1 */ movpsl r1 movl $1,r0 movab (sp),r2 jmp *badrtn /* error code = 2 = r0; did not halt */ /* when trying to force soft int #3 and */ /* interrupt stack was invalid */ .align 2 _sivec3: /* should not come here either */ movl $2,r0 movab (sp),r1 jmp *badrtn /* errorcode = r0 ; took soft int #3 */ /* vector when int stack was invalid */ /* NO RETURN FROM THIS TEST --- IT HALTS */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.