ISR_ADD(9)         NetBSD Kernel Manual (SUN3 Architecture)         ISR_ADD(9)

NNAAMMEE
     iissrr__aadddd, iissrr__aadddd__aauuttoovveecctt, iissrr__aadddd__vveeccttoorreedd, iissrr__aadddd__ccuussttoomm - establish
     interrupt handler

SSYYNNOOPPSSIISS
     ##iinncclluuddee <<mmaacchhiinnee//aauuttooccoonnff..hh>>

     typedef int (*isr_func_t)(void *);

     _v_o_i_d
     iissrr__aadddd__aauuttoovveecctt(_i_s_r___f_u_n_c___t _f_u_n, _v_o_i_d _*_a_r_g, _i_n_t _l_e_v_e_l);

     _v_o_i_d
     iissrr__aadddd__vveeccttoorreedd(_i_s_r___f_u_n_c___t _f_u_n, _v_o_i_d _*_a_r_g, _i_n_t _p_r_i, _i_n_t _v_e_c);

     _v_o_i_d
     iissrr__aadddd__ccuussttoomm(_i_n_t _l_e_v_e_l, _v_o_i_d _*_f_u_n);

DDEESSCCRRIIPPTTIIOONN
     The iissrr__aadddd functions establish interrupt handlers into the system inter-
     rupt dispatch table, typically called during the autoconfiguration pro-
     cess for a device.

     There are two types of interrupts in the Motorola 68000 architecture,
     which differ in the way that an interrupt request is mapped to a dispatch
     function within the interrupt vector table.

     When the CPU detects an asserted signal on one of its interrupt request
     lines, it stops normal instruction execution and begins an interrupt ac-
     knowledge sequence on the system bus.  During this cycle the interrupting
     device directs how the CPU is to dispatch the interrupt request.

     If the interrupting device is sophisticated enough, it provides an 8-bit
     interrupt vector number to the CPU and a ``vectored'' interrupt occurs.
     This vector number points to a vector entry within the interrupt vector
     table to which instruction execution is immediately transfered.

     If the interrupting device cannot provide a vector number, it asserts a
     specialized bus line and an ``autovectored'' interrupt occurs.  The vec-
     tor number to use is determined by adding the interrupt priority (0-6) to
     an autovector base (typically 0x18).

     iissrr__aadddd__aauuttoovveecctt()
                      Adds the function _f_u_n to the list of interrupt handlers
                      to be called during an autovectored interrupt of priori-
                      ty _l_e_v_e_l. The pointer _a_r_g is passed to the function as
                      its first argument.

     iissrr__aadddd__vveeccttoorreedd()
                      Adds the function _f_u_n to the list of interrupt handlers
                      to be called during a vectored interrupts of priority
                      _p_r_i at dispatch vector number _v_e_c. The pointer _a_r_g is
                      passed to the function as its first argument.

     iissrr__aadddd__ccuussttoomm()
                      Establish function _f_u_n as the interrupt handler for vec-
                      tor _l_e_v_e_l. The autovector base number is automatically
                      added to _l_e_v_e_l.

                      _f_u_n is called directly as the dispatch handler and must
                      handle all of the specifics of saving the processor
                      state and returning from a processor exception.  These
                      requirements generally dictate that _f_u_n be written in
                      assembler.

CCOODDEE RREEFFEERREENNCCEESS
     ssrrcc//ssyyss//aarrcchh//ssuunn33//ssuunn33//iissrr..cc

RREEFFEERREENNCCEESS
     MC68030 User's Manual, Third edition, MC68030UM/AD Rev 2, Motorola Inc.

BBUUGGSS
     There is no way to remove a handler once it has been added.

NetBSD                           May 21, 1997                                2
