MDCR_EL2
Monitor Debug Configuration Register (EL2)
Provides EL2 configuration options for self-hosted debug and the Performance Monitors Extension.
Configuration
AArch64 System register MDCR_EL2 bits [31:0] are architecturally mapped to AArch32 System register HDCR[31:0].
This register is present only when FEAT_AA64 is implemented. Otherwise, direct accesses to MDCR_EL2 are UNDEFINED.
If EL2 is not implemented, this register is RES0 from EL3.
This register has no effect if EL2 is not enabled in the current Security state.
Attributes
MDCR_EL2 is a 64-bit register.
Field descriptions
| 63 | 62 | 61 | 60 | 59 | 58 | 57 | 56 | 55 | 54 | 53 | 52 | 51 | 50 | 49 | 48 | 47 | 46 | 45 | 44 | 43 | 42 | 41 | 40 | 39 | 38 | 37 | 36 | 35 | 34 | 33 | 32 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| RES0 | EnSTEPOP | RES0 | EBWE | RES0 | PMEE | RES0 | HPMFZS | RES0 | |||||||||||||||||||||||
| PMSSE | HPMFZO | MTPME | TDCC | HLP | E2TB | HCCD | RES0 | TTRF | RES0 | HPMD | RES0 | EnSPM | TPMS | E2PB | TDRA | TDOSA | TDA | TDE | HPME | TPM | TPMCR | HPMN | |||||||||
Bits [63:51]:
Reserved, RES0.
EnSTEPOP, bit [50] when FEAT_STEP2 is implemented:
| EnSTEPOP | Meaning |
|---|---|
| 0b0 |
Execution from MDSTEPOP_EL1 is disabled. |
| 0b1 |
Execution from MDSTEPOP_EL1 is not disabled by this control. |
If EL2 is not implemented or EL2 is disabled in the current Security state, then the Effective value of this field is 1, other than for a direct read of the register.
The reset behavior of this field is:
- On a Warm reset, this field resets to an architecturally UNKNOWN value.
Otherwise:
Reserved, RES0.
Bits [49:44]:
Reserved, RES0.
EBWE, bit [43] when FEAT_Debugv8p9 is implemented:
Extended Breakpoint and Watchpoint Enable. Enables use of additional breakpoints or watchpoints.
| EBWE | Meaning |
|---|---|
| 0b0 |
The Effective value of MDSCR_EL1.EMBWE is 0. The Effective value of MDSELR_EL1.BANK is zero at EL2. |
| 0b1 |
The Effective values of MDSCR_EL1.EMBWE and MDSELR_EL1.BANK are not affected by this field. |
It is IMPLEMENTATION DEFINED whether this field is implemented or is RES0 when 16 or fewer breakpoints are implemented, 16 or fewer watchpoints are implemented, and MDSELR_EL1 is implemented as RAZ/WI.
If EL2 is not implemented or EL2 is disabled in the current Security state, then the Effective value of this field is 1, other than for a direct read of the register.
This field is ignored by the PE and treated as 0 when EL3 is implemented and MDCR_EL3.EBWE is 0.
The reset behavior of this field is:
-
On a Warm reset:
- When the highest implemented Exception level is EL2, this field resets to '0'.
- Otherwise, this field resets to an architecturally UNKNOWN value.
Otherwise:
Reserved, RES0.
Bit [42]:
Reserved, RES0.
PMEE, bits [41:40] when FEAT_EBEP is implemented:
Performance Monitors Exception Enable. Controls the generation of the PMUIRQ signal and the PMU Profiling exception at EL0, EL1, and EL2.
| PMEE | Meaning |
|---|---|
| 0b00 |
The PMUIRQ signal is asserted on a PMU overflow, and the PMU Profiling exception is disabled. |
| 0b01 |
The PMUIRQ signal and the PMU Profiling exception are both controlled by PMECR_EL1.PMEE. |
| 0b11 |
The PMUIRQ signal is deasserted, and the PMU Profiling exception is enabled. |
All other values are reserved.
If EL2 is not implemented or EL2 is disabled in the current Security state, then the Effective value of this field is 0b01, other than for a direct read of the register.
This field is ignored by the PE when all of the following are true:
- EL3 is implemented.
- MDCR_EL3.PMEE != 0b01.
The reset behavior of this field is:
-
On a Warm reset:
- When the highest implemented Exception level is EL2, this field resets to '00'.
- Otherwise, this field resets to an architecturally UNKNOWN value.
Otherwise:
Reserved, RES0.
Bits [39:37]:
Reserved, RES0.
HPMFZS, bit [36] when FEAT_SPEv1p2 is implemented:
Hyp Performance Monitors Freeze-on-SPE event. Stop counters when PMBLIMITR_EL1.{PMFZ,E} is {1,1} and profiling is stopped.
| HPMFZS | Meaning |
|---|---|
| 0b0 |
Do not freeze on a Statistical Profiling Buffer Management event. |
| 0b1 |
Affected counters do not count following a Statistical Profiling Buffer Management event. |
The pseudocode function SPEProfilingStopped() describes when profiling is stopped.
The counters affected by this field are the event counters in the second range. This applies even when EL2 is disabled in the current Security state.
Other event counters and PMCCNTR_EL0 are not affected by this field.
When FEAT_PMUv3_ICNTR is implemented, PMICNTR_EL0 is not affected by this field.
If MDCR_EL2.HPMN is equal to GetNumEventCountersSelfHosted(), then this field has no effect.
The reset behavior of this field is:
- On a Warm reset, this field resets to an architecturally UNKNOWN value.
Otherwise:
Reserved, RES0.
Bits [35:32]:
Reserved, RES0.
PMSSE, bits [31:30] when FEAT_PMUv3_SS is implemented:
Performance Monitors Snapshot Enable. Controls the generation of Capture events.
| PMSSE | Meaning |
|---|---|
| 0b00 |
Capture events are disabled. |
| 0b01 |
Capture events are controlled by PMECR_EL1.SSE. |
| 0b10 |
Capture events are enabled and prohibited. |
| 0b11 |
Capture events are enabled and allowed. |
If EL2 is not implemented, then the Effective value of this field is 0b01.
The reset behavior of this field is:
-
On a Cold reset:
- When the highest implemented Exception level is EL2, this field resets to '00'.
- Otherwise, this field resets to an architecturally UNKNOWN value.
Otherwise:
Reserved, RES0.
HPMFZO, bit [29] when FEAT_PMUv3p7 is implemented:
Hyp Performance Monitors Freeze-on-overflow. Stop event counters on overflow.
| HPMFZO | Meaning |
|---|---|
| 0b0 |
Do not freeze on overflow. |
| 0b1 |
Affected counters do not count when PMOVSCLR_EL0[m] is 1 for any event counter PMEVCNTR<m>_EL0 in the second range. |
The counters affected by this field are the event counters in the second range. This applies even when EL2 is disabled in the current Security state.
Other event counters and PMCCNTR_EL0 are not affected by this field.
When FEAT_PMUv3_ICNTR is implemented, PMICNTR_EL0 is not affected by this field.
If MDCR_EL2.HPMN is equal to GetNumEventCountersSelfHosted(), then this field has no effect.
The reset behavior of this field is:
- On a Warm reset, this field resets to an architecturally UNKNOWN value.
Otherwise:
Reserved, RES0.
MTPME, bit [28] when FEAT_MTPMU is implemented and EL3 is not implemented:
Multi-threaded PMU Enable. Enables use of the PMEVTYPER<n>_EL0.MT bits.
| MTPME | Meaning |
|---|---|
| 0b0 |
FEAT_MTPMU is disabled. The Effective value of PMEVTYPER<n>_EL0.MT is 0. |
| 0b1 |
PMEVTYPER<n>_EL0.MT bits not affected by this field. |
If FEAT_MTPMU is disabled for any other PE in the system that has the same level 1 Affinity as the PE, it is IMPLEMENTATION DEFINED whether the PE behaves as if this field is 0.
The reset behavior of this field is:
- On a Cold reset, this field resets to '1'.
Otherwise:
Reserved, RES0.
TDCC, bit [27] when FEAT_FGT is implemented:
Trap DCC. Traps use of the Debug Comms Channel at EL1 and EL0 to EL2.
| TDCC | Meaning |
|---|---|
| 0b0 |
This control does not cause any register accesses to be trapped. |
| 0b1 |
If EL2 is implemented and enabled in the current Security state, accesses to the DCC System registers at EL1 and EL0 generate a Trap exception to EL2, unless the access also generates a higher priority exception. Traps on the DCC data transfer registers are ignored when the PE is in Debug state. |
The DCC System registers trapped by this control are:
AArch64: In Non-debug state, OSDTRRX_EL1, OSDTRTX_EL1, MDCCSR_EL0, MDCCINT_EL1, DBGDTR_EL0, DBGDTRRX_EL0, and DBGDTRTX_EL0.
AArch32: In Non-debug state, DBGDTRRXext, DBGDTRTXext, DBGDSCRint, DBGDCCINT, DBGDTRRXint, and DBGDTRTXint.
The traps are reported with EC syndrome value:
- 0x05 for trapped AArch32 MRC and MCR accesses with coproc == 0b1110.
- 0x06 for trapped AArch32 LDC to DBGDTRTXint and STC from DBGDTRRXint.
- 0x18 for trapped AArch64 MRS and MSR accesses.
It is CONSTRAINED UNPREDICTABLE whether the following accesses are trapped in Debug state:
- AArch64 accesses to OSDTRRX_EL1, OSDTRTX_EL1, MDCCSR_EL0, and MDCCINT_EL1.
- AArch32 accesses to DBGDTRRXext, DBGDTRTXext, DBGDSCRint, and DBGDCCINT.
When the PE is in Debug state, MDCR_EL2.TDCC does not trap any accesses to:
AArch64: DBGDTR_EL0, DBGDTRRX_EL0, and DBGDTRTX_EL0.
AArch32: DBGDTRRXint and DBGDTRTXint.
The reset behavior of this field is:
- On a Warm reset, this field resets to an architecturally UNKNOWN value.
Otherwise:
Reserved, RES0.
HLP, bit [26] when FEAT_PMUv3p5 is implemented:
Hypervisor Long Event Counter Enable. Determines which event counter bit generates an overflow recorded by PMOVSR[n].
| HLP | Meaning |
|---|---|
| 0b0 |
Affected counters overflow on increment that causes unsigned overflow of PMEVCNTR<n>_EL0[31:0]. |
| 0b1 |
Affected counters overflow on increment that causes unsigned overflow of PMEVCNTR<n>_EL0[63:0]. |
When FEAT_EBEP is implemented and the PMU Profiling exception is enabled, the Effective value of this field is 1.
The counters affected by this field are the event counters in the second range. This applies even when EL2 is disabled in the current Security state.
The following are not affected by this field:
- Other event counters.
- PMCCNTR_EL0.
- If FEAT_PMUv3_ICNTR is implemented, PMICNTR_EL0.
If MDCR_EL2.HPMN is equal to GetNumEventCountersSelfHosted(), then this field has no effect.
For more information see the description of MDCR_EL2.HPMN.
The reset behavior of this field is:
- On a Warm reset, this field resets to an architecturally UNKNOWN value.
Otherwise:
Reserved, RES0.
E2TB, bits [25:24] when FEAT_TRBE is implemented:
EL2 Trace Buffer.
If EL2 is implemented and enabled in the trace buffer owning Security state, then this field controls the trace buffer owning translation regime.
If EL2 is implemented and enabled in the current Security state, then this field controls access to trace buffer System registers from EL1.
| E2TB | Meaning |
|---|---|
| 0b00 |
If EL2 is implemented and enabled in the trace buffer owning Security state, then the trace buffer owning Exception level is EL2. Otherwise, the trace buffer owning Exception level is EL1 and, if TraceBufferEnabled() == TRUE, tracing is prohibited at EL2. If EL2 is implemented and enabled in the current Security state, then accesses to trace buffer System registers at EL1 are trapped to EL2, unless the access generates a higher priority exception. |
| 0b10 |
Trace buffer owning Exception level is EL1. If TraceBufferEnabled() == TRUE, then tracing is prohibited at EL2. If EL2 is implemented and enabled in the current Security state, then accesses to trace buffer System registers at EL1 are trapped to EL2, unless the access generates a higher priority exception. |
| 0b11 |
Trace buffer owning Exception level is EL1. If TraceBufferEnabled() == TRUE, then tracing is prohibited at EL2. Accesses to trace buffer System registers at EL1 are not trapped by this mechanism. |
All other values are reserved.
In AArch64 state, the instructions affected by this control are:
- MRS and MSR accesses to TRBBASER_EL1, TRBLIMITR_EL1, TRBMAR_EL1, TRBPTR_EL1, TRBSR_EL1, and TRBTRG_EL1.
- If FEAT_TRBE_MPAM is implemented, MRS and MSR accesses to TRBMPAM_EL1.
- If FEAT_TRBE_EXC is implemented, MRS and MSR accesses to TRBSR_EL2 and TRBSR_EL12.
Unless the instruction generates a higher priority exception, trapped instructions generate an exception to EL2, reported using EC syndrome value 0x18.
When TraceBufferEnabled()==FALSE, this field has no effect on whether tracing is prohibited.
The reset behavior of this field is:
- On a Warm reset, this field resets to an architecturally UNKNOWN value.
Otherwise:
Reserved, RES0.
HCCD, bit [23] when FEAT_PMUv3p5 is implemented:
Hypervisor Cycle Counter Disable. Prohibits PMCCNTR_EL0 from counting at EL2.
| HCCD | Meaning |
|---|---|
| 0b0 |
Cycle counting by PMCCNTR_EL0 is not affected by this mechanism. |
| 0b1 |
Cycle counting by PMCCNTR_EL0 is prohibited at EL2. |
This field does not affect the CPU_CYCLES event or any other event that counts cycles.
The reset behavior of this field is:
- On a Warm reset, this field resets to '0'.
Otherwise:
Reserved, RES0.
Bits [22:20]:
Reserved, RES0.
TTRF, bit [19] when FEAT_TRF is implemented:
Traps use of the Trace Filter Control registers at EL1 to EL2, as follows:
-
Access to TRFCR_EL1 is trapped to EL2, reported using EC syndrome value 0x18.
-
Access to TRFCR is trapped to EL2, reported using EC syndrome value 0x03.
| TTRF | Meaning |
|---|---|
| 0b0 |
Accesses to the specified registers at EL1 are not affected by this control. |
| 0b1 |
Accesses to the specified registers at EL1 generate a trap exception to EL2 when EL2 is enabled in the current Security state. |
The reset behavior of this field is:
- On a Warm reset, this field resets to an architecturally UNKNOWN value.
Otherwise:
Reserved, RES0.
Bit [18]:
Reserved, RES0.
HPMD, bit [17] when FEAT_PMUv3p1 is implemented and FEAT_Debugv8p2 is implemented:
Guest Performance Monitors Disable. Controls PMU operation at EL2.
| HPMD | Meaning |
|---|---|
| 0b0 |
Counters are not affected by this mechanism. |
| 0b1 |
Affected counters are prohibited from counting at EL2. If PMCR_EL0.DP is 1, then PMCCNTR_EL0 is disabled at EL2. Otherwise, PMCCNTR_EL0 is not affected by this mechanism. |
The counters affected by this field are:
- Event counters in the first range.
- If FEAT_PMUv3_ICNTR is implemented, the instruction counter PMICNTR_EL0.
- If PMCR_EL0.DP is 1, the cycle counter PMCCNTR_EL0.
Other event counters are not affected by this field.
When PMCR_EL0.DP is 0, PMCCNTR_EL0 is not affected by this field.
The reset behavior of this field is:
- On a Warm reset, this field resets to '0'.
when FEAT_PMUv3p1 is implemented:
Guest Performance Monitors Disable. Controls PMU operation at EL2 when ExternalSecureNoninvasiveDebugEnabled() is FALSE.
| HPMD | Meaning |
|---|---|
| 0b0 |
Counters are not affected by this mechanism. |
| 0b1 |
If ExternalSecureNoninvasiveDebugEnabled() is FALSE, then all the following apply:
|
If ExternalSecureNoninvasiveDebugEnabled() is TRUE, then the event counters and PMCCNTR_EL0 are not affected by this field.
Otherwise, the counters affected by this field are:
- Event counters in the first range.
- If PMCR_EL0.DP is 1, the cycle counter, PMCCNTR_EL0.
Other event counters are not affected by this field. When PMCR_EL0.DP is 0, PMCCNTR_EL0 is not affected by this field.
The reset behavior of this field is:
- On a Warm reset, this field resets to '0'.
Otherwise:
Reserved, RES0.
Bit [16]:
Reserved, RES0.
EnSPM, bit [15] when FEAT_SPMU is implemented:
Enable access to System PMU registers. When disabled, accesses to System PMU registers generate a trap to EL2.
| EnSPM | Meaning |
|---|---|
| 0b0 |
Accesses of the specified System PMU registers at EL1 and EL0 are trapped to EL2, unless the instruction generates a higher priority exception. |
| 0b1 |
Accesses of the specified System PMU registers are not trapped by this mechanism. |
In AArch64 state, the instructions affected by this control are: MRS and MSR accesses to SPMACCESSR_EL1, SPMCFGR_EL1, SPMCGCR<n>_EL1, SPMCNTENCLR_EL0, SPMCNTENSET_EL0, SPMCR_EL0, SPMDEVAFF_EL1, SPMDEVARCH_EL1, SPMEVCNTR<n>_EL0, SPMEVFILT2R<n>_EL0, SPMEVFILTR<n>_EL0, SPMEVTYPER<n>_EL0, SPMIIDR_EL1, SPMINTENCLR_EL1, SPMINTENSET_EL1, SPMOVSCLR_EL0, SPMOVSSET_EL0, SPMSCR_EL1, and SPMSELR_EL0.
Trapped instructions are reported using EC syndrome value 0x18.
The reset behavior of this field is:
- On a Warm reset, this field resets to an architecturally UNKNOWN value.
Otherwise:
Reserved, RES0.
TPMS, bit [14] when FEAT_SPE is implemented:
Trap Performance Monitor Sampling. Enables a trap to EL2 on accesses of SPE registers.
| TPMS | Meaning |
|---|---|
| 0b0 |
Accesses of the specified SPE registers are not trapped by this mechanism. |
| 0b1 |
Accesses of the specified SPE registers at EL1 are trapped to EL2, unless the instruction generates a higher priority exception. |
In AArch64 state, the instructions affected by this control are:
- MRS and MSR accesses to PMSCR_EL1, PMSEVFR_EL1, PMSFCR_EL1, PMSICR_EL1, PMSIRR_EL1, and PMSLATFR_EL1.
- MRS accesses to PMSIDR_EL1.
- If FEAT_SPE_FnE is implemented, MRS and MSR accesses to PMSNEVFR_EL1.
- If FEAT_SPE_FDS is implemented, MRS and MSR accesses to PMSDSFR_EL1.
Trapped instructions are reported using EC syndrome value 0x18.
The reset behavior of this field is:
- On a Warm reset, this field resets to an architecturally UNKNOWN value.
Otherwise:
Reserved, RES0.
E2PB, bits [13:12] when FEAT_SPE is implemented:
EL2 Profiling Buffer.
If EL2 is implemented and enabled in the Profiling Buffer owning Security state, then this field controls the Profiling Buffer owning translation regime.
If EL2 is implemented and enabled in the current Security state, then this field controls access to Profiling Buffer System registers from EL1.
| E2PB | Meaning |
|---|---|
| 0b00 |
If EL2 is implemented and enabled in the Profiling Buffer owning Security state, then the Profiling Buffer owning Exception level is EL2. Otherwise, the Profiling Buffer owning Exception level is EL1 and, Profiling is prohibited at EL2. If EL2 is implemented and enabled in the current Security state, then accesses to Profiling Buffer System registers at EL1 are trapped to EL2, unless the access generates a higher priority exception. |
| 0b10 |
Profiling Buffer owning Exception level is EL1. Profiling is prohibited at EL2. If EL2 is implemented and enabled in the current Security state, then accesses to Profiling Buffer System registers at EL1 are trapped to EL2, unless the access generates a higher priority exception. |
| 0b11 |
Profiling Buffer owning Exception level is EL1. Profiling is prohibited at EL2. Accesses to Profiling Buffer System registers at EL1 are not trapped by this mechanism. |
All other values are reserved.
In AArch64 state, the instructions affected by this control are:
- MRS and MSR accesses to PMBLIMITR_EL1, PMBPTR_EL1, and PMBSR_EL1.
- If FEAT_SPE_nVM is implemented, MRS and MSR accesses to PMBMAR_EL1.
Unless the instruction generates a higher priority exception, trapped instructions generate an exception to EL2, reported using EC syndrome value 0x18.
The reset behavior of this field is:
- On a Warm reset, this field resets to an architecturally UNKNOWN value.
Otherwise:
Reserved, RES0.
TDRA, bit [11]:
Trap Debug ROM Address register access. Traps System register accesses to the Debug ROM registers to EL2 when EL2 is enabled in the current Security state as follows:
- If EL1 is using AArch64, accesses to MDRAR_EL1 are trapped to EL2, reported using EC syndrome value 0x18.
- If EL0 or EL1 is using AArch32 state, MRC or MCR accesses to the following registers are trapped to EL2, reported using EC syndrome value 0x05 and MRRC or MCRR accesses are trapped to EL2, reported using EC syndrome value 0x0C:
| TDRA | Meaning |
|---|---|
| 0b0 |
This control does not cause any instructions to be trapped. |
| 0b1 |
EL0 and EL1 System register accesses to the Debug ROM registers are trapped to EL2 when EL2 is enabled in the current Security state, unless it is trapped by the following:
|
This field is treated as being 1 for all purposes other than a direct read when one or more of the following are true:
- The Effective value of MDCR_EL2.TDE is 1.
- The Effective value of HCR_EL2.TGE is 1.
EL2 does not provide traps on debug register accesses through the optional memory-mapped external debug interfaces.
System register accesses to the debug System registers might have side-effects. When a System register access is trapped to EL2, no side-effects occur before the exception is taken to EL2.
The reset behavior of this field is:
- On a Warm reset, this field resets to an architecturally UNKNOWN value.
TDOSA, bit [10] when FEAT_DoubleLock is implemented:
Trap debug OS-related register access. Traps EL1 System register accesses to the powerdown debug System registers to EL2, from both Execution states as follows:
-
In AArch64 state, accesses to the following registers are trapped to EL2, reported using
EC syndrome value 0x18:
- OSLAR_EL1, OSLSR_EL1, OSDLR_EL1, and DBGPRCR_EL1.
- Any IMPLEMENTATION DEFINED register with similar functionality that the implementation specifies as trapped by this bit.
- In AArch32 state, accesses to the following registers are trapped to EL2, reported using EC syndrome value 0x05:
| TDOSA | Meaning |
|---|---|
| 0b0 |
This control does not cause any instructions to be trapped. |
| 0b1 |
EL1 System register accesses to the powerdown debug System registers are trapped to EL2 when EL2 is enabled in the current Security state. |
These registers are not accessible at EL0.
This field is treated as being 1 for all purposes other than a direct read when one or more of the following are true:
System register accesses to the debug System registers might have side-effects. When a System register access is trapped to EL2, no side-effects occur before the exception is taken to EL2.
The reset behavior of this field is:
- On a Warm reset, this field resets to an architecturally UNKNOWN value.
Otherwise:
Trap debug OS-related register access. Traps EL1 System register accesses to the powerdown debug System registers to EL2, from both Execution states as follows:
-
In AArch64 state, accesses to the following registers are trapped to EL2, reported using EC syndrome value 0x18:
-
OSLAR_EL1, OSLSR_EL1, and DBGPRCR_EL1.
-
Any IMPLEMENTATION DEFINED register with similar functionality that the implementation specifies as trapped by this bit.
-
-
In AArch32 state, accesses to the following registers are trapped to EL2, reported using EC syndrome value 0x05:
It is IMPLEMENTATION DEFINED whether accesses to OSDLR_EL1 are trapped.
It is IMPLEMENTATION DEFINED whether accesses to DBGOSDLR are trapped.
| TDOSA | Meaning |
|---|---|
| 0b0 |
This control does not cause any instructions to be trapped. |
| 0b1 |
EL1 System register accesses to the powerdown debug System registers are trapped to EL2 when EL2 is enabled in the current Security state. |
These registers are not accessible at EL0.
This field is treated as being 1 for all purposes other than a direct read when one or more of the following are true:
EL2 does not provide traps on debug register accesses through the optional memory-mapped external debug interfaces.
System register accesses to the debug System registers might have side-effects. When a System register access is trapped to EL2, no side-effects occur before the exception is taken to EL2.
The reset behavior of this field is:
- On a Warm reset, this field resets to an architecturally UNKNOWN value.
TDA, bit [9]:
Trap accesses of debug System registers. Enables a trap to EL2 on accesses of debug System registers.
| TDA | Meaning |
|---|---|
| 0b0 |
Accesses of the specified debug System registers are not trapped by this mechanism. |
| 0b1 |
Accesses of the specified debug System registers at EL1 and EL0 are trapped to EL2, unless the instruction generates a higher priority exception. |
In AArch64 state, the instructions affected by this control are:
- MRS and MSR accesses to DBGAUTHSTATUS_EL1, DBGBCR<n>_EL1, DBGBVR<n>_EL1, DBGCLAIMCLR_EL1, DBGCLAIMSET_EL1, DBGWCR<n>_EL1, DBGWVR<n>_EL1, and OSECCR_EL1.
- In Non-debug state, MRS and MSR accesses to MDCCINT_EL1, MDCCSR_EL0, MDSCR_EL1, OSDTRRX_EL1, and OSDTRTX_EL1.
- If FEAT_Debugv8p9 is implemented, MRS and MSR accesses to MDSELR_EL1.
- If FEAT_STEP2 is implemented, MRS and MSR accesses to MDSTEPOP_EL1.
- In Non-debug state, MRS accesses to DBGDTRRX_EL0 and DBGDTR_EL0 and MSR accesses to DBGDTRTX_EL0 and DBGDTR_EL0.
In AArch32 state, the instructions affected by this control are:
-
MRC and MCR accesses to DBGAUTHSTATUS, DBGBCR<n>, DBGBVR<n>, DBGBXVR<n>, DBGCLAIMCLR, DBGCLAIMSET, DBGDEVID, DBGDEVID1, DBGDEVID2, DBGDSCRext, DBGOSECCR, DBGVCR, DBGWCR<n>, DBGWFAR, and DBGWVR<n>.
-
In Non-debug state, MRC and MCR accesses to DBGDCCINT, DBGDIDR, DBGDSCRint, DBGDTRRXext, and DBGDTRTXext.
-
STC accesses to DBGDTRRXint and LDC accesses to DBGDTRTXint.
-
In Non-debug state, MRC accesses to DBGDTRRXint and MCR accesses to DBGDTRTXint.
Trapped AArch64 instructions are reported using EC syndrome value 0x18.
Trapped AArch32 instructions are reported using EC syndrome value 0x05 for MRC and MCR accesses, and 0x06 for LDC and STC accesses.
It is CONSTRAINED UNPREDICTABLE whether the following instructions are trapped in Debug state:
- AArch64 MRS and MSR accesses to MDCCINT_EL1, MDCCSR_EL0, MDSCR_EL1, OSDTRRX_EL1, and OSDTRTX_EL1.
- AArch32 MRC and MCR accesses to DBGDCCINT, DBGDIDR, DBGDSCRint, DBGDTRRXext, and DBGDTRTXext.
The following instructions are not trapped in Debug state:
- AArch64 MRS accesses to DBGDTRRX_EL0 and DBGDTR_EL0 and MSR accesses to DBGDTRTX_EL0 and DBGDTR_EL0.
- AArch32 MRC accesses to DBGDTRRXint and MCR accesses to DBGDTRTXint.
If 16 or fewer breakpoints and 16 or fewer watchpoints are implemented, and MDSELR_EL1 is implemented as RAZ/WI, then it is IMPLEMENTATION DEFINED whether AArch64 accesses to MDSELR_EL1 are trapped to EL2 when MDCR_EL2.TDA is 1.
This field is ignored by the PE and treated as one when any of the following are true:
The reset behavior of this field is:
- On a Warm reset, this field resets to an architecturally UNKNOWN value.
TDE, bit [8]:
Trap Debug Exceptions. Controls routing of Debug exceptions, and defines the debug target Exception level, ELD.
| TDE | Meaning |
|---|---|
| 0b0 |
The debug target Exception level is EL1. |
| 0b1 |
If EL2 is enabled for the current Effective value of SCR_EL3.NS, the debug target Exception level is EL2, otherwise the debug target Exception level is EL1. The MDCR_EL2.{TDRA, TDOSA, TDA} fields are treated as being 1 for all purposes other than returning the result of a direct read of the register. |
For more information, see 'Routing debug exceptions'.
This field is treated as being 1 for all purposes other than a direct read when the Effective value of HCR_EL2.TGE is 1.
The reset behavior of this field is:
- On a Warm reset, this field resets to an architecturally UNKNOWN value.
HPME, bit [7] when FEAT_PMUv3 is implemented:
Hyp Enable.
| HPME | Meaning |
|---|---|
| 0b0 |
Affected counters are disabled and do not count. |
| 0b1 |
Affected counters are enabled by PMCNTENSET_EL0. |
The counters affected by this field are the event counters in the second range. This applies even when EL2 is disabled in the current Security state.
The following counters are not affected by this field:
- Other event counters.
- PMCCNTR_EL0.
- If FEAT_PMUv3_ICNTR is implemented, PMICNTR_EL0.
If MDCR_EL2.HPMN is equal to GetNumEventCountersSelfHosted(), then this field has no effect.
The reset behavior of this field is:
- On a Warm reset, this field resets to an architecturally UNKNOWN value.
Otherwise:
Reserved, RES0.
TPM, bit [6] when FEAT_PMUv3 is implemented:
Trap accesses of PMU System registers. Enables a trap to EL2 on accesses of PMU System registers.
| TPM | Meaning |
|---|---|
| 0b0 |
Accesses of the specified PMU System registers are not trapped by this mechanism. |
| 0b1 |
Accesses of the specified PMU System registers at EL1 and EL0 are trapped to EL2, unless the instruction generates a higher priority exception. |
In AArch64 state, the instructions affected by this control are:
- MRS and MSR accesses to PMCCFILTR_EL0, PMCCNTR_EL0, PMCNTENCLR_EL0, PMCNTENSET_EL0, PMCR_EL0, PMEVCNTR<n>_EL0, PMEVTYPER<n>_EL0, PMINTENCLR_EL1, PMINTENSET_EL1, PMOVSCLR_EL0, PMOVSSET_EL0, PMSELR_EL0, PMSWINC_EL0, PMUSERENR_EL0, PMXEVCNTR_EL0, and PMXEVTYPER_EL0.
- MRS accesses to PMCEID0_EL0 and PMCEID1_EL0.
- If FEAT_PMUv3p4 is implemented, MRS accesses to PMMIR_EL1.
- If FEAT_PMUv3p9 is implemented, MSR accesses to PMZR_EL0.
- If FEAT_PMUv3_ICNTR is implemented, MRS accesses to PMICFILTR_EL0 and PMICNTR_EL0.
- If FEAT_EBEP is implemented or FEAT_PMUv3_SS is implemented, MRS and MSR accesses to PMECR_EL1.
In AArch32 state, the instructions affected by this control are:
-
MRC and MCR accesses to PMCCFILTR, PMCCNTR, PMCNTENCLR, PMCNTENSET, PMCR, PMEVCNTR<n>, PMEVTYPER<n>, PMINTENCLR, PMINTENSET, PMOVSR, PMOVSSET, PMSELR, PMSWINC, PMUSERENR, PMXEVCNTR, and PMXEVTYPER.
-
MRRC and MCRR accesses to PMCCNTR.
-
If FEAT_PMUv3p1 is implemented, MRC accesses to PMCEID2 and PMCEID3.
-
If FEAT_PMUv3p4 is implemented, MRC accesses to PMMIR.
Trapped AArch64 instructions are reported using EC syndrome value 0x18.
Trapped AArch32 instructions are reported using EC syndrome value 0x03 for MRC and MCR accesses, and 0x04 for MRRC and MCRR accesses.
The reset behavior of this field is:
- On a Warm reset, this field resets to an architecturally UNKNOWN value.
Otherwise:
Reserved, RES0.
TPMCR, bit [5] when FEAT_PMUv3 is implemented:
Trap PMCR_EL0 or PMCR accesses. Traps EL0 and EL1 accesses to EL2, when EL2 is enabled in the current Security state, as follows:
-
In AArch64 state, accesses to PMCR_EL0 are trapped to EL2, reported using EC syndrome value 0x18.
-
In AArch32 state, accesses to PMCR are trapped to EL2, reported using EC syndrome value 0x03.
| TPMCR | Meaning |
|---|---|
| 0b0 |
This control does not cause any instructions to be trapped. |
| 0b1 |
EL0 and EL1 accesses to the specified registers are trapped to EL2 when EL2 is enabled in the current Security state, unless they are trapped by the following:
|
EL2 does not provide traps on Performance Monitor register accesses through the optional memory-mapped external debug interface.
The reset behavior of this field is:
- On a Warm reset, this field resets to an architecturally UNKNOWN value.
Otherwise:
Reserved, RES0.
HPMN, bits [4:0] when FEAT_PMUv3 is implemented:
Defines the number of event counters PMEVCNTR<n>_EL0 and, if FEAT_PMUv3_SS is implemented, event counter snapshot registers PMEVCNTSVR<n>_EL1, that are accessible from EL1 and, if permitted, from EL0.
MDCR_EL2.HPMN divides the event counters accessible from self-hosted software into a first range and a second range.
When FEAT_PMUv3_EXTPMN is implemented, all of the following apply:
- PMCCR.EPMN divides the NUM_PMU_COUNTERS event counters implemented by the PE into the event counters that MDCR_EL2.HPMN divides into the first and second ranges, and a third range that is inaccessible from self-hosted software.
- If MDCR_EL2.HPMN is not 0 and is less than the Effective value of PMCCR.EPMN, then event counters [0..(MDCR_EL2.HPMN-1)] are in the first range, and the remaining event counters [MDCR_EL2.HPMN..(PMCCR.EPMN-1)] are in the second range.
- The pseudocode function GetNumEventCountersSelfHosted() returns the Effective value of PMCCR.EPMN.
When FEAT_PMUv3_EXTPMN is not implemented, all of the following apply:
- All of the NUM_PMU_COUNTERS event counters are accessible to self-hosted software and no counters are in the third range.
- If MDCR_EL2.HPMN is not 0 and is less than NUM_PMU_COUNTERS, then event counters [0..(MDCR_EL2.HPMN-1)] are in the first range, and the remaining event counters [MDCR_EL2.HPMN..(NUM_PMU_COUNTERS-1)] are in the second range.
- The pseudocode function GetNumEventCountersSelfHosted() returns NUM_PMU_COUNTERS.
If FEAT_HPMN0 is implemented and MDCR_EL2.HPMN is 0, then all of the following apply:
- No event counters are in the first range.
- If FEAT_PMUv3_EXTPMN is implemented, then event counters [0..(PMCCR.EPMN-1)] are in the second range.
- If FEAT_PMUv3_EXTPMN is not implemented, then all event counters are in the second range.
If MDCR_EL2.HPMN is equal to GetNumEventCountersSelfHosted(), or EL2 is not implemented, then all of the following apply:
- If FEAT_PMUv3_EXTPMN is implemented, then event counters [0..(PMCCR.EPMN-1)] are in the first range.
- If FEAT_PMUv3_EXTPMN is not implemented, then all event counters are in the first range.
- No event counters are in the second range.
All of the following apply for an event counter PMEVCNTR<n>_EL0 in the first range:
- The counter is accessible from EL1, EL2, and EL3.
- The counter is accessible from EL0 if permitted by PMUSERENR_EL0 and PMUACR_EL1, or by PMUSERENR.
- If FEAT_PMUv3p5 is implemented, then PMCR_EL0.LP or PMCR.LP determines whether the counter overflow flag PMOVSSET_EL0[n] is set on unsigned overflow of PMEVCNTR<n>_EL0[31:0] or PMEVCNTR<n>_EL0[63:0].
- PMCR_EL0.E and PMCNTENSET_EL0[n] enable the operation of the event counter.
All of the following apply for an event counter PMEVCNTR<n>_EL0 in the second range:
- The counter is accessible from EL2 and EL3.
- If EL2 is disabled in the current Security state, then the event counter is accessible from EL1, and from EL0 if permitted by PMUSERENR_EL0 and PMUACR_EL1, or by PMUSERENR.
- If FEAT_PMUv3p5 is implemented, MDCR_EL2.HLP determines whether the counter overflow flag PMOVSSET_EL0[n] is set on unsigned overflow of PMEVCNTR<n>_EL0[31:0] or PMEVCNTR<n>_EL0[63:0].
- MDCR_EL2.HPME and PMCNTENSET_EL0[n] enable the operation of the event counter.
If FEAT_PMUv3_SS is implemented, then all of the following apply:
-
For an event counter snapshot register PMEVCNTSVR<n>_EL1 in the first range, the register is accessible from EL1, EL2, and EL3.
-
For an event counter snapshot register PMEVCNTSVR<n>_EL1 in the second range, the register is accessible from EL2 and EL3. If EL2 is disabled in the current Security state, the event counter is also accessible from EL1.
For information about counters in the third range, see the description of PMCCR.EPMN.
Values greater than GetNumEventCountersSelfHosted() are reserved. If FEAT_HPMN0 is not implemented, then the value 0 is reserved.
When FEAT_PMUv3_EXTPMN is not implemented and this field is set to a reserved value, the following CONSTRAINED UNPREDICTABLE behaviors apply:
- The value returned by a direct read of MDCR_EL2.HPMN is UNKNOWN.
-
The number of event counters in each of the first and second ranges is
UNKNOWN. That is, either:
- The PE behaves as if MDCR_EL2.HPMN is set to an UNKNOWN nonzero value less than or equal to NUM_PMU_COUNTERS.
- All counters are in the second range and none are in the first range.
When FEAT_PMUv3_EXTPMN is implemented and this field is set to a reserved value, the following behaviors apply:
- The value returned by a direct read of MDCR_EL2.HPMN is the Effective value of PMCCR.EPMN.
- No event counters are in the second range.
- The value returned by an indirect read of MDCR_EL2.HPMN as a result of direct reads of PMCR_EL0.N or PMCR.N is the Effective value of PMCCR.EPMN.
The reset behavior of this field is:
- On a Warm reset, this field resets to the expression NUM_PMU_COUNTERS.
Otherwise:
Reserved, RES0.
Access Instructions
Accesses to this register use the following encodings in the System register encoding space:
MRS <Xt>, MDCR_EL2
(op0 = 0b11, op1 = 0b100, CRn = 0b0001, CRm = 0b0001, op2 = 0b001)
if !IsFeatureImplemented(FEAT_AA64) then
Undefined();
elsif HaveEL(EL3) && PSTATE.EL == EL2 && EL3SDDUndefPriority() && MDCR_EL3().TDA == '1' then
Undefined();
elsif PSTATE.EL == EL0 then
Undefined();
elsif PSTATE.EL == EL1 then
if EffectiveHCR_EL2_NVx() IN {'xx1'} then
AArch64_SystemAccessTrap(EL2, 0x18);
else
Undefined();
end;
elsif PSTATE.EL == EL2 then
if HaveEL(EL3) && MDCR_EL3().TDA == '1' then
if EL3SDDUndef() then
Undefined();
else
AArch64_SystemAccessTrap(EL3, 0x18);
end;
else
X{64}(t) = MDCR_EL2();
end;
elsif PSTATE.EL == EL3 then
X{64}(t) = MDCR_EL2();
end;
MSR MDCR_EL2, <Xt>
(op0 = 0b11, op1 = 0b100, CRn = 0b0001, CRm = 0b0001, op2 = 0b001)
if !IsFeatureImplemented(FEAT_AA64) then
Undefined();
elsif HaveEL(EL3) && PSTATE.EL == EL2 && EL3SDDUndefPriority() && MDCR_EL3().TDA == '1' then
Undefined();
elsif PSTATE.EL == EL0 then
Undefined();
elsif PSTATE.EL == EL1 then
if EffectiveHCR_EL2_NVx() IN {'xx1'} then
AArch64_SystemAccessTrap(EL2, 0x18);
else
Undefined();
end;
elsif PSTATE.EL == EL2 then
if HaveEL(EL3) && MDCR_EL3().TDA == '1' then
if EL3SDDUndef() then
Undefined();
else
AArch64_SystemAccessTrap(EL3, 0x18);
end;
else
MDCR_EL2() = X{64}(t);
end;
elsif PSTATE.EL == EL3 then
MDCR_EL2() = X{64}(t);
end;
Version 2026.09 — Copyright © 2010-2026 Arm Limited or its affiliates.
This site is provided as a community resource and is NOT affiliated with nor endorsed by Arm Limited.