NAME
isr_add,
isr_add_autovect,
isr_add_vectored,
isr_add_custom —
establish interrupt handler
SYNOPSIS
#include <sun3/autoconf.h>
typedef int (*isr_func_t)(void *);
void
isr_add_autovect(
isr_func_t
fun,
void *arg,
int level);
void
isr_add_vectored(
isr_func_t
fun,
void *arg,
int pri,
int vec);
void
isr_add_custom(
int
level,
void *fun);
DESCRIPTION
The
isr_add functions establish interrupt handlers into the
system interrupt dispatch table and are typically called from device drivers
during the autoconfiguration process.
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 suspends normal instruction execution and begins an interrupt acknowledge
cycle on the system bus. During this cycle the interrupting device directs how
the CPU is to dispatch its interrupt request.
If the interrupting device is integrated tightly with the system bus, 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 vector number to use is determined by adding the interrupt priority
(0–6) to an autovector base (typically
18
hexadecimal
).
-
-
- isr_add_autovect()
- Adds the function fun to the list of
interrupt handlers to be called during an autovectored interrupt of
priority level. The pointer
arg is passed to the function as its first
argument.
-
-
- isr_add_vectored()
- Adds the function fun to the list of
interrupt handlers to be called during a vectored interrupts of priority
pri at dispatch vector number
vec. The pointer arg is passed
to the function as its first argument.
-
-
- isr_add_custom()
- Establish function fun as the
interrupt handler for vector level. The autovector
base number is automatically added to level.
fun 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 fun be written in assembler.
CODE REFERENCES
sys/arch/sun3/sun3/isr.c
REFERENCES
MC68030 User's Manual, Third edition, MC68030UM/AD Rev 2, Motorola Inc.
BUGS
There is no way to remove a handler once it has been added.