Annotation of cci/d/event/visnv_evt.s, revision 1.1

1.1     ! root        1:  #
        !             2:  #     interrupt stack not valid event test
        !             3:  #
        !             4:  #     WARNING-- This test, if works, halts the machine with
        !             5:  #     r0 = 0xcafebabe, & r1 = -1.
        !             6:  #
        !             7:  #     R0 = error code
        !             8:  #          1 - Expected interrupt stack not valid exception did not happen
        !             9:  #              R1 = current PSL ,  R2 = Current ISP
        !            10:  #          2 - Took software interrupt #3 while ISP is invalid
        !            11:  #              R1 = current ISP
        !            12:  #
        !            13:        .set   SIVEC3,0x1c      /* Offset into SCB for soft int level 3 */
        !            14:  #
        !            15:        .globl  _isnv_evt
        !            16: _isnv_evt:
        !            17:        .word   0x1fff
        !            18: 
        !            19:        mtpr    $0x1f,$IPL
        !            20:        movpsl  r1
        !            21:        andl2   $0x051f0000,r1
        !            22:        cmpl    $0x041f0000,r1          /* PSL : IS must be ON, K mode, */
        !            23:                                        /* IPL must be 0x1f for this    */
        !            24:                                        /* test to work                 */
        !            25:        beql    1f
        !            26:        movl    $1,r0
        !            27:        movl    $0x041f0000,r2
        !            28:        halt                            /* PSL not right for this test  */
        !            29:                                        /* r0 = 1; r1 = psl; r2 =exp psl */
        !            30:        
        !            31: /*     Invalidate interrupt stack page table entry in SPT              */
        !            32: 1:
        !            33:        movab   (sp),r8                 /* Get current ISP */
        !            34:        subl2   $4,r8                   /* Address of next push */
        !            35:        andl2   $0x3fffffff,r8          /* Mask out bit 30, 31 */
        !            36:        shrl    $PGSHIFT,r8,r8          /* Get page no. of this address */
        !            37: 
        !            38:        andl3   _Sysmap[r8],$0x7fffffff,_Sysmap[r8]     /* Set valid bit off */
        !            39:        mtpr    $0,$TBIA                /* Invalidate translation buffer */
        !            40: 
        !            41:        movl    _scb+SIVEC3,_savvec0    /* Set new vector for soft int #3 */
        !            42:        movab   _sivec3,_scb+SIVEC3
        !            43:        mtpr    $2,$IPL                 /* Set IPL = 2  */
        !            44:        movl    $0xcafebabe,r1
        !            45:        mtpr    $3,$SIRR                /* Force soft int level #3 */
        !            46:                                /* Since ISP is not valid, the machine  */
        !            47:                                /* should halt with r0 = 0, $ r1 = -1   */
        !            48:        movpsl  r1
        !            49:        movl    $1,r0
        !            50:        movab   (sp),r2
        !            51:        jmp     *badrtn         /* error code = 2 = r0; did not halt    */
        !            52:                                /* when trying to force soft int #3 and */
        !            53:                                /* interrupt stack was invalid          */
        !            54: 
        !            55:        .align  2
        !            56: _sivec3:                       /* should not come here either          */
        !            57:        movl    $2,r0
        !            58:        movab   (sp),r1
        !            59:        jmp     *badrtn         /* errorcode = r0 ; took soft int #3    */
        !            60:                                /* vector when int stack was invalid    */
        !            61: 
        !            62: /*     NO RETURN FROM THIS TEST --- IT HALTS                           */
        !            63: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.