SNIU028D February 2016 – September 2020 UCD3138 , UCD3138064 , UCD3138064A , UCD3138128 , UCD3138A , UCD3138A64
During the ordinary flow of execution in a user program, the Program Counter usually increases sequentially through the address space, with perhaps a branch here or there to nearby labels, or with branch-and-links to subroutines and functions.
An exception causes this normal flow of execution to be diverted. Exceptions are generated by sources internal or external to the processor. This allows the processor to handle events generated by these sources. Such events include:
The ARM processor supports seven types of exceptions. These are listed in Table 14-5, along with the processor mode that is used to handle it. When an exception occurs, the processor branches to a fixed address that corresponds to that exception. This fixed address, called the exception vector address, is located in the bottom 32 bytes of the memory map. These 32 bytes are called the exception vector table.
Note, from Table 14-5, that there is just enough room at each vector address for one instruction (4 bytes). This is usually initialized to be a branch instruction or something like “ldr pc, [pc, #24]”.
Exception Type | Processor Mode | Vector Address |
---|---|---|
Reset | Supervisor | 0x0000000 |
Undefined Instructions | Undefined | 0x0000004 |
Software Interrupt (swi) | Supervisor | 0x0000008 |
Prefetch Abort (instruction fetch memory abort) | Abort | 0x000000C |
Data Abort (data access memory abort) | Abort | 0x0000010 |
Interrupt (IRQ) | Interrupt (IRQ) | 0x0000018 |
Fast Interrupt (FIQ) | Fast Interrupt (FIQ) | 0x000001C |