The purpose of the Vector Catch Register (VCR) is to enable vector catching. That is, to cause debug entry when a specified vector is committed for execution.
The VCR is:
in CP14 c7
a 32-bit read-write register
only accessible in privileged mode, with debug monitor mode enabled.
Figure 13.7 shows the arrangement of bits in the register.
Table 13.12 shows the bit field functions of the Vector Catch Register.
|Bits||Attributes||Description||Normal address||High vector address||Reset value|
|||RW||Vector catch enable, FIQ||0|
|||RW||Vector catch enable, IRQ|
Most recent[a] IRQ address
|Most recent[a] IRQ address||0|
|||RW||Vector catch enable, Data Abort||0|
|||RW||Vector catch enable, Prefetch Abort||0|
|||RW||Vector catch enable, SWI||0|
|||RW||Vector catch enable, Undefined Instruction||0|
|||RW||Vector catch enable, Reset||0|
If one of the bits in this register is set and the corresponding vector is committed for execution, then a Debug exception or Debug state entry might be generated, depending on the value of the DSCR[15:14] bits (see Behavior of the processor on debug events). Under this model, any kind of fetch of an exception vector can trigger a vector catch, not just fetches due to exception entries.
An update of the VCR might only occur several instruction
after the corresponding
MCR instruction. The update
only takes effect by the next Instruction Memory Barrier (IMB).
Table 13.13 shows the results of attempted accesses to the Vector Catch Register for each mode.
|Privileged read,[a] DSCR[15:14][b]=b10||Privileged write,[a] DSCR[15:14][b]=b10||Privileged read or write, DSCR[15:14][b] !=b10||User read or write|
|Data read||Data write||Undefined Instruction exception||Undefined Instruction exception|
[a] These accesses are also possible when the processor is in Debug state.
To access the Vector Catch Register you read or write CP14 with:
Opcode_1 set to 0
CRn set to c0
CRm set to c7
Opcode_2 set to 0.
MRC p14,0,<Rd>,c0,c7,0 ; Read the Vector Catch Register
MCR p14,0,<Rd>,c0,c7,0 ; Write the Vector Catch Register