| |||
| Home > Debug > Debug registers > CP14 c80-c85, Breakpoint Control Registers (BCR) | |||
These registers contain the necessary control bits for setting:
breakpoints
linked breakpoints.
Table 13.10 lists the Breakpoint Control Registers and that the processor implements.
Table 13.10. Processor Breakpoint Control Registers
| Binary address | Register number | CP14 debug register name | Abbreviation | Context ID capable? | |
|---|---|---|---|---|---|
| Opcode_2 | CRm | ||||
| b101 | b0000-b0011 | c80-c83 | Breakpoint Control Registers 0-3 | BCR0-3 | No |
| b0100-b0101 | c84-c85 | Breakpoint Control Registers 4-5 | BCR4-5 | Yes | |
Figure 13.6 shows the format of the Breakpoint Control Registers.
Table 13.11 lists the bit field definitions for the Breakpoint Control Registers.
Table 13.11. Breakpoint Control Registers, bit field definitions
| Bits | Read/write attributes | Reset value | Description |
|---|---|---|---|
| [31:23] | UNP/SBZP | - | Reserved. |
| [22:21] | RW | 00 | Meaning of BVR00 = IMVA Match.01 = Context ID Match.10 = IMVA Mis-match.11 = Reserved. If this breakpoint does not have Context ID capability, bit 21 is RAZ. |
| [20] | RW | - | Enable linking: 0 = Linking disabled 1 = Linking enabled. When this bit is set HIGH, the corresponding BRP is linked. See Table 13.12 for details. |
| [19:16] | RW | - | Linked BRP number. The binary number encoded here indicates another BRP to link this one with. If a BRP is linked with itself, it is architecturally Unpredictable if a breakpoint debug event is generated. For ARM1176JZF-S processors the breakpoint debug event is not generated. |
| [15:14] | RW | - | b00 = Breakpoint matches in Secure or Non-secure world. b01 = Breakpoint only matches in Non-secure world. b10 = Breakpoint only matches in Secure world.b11 = Reserved If this BRP is programmed for context ID comparison and linking (BCR[22:20] is set b011), then the BCR[15:14] field of the IMVA-holding BRP takes precedence and it is Undefined whether this field is included in the comparison or not. Therefore, it must be set to b00. The WCR[15:14] field of a WRP linked with this BRP also takes precedence over this field. |
| [13:9] | UNP/SBZP | - | Reserved. |
| [8:5] | RW | - | Byte address select. The BVR is programmed with a word address. You can use this field to program the breakpoint so it matches only if certain byte addresses are accessed. b0000 = The breakpoint never matches bxxx1= If the byte at address {BVR[31:2], b00}+0 is accessed, the breakpoint matches bxx1x = If the byte at address {BVR[31:2], b00}+1 is accessed, the breakpoint matches bx1xx = If the byte at address {BVR[31:2], b00}+2 is accessed, the breakpoint matches b1xxx = If the byte at address {BVR[31:2], b00}+3 is accessed, the breakpoint matches. This field must be set to b1111 when this BRP is programmed for context ID comparison, that is BCR[22:20] set to b01x. Otherwise breakpoint or watchpoint debug events might not be generated as expected. NoteThese are little-endian byte addresses. This ensures that a breakpoint is triggered regardless of the endianness of the instruction fetch. For example, if a breakpoint is set on a certain Thumb instruction by doing BCR[8:5] = b0011, it is triggered if in little-endian and IMVA[1:0] is b00 or if big-endian and IMVA[1:0] is b10. |
| [4:3] | UNP/SBZP | - | Reserved |
| [2:1] | RW | - | Supervisor Access. The breakpoint can be conditioned to the privilege of the access being done: b00 = Reserved b01= Privileged b10 = User b11 = Either. If this BRP is programmed for context ID comparison and linking, BCR[22:20] is set b011, then the BCR[2:1] field of the IMVA-holding BRP takes precedence and it is Undefined whether this field is included in the comparison or not. Therefore, it must be set to either. The WCR[2:1] field of a WRP linked with this BRP also takes precedence over this field. |
| [0] | RW | 0 | Breakpoint enable: 0 = Breakpoint disabled 1 = Breakpoint enabled. |
Table 13.12 summarizes the meaning of BCR bits [22:20].
Table 13.12. Meaning of BCR[22:20] bits
| BCR[22:20] | Meaning |
|---|---|
| b000 | The corresponding BVR is compared against the IMVA bus. This BRP is not linked with any other one. It generates a breakpoint debug event on an IMVA match. |
| b001 | The corresponding BVR is compared against the IMVA bus. This BRP is linked with the one indicated by BCR[19:16] linked BRP field. They generate a breakpoint debug event on a joint IMVA and context ID match. |
| b010 | The corresponding BVR is compared against CP15 Context Id Register, c13. This BRP is not linked with any other one. It generates a breakpoint debug event on a context ID match. |
| b011 | The corresponding BVR is compared against CP15 Context Id Register, c13. Another BRP, of the BCR[21:20]=b01 type, or WRP, with WCR[20]=b1, is linked with this BRP. They generate a breakpoint or watchpoint debug event on a joint IMVA or DMVA and context ID match. |
| b100 | The corresponding BVR is compared against the IMVA bus. This BRP is not linked with any other one. It generates a breakpoint debug event on an IMVA mismatch. |
| b101 | The corresponding BVR is compared against the IMVA bus. This BRP is linked with the one indicated by BCR[19:16] linked BRP field. They generate a breakpoint debug event on a joint IMVA mismatch and context ID match. |
| b110 | Reserved |
| b111 | Reserved |
The BCR[8:5], BCR[15:14], and BCR[2:1] fields still apply when a BRP is set for context ID comparison. See Setting breakpoints, watchpoints, and vector catch debug events for detailed programming sequences for linked breakpoints and linked watchpoints.
The BCR[8:5] field is treated as part of the compared address, For an IMVA mismatch the bits must be set to 1 for the corresponding byte lanes that are excluded from the breakpoint.
The following rules apply to the processor for breakpoint debug event generation:
The update of a BVR or a BCR can take effect several instructions after the corresponding MCR. It takes effect by the next IMB.
Updates of the CP15 Context ID Register c13, can take effect several instructions after the corresponding MCR. However, the write takes place by the end of the exception return. This is to ensure that a User mode process, switched in by a processor scheduler, can break at its first instruction.
Any BRP, holding an IMVA, can be linked with any other one with context ID capability. Several BRPs, holding IMVAs, can be linked with the same context ID capable one.
If a BRP, holding an IMVA, is linked with one that is not configured for context ID comparison and linking, it is architecturally Unpredictable whether a breakpoint debug event is generated or not. For ARM1176JZF-S processors the breakpoint debug event is not generated. BCR[22:20] fields of the second BRP must be set to b011.
If a BRP, holding an IMVA, is linked with one that is not implemented, it is architecturally Unpredictable if a breakpoint debug event is generated or not. For ARM1176JZF-S processors the breakpoint debug event is not generated.
If a BRP is linked with itself, it is architecturally Unpredictable if a breakpoint debug event is generated or not. For ARM1176JZF-S processors the breakpoint debug event is not generated.
If a BRP, holding an IMVA, is linked with another BRP, holding a context ID value, and they are not both enabled, both BCR[0] bits set, the first one does not generate any breakpoint debug event.