In the base environment, each hardware interrupt vector in the processor IDT points to a small assembly language stub that saves a standard trap frame (15.8.1), disables and acknowledges the hardware interrupt, and calls a designated high-level handler routine specified in the base_irq_handlers table (15.12.2). Initially, all the entries in this table point to base_irq_default_handler (15.12.5). Custom interrupt handlers can be installed by changing the appropriate entry in the table. The default action for all interrupts can be changed by overriding base_irq_default_handler.
The base environment also includes support for a single ``software interrupt.'' A software interrupt is delivered after all pending hardware interrupts have been processed but before returning from the interrupt context. A software interrupt can be posted at any time with base_irq_softint_request (15.12.7) but will only be triggered upon return from a hardware interrupt; i.e., processing of a software interrupt requested from a non-interrupt context is deferred until a hardware interrupt occurs. The software interrupt handler is contained in the function pointer base_irq_softint_handler (15.12.8), and initially points to the function base_irq_softint_default_handler, but can be replaced by a custom version provided by the kernel.