The CNTHCTL_EL2 characteristics are:
Controls the generation of an event stream from the physical counter, and access from Non-secure EL1 to the physical counter and the Non-secure EL1 physical timer.
This register is part of:
AArch64 System register CNTHCTL_EL2 is architecturally mapped to AArch32 System register CNTHCTL.
If EL2 is not implemented, this register is RES0 from EL3.
RW fields in this register reset to architecturally UNKNOWN values.
CNTHCTL_EL2 is a 32-bit register.
The CNTHCTL_EL2 bit assignments are:
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 |
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | EVNTI | EVNTDIR | EVNTEN | EL1PCEN | EL1PCTEN |
This format applies in all ARMv8.0 implementations, and it also contains a description of the behavior when EL3 is implemented and EL2 is not implemented.
Reserved, RES0.
Selects which bit (0 to 15) of the counter register CNTPCT_EL0 is the trigger for the event stream generated from that counter, when that stream is enabled.
Controls which transition of the counter register CNTPCT_EL0 trigger bit, defined by EVNTI, generates an event when the event stream is enabled:
EVNTDIR | Meaning |
---|---|
0 |
A 0 to 1 transition of the trigger bit triggers an event. |
1 |
A 1 to 0 transition of the trigger bit triggers an event. |
Enables the generation of an event stream from the counter register CNTPCT_EL0:
EVNTEN | Meaning |
---|---|
0 |
Disables the event stream. |
1 |
Enables the event stream. |
Traps Non-secure EL0 and EL1 accesses to the physical timer registers to EL2.
EL1PCEN | Meaning |
---|---|
0 |
From AArch64 state: Non-secure EL0 and EL1 accesses to the CNTP_CTL_EL0, CNTP_CVAL_EL0, and CNTP_TVAL_EL0 are trapped to EL2, unless it is trapped by CNTKCTL_EL1.EL0PTEN. From AArch32 state: Non-secure EL0 and EL1 accesses to the CNTP_CTL, CNTP_CVAL, and CNTP_TVAL are trapped to EL2, unless it is trapped by CNTKCTL_EL1.EL0PTEN or CNTKCTL.PL0PTEN. |
1 |
This control does not cause any instructions to be trapped. |
If EL3 is implemented and EL2 is not implemented, behavior is as if this bit is 1 other than for the purpose of a direct read.
Traps Non-secure EL0 and EL1 accesses to the physical counter register to EL2.
EL1PCTEN | Meaning |
---|---|
0 |
From AArch64 state: Non-secure EL0 and EL1 accesses to the CNTPCT_EL0 are trapped to EL2, unless it is trapped by CNTKCTL_EL1.EL0PCTEN. From AArch32 state: Non-secure EL0 and EL1 accesses to the CNTPCT are trapped to EL2, unless it is trapped by CNTKCTL_EL1.EL0PCTEN or CNTKCTL.PL0PCTEN. |
1 |
This control does not cause any instructions to be trapped. |
If EL3 is implemented and EL2 is not implemented, behavior is as if this bit is 1 other than for the purpose of a direct read.
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 |
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | EL1PTEN | EL1PCTEN | EL0PTEN | EL0VTEN | EVNTI | EVNTDIR | EVNTEN | EL0VCTEN | EL0PCTEN |
Reserved, RES0.
When HCR_EL2.TGE is 0, traps Non-secure EL0 and EL1 accesses to the physical timer registers to EL2.
EL1PTEN | Meaning |
---|---|
0 |
From AArch64 state: Non-secure EL0 and EL1 accesses to the CNTP_CTL_EL0, CNTP_CVAL_EL0, and CNTP_TVAL_EL0 are trapped to EL2, unless it is trapped by CNTKCTL_EL1.EL0PTEN. From AArch32 state: Non-secure EL0 and EL1 accesses to the CNTP_CTL, CNTP_CVAL, and CNTP_TVAL are trapped to EL2, unless it is trapped by CNTKCTL_EL1.EL0PTEN or CNTKCTL.PL0PTEN. |
1 |
This control does not cause any instructions to be trapped. |
When HCR_EL2.TGE is 1, this control does not cause any instructions to be trapped.
When HCR_EL2.TGE is 0, traps Non-secure EL0 and EL1 accesses to the physical counter register to EL2.
EL1PCTEN | Meaning |
---|---|
0 |
From AArch64 state: Non-secure EL0 and EL1 accesses to the CNTPCT_EL0 are trapped to EL2, unless it is trapped by CNTKCTL_EL1.EL0PCTEN. From AArch32 state: Non-secure EL0 and EL1 accesses to the CNTPCT are trapped to EL2, unless it is trapped by CNTKCTL_EL1.EL0PCTEN or CNTKCTL.PL0PCTEN. |
1 |
This control does not cause any instructions to be trapped. |
When HCR_EL2.TGE is 1, this control does not cause any instructions to be trapped.
When HCR_EL2.TGE is 0, this control does not cause any instructions to be trapped.
When HCR_EL2.TGE is 1, traps EL0 accesses to the physical timer registers to EL2.
EL0PTEN | Meaning |
---|---|
0 |
EL0 using AArch64: EL0 accesses to the CNTP_CTL_EL0, CNTP_CVAL_EL0, and CNTP_TVAL_EL0 registers are trapped to EL2. EL0 using AArch32: EL0 accesses to the CNTP_CTL, CNTP_CVAL, and CNTP_TVAL registers are trapped to EL2. |
1 |
This control does not cause any instructions to be trapped. |
When HCR_EL2.TGE is 0, this control does not cause any instructions to be trapped.
When HCR_EL2.TGE is 1, traps EL0 accesses to the virtual timer registers to EL2.
EL0VTEN | Meaning |
---|---|
0 |
EL0 using AArch64: EL0 accesses to the CNTV_CTL_EL0, CNTV_CVAL_EL0, and CNTV_TVAL_EL0 registers are trapped to EL2. EL0 using AArch32: EL0 accesses to the CNTV_CTL, CNTV_CVAL, and CNTV_TVAL registers are trapped to EL2. |
1 |
This control does not cause any instructions to be trapped. |
Selects which bit (0 to 15) of the counter register CNTPCT_EL0 is the trigger for the event stream generated from that counter, when that stream is enabled.
Controls which transition of the counter register CNTPCT_EL0 trigger bit, defined by EVNTI, generates an event when the event stream is enabled:
EVNTDIR | Meaning |
---|---|
0 |
A 0 to 1 transition of the trigger bit triggers an event. |
1 |
A 1 to 0 transition of the trigger bit triggers an event. |
Enables the generation of an event stream from the counter register CNTPCT_EL0:
EVNTEN | Meaning |
---|---|
0 |
Disables the event stream. |
1 |
Enables the event stream. |
When HCR_EL2.TGE is 0, this control does not cause any instructions to be trapped.
When HCR_EL2.TGE is 1, traps EL0 accesses to the frequency register and virtual counter register to EL2.
EL0VCTEN | Meaning |
---|---|
0 |
EL0 using AArch64: EL0 accesses to the CNTVCT_EL0 are trapped to EL2. EL0 using AArch64: EL0 accesses to the CNTFRQ_EL0 register are trapped to EL2, if CNTHCTL_EL2.EL0PCTEN is also 0. EL0 using AArch32: EL0 accesses to the CNTVCT are trapped to EL2. EL0 using AArch32: EL0 accesses to the CNTFRQ register are trapped to EL2, if CNTHCTL_EL2.EL0PCTEN is also 0. |
1 |
This control does not cause any instructions to be trapped. |
When HCR_EL2.TGE is 0, this control does not cause any instructions to be trapped.
When HCR_EL2.TGE is 1, traps EL0 accesses to the frequency register and physical counter register to EL2.
EL0PCTEN | Meaning |
---|---|
0 |
EL0 using AArch64: EL0 accesses to the CNTPCT_EL0 are trapped to EL2. EL0 using AArch64: EL0 accesses to the CNTFRQ_EL0 register are trapped to EL2, if CNTHCTL_EL2.EL0VCTEN is also 0. EL0 using AArch32: EL0 accesses to the CNTPCT are trapped to EL2. EL0 using AArch32: EL0 accesses to the CNTFRQ and register are trapped to EL2, if CNTHCTL_EL2.EL0VCTEN is also 0. |
1 |
This control does not cause any instructions to be trapped. |
This register can be read using MRS with the following syntax:
MRS <Xt>, <systemreg>
This register can be written using MSR (register) with the following syntax:
MSR <systemreg>, <Xt>
This syntax uses the following encoding in the System instruction encoding space:
<systemreg> | op0 | op1 | CRn | CRm | op2 |
---|---|---|---|---|---|
CNTHCTL_EL2 | 11 | 100 | 1110 | 0001 | 000 |
CNTKCTL_EL1 | 11 | 000 | 1110 | 0001 | 000 |
The register is accessible as follows:
<systemreg> | Control | Accessibility | |||||
---|---|---|---|---|---|---|---|
E2H | TGE | NS | EL0 | EL1 | EL2 | EL3 | |
CNTHCTL_EL2 | x | x | 0 | - | - | n/a | RW |
CNTHCTL_EL2 | 0 | 0 | 1 | - | - | RW | RW |
CNTHCTL_EL2 | 0 | 1 | 1 | - | n/a | RW | RW |
CNTHCTL_EL2 | 1 | 0 | 1 | - | - | RW | RW |
CNTHCTL_EL2 | 1 | 1 | 1 | - | n/a | RW | RW |
CNTKCTL_EL1 | x | x | 0 | - | CNTKCTL_EL1 | n/a | CNTKCTL_EL1 |
CNTKCTL_EL1 | 0 | 0 | 1 | - | CNTKCTL_EL1 | CNTKCTL_EL1 | CNTKCTL_EL1 |
CNTKCTL_EL1 | 0 | 1 | 1 | - | n/a | CNTKCTL_EL1 | CNTKCTL_EL1 |
CNTKCTL_EL1 | 1 | 0 | 1 | - | CNTKCTL_EL1 | RW | CNTKCTL_EL1 |
CNTKCTL_EL1 | 1 | 1 | 1 | - | n/a | RW | CNTKCTL_EL1 |
When HCR_EL2.E2H is 1, without explicit synchronization, access from EL2 using the mnemonic CNTHCTL_EL2 or CNTKCTL_EL1 are not guaranteed to be ordered with respect to accesses using the other mnemonic.
For a description of the prioritization of any generated exceptions, see section D1.13.2 (Synchronous exception prioritization) in the ARM® Architecture Reference Manual, ARMv8, for ARMv8-A architecture profile. Subject to the prioritization rules, the following traps and enables are applicable when accessing this register.
When EL2 is implemented and is using AArch64 and SCR_EL3.NS==1 && HCR_EL2.E2H==0 :
If HCR_EL2.NV==1, Non-secure accesses to this register from EL1 are trapped to EL2.
When EL2 is implemented and is using AArch64 and SCR_EL3.NS==1 && HCR_EL2.E2H==1 && HCR_EL2.TGE==0 :
If HCR_EL2.NV==1, Non-secure accesses to this register from EL1 are trapped to EL2.
28/09/2017 08:24
Copyright © 2010-2017 ARM Limited or its affiliates. All rights reserved. This document is Non-Confidential.