You copied the Doc URL to your clipboard.

3.3.16. c6, Watchpoint Fault Address Register, WFAR

The purpose of the Watchpoint Fault Address Register (WFAR) is to hold the Virtual Address of the instruction that triggered the watchpoint.

The Watchpoint Fault Address Register is:

  • in CP15 c6

  • a 32-bit read/write register

  • accessible in privileged mode only.

The contents of the WFAR are Unpredictable after a precise Data Abort or Instruction Abort occurs.

Register bits[31:0] contain the virtual address that indicates the instruction that triggered the watchpoint. The register reset value is 0.

Accessing the Watchpoint Fault Address Register

Table 3.67 shows the results of attempted accesses to the Watchpoint Fault Address Register for each mode.

Table 3.68. Results of accesses to the Watchpoint Fault Address Register
Privileged readPrivileged writeUser read or write
Data readData writeUndefined Instruction exception

To access the Watchpoint Fault Address Register you read or write CP15 with:

  • Opcode_1 set to 0

  • CRn set to c6

  • CRm set to c0

  • Opcode_2 set to 1.

For example:

MRC p15, 0, <Rd>, c6, c0, 1            ; Read Watchpoint Fault Address Register
MCR p15, 0, <Rd>, c6, c0, 1            ; Write Watchpoint Fault Address Register

If the watchpoint is taken when in ARM state, the WFAR contains the address of the instruction that triggered it plus 0x8. If the watchpoint is taken while in Thumb state, the WFAR contains the address of the instruction that triggered it plus 0x4. If the watchpoint is taken while in Jazelle state, the WFAR contains the address of the instruction causing it.

Writing CP15 c6 with Opcode_2 set to 1 sets the WFAR to the value of the data written. This is useful for a debugger to restore the value of the WFAR.