os_claim_vectors -- claim interrupt vectors on a CPU


   void os_claim_vectors(ms_ivec_t base_vec, ms_ivec_t nvec
                         ms_intr_dist_t *(delivery_func)(ms_ivec_t vec))


os_claim_vectors claims a range of CPU vectors on a particular CPU to be handled for delivery by the PSM. These are the vectors generated by (or allocated to) interrupt controller circuitry. (Trap vectors, including NMI vectors and other vectors reserved by the processor architecture, are not valid for os_claim_vectors. These are controlled by the core kernel, not the PSM.)

The vector numbers are relative to the CPU interrupt table, and are not necessarily the same as the vector numbers used to attach individual interrupt sources. For a CPU without vectored interrupts, only vector number 0 is valid. os_claim_vectors may not be called from pfxinitpsm. It is typically called from MSOP_INIT_CPU(D2psm), MSOP_INTR_ATTACH(D2psm) and MSOP_INTR_DETACH(D2psm).

The specified interrupt delivery function will be called whenever an interrupt for one of the vectors in the range is delivered to the CPU, after processor registers and operating-system specific states have been saved. This function is responsible for identifying the interrupt slot for which the interrupt was delivered, either by simply looking at the CPU vector number argument or by examining some platform-specific hardware state as well. It must then return a pointer to the interrupt distribution structure that corresponds to the interrupt slot, as previously specified by MSOP_INTR_ATTACH(D2psm).

If the PSM detects that the interrupt was the result of one or more special events, it must call os_post_events(D3psm) to inform the core kernel of the events. (See also ms_event_t in Intro(D4psm) and MSOP_XPOST(D2psm) for details of special events.) Events may be derived from the device interrupts, or they may occur independently.

If the interrupt was handled internally to the PSM (for example, a spurious interrupt or a special event), and no attached handler is invoked, the delivery function should return the value of os_intr_dist_nop. If the delivery function can determine no reason for the interrupt to have occurred (nothing was attached to the interrupt slot, and it was not an internal event), the delivery function should return the value of os_intr_dist_stray.

The interrupt delivery function will be called with interrupts disabled at the CPU.

os_claim_vectors may be called multiple times, to claim discontiguous ranges or to assign different functions to different vectors. It may also be called at any time for vectors that have already been claimed, to change the function assigned to them.

os_claim_vectors affects all CPUs.


first of the range of vectors to be handled by the specified delivery function

the number of vectors to be handled

the address of the PSM handler for the specified range

the vector number of the current interrupt

Return values



Hardware applicability


Version applicability

psm: 2


MSOP_INTR_ATTACH(D2psm), MSOP_XPOST(D2psm), os_post_events(D3psm)
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - 19 June 2005