Traps, interrupts and exceptions are basically the same thing and are
handled the same by the CPU. Below are some quick definitions:
Traps:
Exceptions that are reported immediately after the execution of
the instruction which caused the problem. User defined interrupts
are examples of traps.
Interrupts:
Used to handle external asynchronous events (i.e., signals that
come from the bus are interrupts 33-255 in decimal or 0x21-0xFF
in hex). The message "Trap 0xFF", which translates into "Trap
255", indicates bad hardware; only a piece of hardware on the bus
can generate that number.
Exceptions:
Used to handle instruction faults.
Interrupts 19-32 decimal or 0x13-0x20 in hex are INTEL RESERVED.
Key for the type column below:
NMI = Non maskable interrupts. These provide a method of
servicing very high priority interrupts. They are
generated by hardware.
Fault = Exceptions that are detected and serviced before the
execution of the faulting instruction (i.e., page faults).
Abort = Exceptions which do not permit the precise location of
the instruction causing the exception to be determined.
These are used to report severe errors such as a hardware
error or illegal values in system tables.
Below is a table that shows a list of interrupts, what type it is,
and a description of what could cause that interrupt.
NOTE:
depending upon context, the number of an exception may appear
in decimal instead of hex; the exception type may appear as "trap",
"fault", or "exception", regardless of how the types are specified
below. For instance, a page fault (0x0E) occurring in kernel mode
is likely to cause a panic, some of whose printed output may appear
on the console screen as "TRAPNO=14" or something similar to this.
Int Type Cause
___ ____ _____________
0x00 Fault Divide error.
0x01 Trap Not used in XENIX or UNIX.
0x02 NMI NMI interrupt.
0x03 Trap Not used in XENIX or UNIX.
0x04 Trap Interrupt on overflow.
0x05 Fault Array bounds check.
0x06 Fault Invalid op code. Can be caused by any illegal
instruction, caching, bad hardware, bad
instruction from memory or bad memory itself.
0x07 Fault Device not available (i.e., co-processor trap for
one that does not exist).
0x08 Abort Double fault. Causes the classic double panic.
The kernel paniced while it was panicing. This is
caused by any illegal instruction from a third
party software package or from bad RAM.
0x09 Abort Co-processor segment overrun.
0x0A Fault Invalid task state, corresponds to how the 386
does 8086 emulation. SCO VP/ix related problems or
bad hardware.
0x0B Fault Segment not present. Addressing problem. Suspect
bad memory or 3rd party device driver conflict.
0x0C Fault Stack fault. Only occurs in kernel mode. Fixed
size stack is being overflowed. For example, a bad
internal modem could be flooding the stack.
0x0D Fault General protection trap. Caused by any memory
reference or invalid address. Could also be a
parity error from bad RAM
0x0E Fault Page fault, addressing problem because the kernel
tried to reference a page that it couldn't bring
in to memory. Could be a memory problem (bad RAM)
or a 3rd party device driver bug.
0x0F Not Used in XENIX or UNIX.
0x10 Fault Coprocessor Error, hardware problem.
0x11 Fault Alignment Check. Caused by memory reference to
data at unaligned data address. Could be a 3rd
party device driver bug.
0x12 Machine Check (Pentium only), model dependent.
SEE ALSO:
Technical Article 111621, "What caused my computer to panic with trap type
0x0000000E?"
|