CNTHP_TVAL
Counter-timer Hyp Physical Timer TimerValue register
Holds the timer value for the Hyp mode physical timer.
Configuration
This register is banked between CNTHP_TVAL and CNTHP_TVAL_S and CNTHP_TVAL_NS.
AArch32 System register CNTHP_TVAL bits [31:0] are architecturally mapped to AArch64 System register CNTHP_TVAL_EL2[31:0].
This register is present only when FEAT_AA32 is implemented. Otherwise, direct accesses to CNTHP_TVAL are UNDEFINED.
If EL2 is not implemented, this register is RES0 from EL3.
Attributes
CNTHP_TVAL is a 32-bit register.
This register has the following instances:
- CNTHP_TVAL, when EL3 is not implemented or FEAT_AA64 is implemented.
- CNTHP_TVAL_S, when FEAT_AA32EL3 is implemented.
- CNTHP_TVAL_NS, when FEAT_AA32EL3 is implemented.
Field descriptions
| 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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| TimerValue | |||||||||||||||||||||||||||||||
TimerValue, bits [31:0]:
The TimerValue view of the EL2 physical timer.
On a read of this register:
- If CNTHP_CTL.ENABLE is 0, the value returned is UNKNOWN.
- If CNTHP_CTL.ENABLE is 1, the value returned is (CNTHP_CVAL - CNTPCT).
On a write of this register, CNTHP_CVAL is set to (CNTPCT + TimerValue), where TimerValue is treated as a signed 32-bit integer.
When CNTHP_CTL.ENABLE is 1, the timer condition is met when (CNTPCT - CNTHP_CVAL) is greater than or equal to zero. This means that TimerValue acts like a 32-bit downcounter timer. When the timer condition is met:
When CNTHP_CTL.ENABLE is 0, the TimerValue cannot be read but continues to decrement. When the timer is enabled, the TimerValue represents the elapsed time whether that time was spent enabled or disabled.
The reset behavior of this field is:
- On a Warm reset, this field resets to an architecturally UNKNOWN value.
Access Instructions
Accesses to this register use the following encodings in the System register encoding space:
MRC{<c>}{<q>} <coproc>, {#}<opc1>, <Rt>, <CRn>, <CRm>{, {#}<opc2>}
(coproc = 0b1111, opc1 = 0b100, CRn = 0b1110, CRm = 0b0010, opc2 = 0b000)
if !IsFeatureImplemented(FEAT_AA32) then
Undefined();
elsif PSTATE.EL == EL0 then
Undefined();
elsif PSTATE.EL == EL1 then
Undefined();
elsif PSTATE.EL == EL2 then
if CNTHP_CTL().ENABLE == '0' then
R(t) = ARBITRARY:bits(32);
else
R(t) = (CNTHP_CVAL() - PhysicalCountInt())[31:0];
end;
elsif PSTATE.EL == EL3 then
if SCR().NS == '0' then
Undefined();
else
if CNTHP_CTL().ENABLE == '0' then
R(t) = ARBITRARY:bits(32);
else
R(t) = (CNTHP_CVAL() - PhysicalCountInt())[31:0];
end;
end;
end;
MCR{<c>}{<q>} <coproc>, {#}<opc1>, <Rt>, <CRn>, <CRm>{, {#}<opc2>}
(coproc = 0b1111, opc1 = 0b100, CRn = 0b1110, CRm = 0b0010, opc2 = 0b000)
if !IsFeatureImplemented(FEAT_AA32) then
Undefined();
elsif PSTATE.EL == EL0 then
Undefined();
elsif PSTATE.EL == EL1 then
Undefined();
elsif PSTATE.EL == EL2 then
CNTHP_CVAL() = SignExtend{64}(R(t)) + PhysicalCountInt();
elsif PSTATE.EL == EL3 then
if SCR().NS == '0' then
Undefined();
else
CNTHP_CVAL() = SignExtend{64}(R(t)) + PhysicalCountInt();
end;
end;
MRC{<c>}{<q>} <coproc>, {#}<opc1>, <Rt>, <CRn>, <CRm>{, {#}<opc2>}
(coproc = 0b1111, opc1 = 0b000, CRn = 0b1110, CRm = 0b0010, opc2 = 0b000)
if !IsFeatureImplemented(FEAT_AA32) then
Undefined();
elsif PSTATE.EL == EL0 then
if IsFeatureImplemented(FEAT_AA64EL1) && !ELUsingAArch32(EL1) && EffectivelyAtEL0NotInHost() && CNTKCTL_EL1().EL0PTEN == '0' then
AArch64_AArch32SystemAccessTraptoEL1orEL2(0x03);
elsif IsFeatureImplemented(FEAT_AA32EL1) && ELUsingAArch32(EL1) && CNTKCTL().PL0PTEN == '0' then
if EL2Enabled() && (IsFeatureImplemented(FEAT_AA64EL2) && !ELUsingAArch32(EL2)) && HCR_EL2().TGE == '1' then
AArch64_AArch32SystemAccessTrap(EL2, 0x03);
elsif EL2Enabled() && (IsFeatureImplemented(FEAT_AA32EL2) && ELUsingAArch32(EL2)) && HCR().TGE == '1' then
AArch32_TakeHypTrapException(0x00);
else
Undefined();
end;
elsif EL2Enabled() && (IsFeatureImplemented(FEAT_AA64EL2) && !ELUsingAArch32(EL2)) && !ELIsInHost(EL2) && CNTHCTL_EL2().EL1PCEN == '0' then
AArch64_AArch32SystemAccessTrap(EL2, 0x03);
elsif ELIsInHost(EL2) && (IsFeatureImplemented(FEAT_AA64EL2) && !ELUsingAArch32(EL2)) && EffectiveTGEforEL0Traps() == '0' && CNTHCTL_EL2().EL1PTEN == '0' then
AArch64_AArch32SystemAccessTrap(EL2, 0x03);
elsif EffectivelyAtEL0InHost() && (IsFeatureImplemented(FEAT_AA64EL2) && !ELUsingAArch32(EL2)) && CNTHCTL_EL2().EL0PTEN == '0' then
AArch64_AArch32SystemAccessTrap(EL2, 0x03);
elsif EL2Enabled() && (IsFeatureImplemented(FEAT_AA32EL2) && ELUsingAArch32(EL2)) && CNTHCTL().PL1PCEN == '0' then
AArch32_TakeHypTrapException(0x03);
elsif EffectivelyAtEL0InHost() && IsCurrentSecurityState(SS_Secure) && IsFeatureImplemented(FEAT_SEL2) then
if CNTHPS_CTL_EL2().ENABLE == '0' then
R(t) = ARBITRARY:bits(32);
else
R(t) = (CNTHPS_CVAL_EL2() - PhysicalCountInt())[31:0];
end;
elsif EffectivelyAtEL0InHost() && !IsCurrentSecurityState(SS_Secure) then
if CNTHP_CTL_EL2().ENABLE == '0' then
R(t) = ARBITRARY:bits(32);
else
R(t) = (CNTHP_CVAL_EL2() - PhysicalCountInt())[31:0];
end;
elsif IsFeatureImplemented(FEAT_ECV_POFF) && EL2Enabled() && (IsFeatureImplemented(FEAT_AA64EL2) && !ELUsingAArch32(EL2)) && (!HaveEL(EL3) || SCR_EL3().ECVEn == '1') && CNTHCTL_EL2().ECV == '1' && EffectivelyAtEL0NotInHost() then
if CNTP_CTL().ENABLE == '0' then
R(t) = ARBITRARY:bits(32);
else
R(t) = (CNTP_CVAL() - (PhysicalCountInt() - CNTPOFF_EL2()))[31:0];
end;
elsif HaveEL(EL3) && IsFeatureImplemented(FEAT_AA32EL3) && ELUsingAArch32(EL3) then
if SCR().NS == '1' then
if CNTP_CTL_NS().ENABLE == '0' then
R(t) = ARBITRARY:bits(32);
else
R(t) = (CNTP_CVAL_NS() - PhysicalCountInt())[31:0];
end;
else
if CNTP_CTL_S().ENABLE == '0' then
R(t) = ARBITRARY:bits(32);
else
R(t) = (CNTP_CVAL_S() - PhysicalCountInt())[31:0];
end;
end;
else
if CNTP_CTL().ENABLE == '0' then
R(t) = ARBITRARY:bits(32);
else
R(t) = (CNTP_CVAL() - PhysicalCountInt())[31:0];
end;
end;
elsif PSTATE.EL == EL1 then
if EL2Enabled() && IsFeatureImplemented(FEAT_AA64EL2) && !ELUsingAArch32(EL2) && !ELIsInHost(EL2) && CNTHCTL_EL2().EL1PCEN == '0' then
AArch64_AArch32SystemAccessTrap(EL2, 0x03);
elsif ELIsInHost(EL2) && IsFeatureImplemented(FEAT_AA64EL2) && !ELUsingAArch32(EL2) && CNTHCTL_EL2().EL1PTEN == '0' then
AArch64_AArch32SystemAccessTrap(EL2, 0x03);
elsif EL2Enabled() && IsFeatureImplemented(FEAT_AA32EL2) && ELUsingAArch32(EL2) && CNTHCTL().PL1PCEN == '0' then
AArch32_TakeHypTrapException(0x03);
elsif IsFeatureImplemented(FEAT_ECV_POFF) && EL2Enabled() && IsFeatureImplemented(FEAT_AA64EL2) && !ELUsingAArch32(EL2) && (!HaveEL(EL3) || SCR_EL3().ECVEn == '1') && CNTHCTL_EL2().ECV == '1' then
if CNTP_CTL().ENABLE == '0' then
R(t) = ARBITRARY:bits(32);
else
R(t) = (CNTP_CVAL() - (PhysicalCountInt() - CNTPOFF_EL2()))[31:0];
end;
elsif HaveEL(EL3) && IsFeatureImplemented(FEAT_AA32EL3) && ELUsingAArch32(EL3) then
if CNTP_CTL_NS().ENABLE == '0' then
R(t) = ARBITRARY:bits(32);
else
R(t) = (CNTP_CVAL_NS() - PhysicalCountInt())[31:0];
end;
else
if CNTP_CTL().ENABLE == '0' then
R(t) = ARBITRARY:bits(32);
else
R(t) = (CNTP_CVAL() - PhysicalCountInt())[31:0];
end;
end;
elsif PSTATE.EL == EL2 then
if HaveEL(EL3) && IsFeatureImplemented(FEAT_AA32EL3) && ELUsingAArch32(EL3) then
if CNTP_CTL_NS().ENABLE == '0' then
R(t) = ARBITRARY:bits(32);
else
R(t) = (CNTP_CVAL_NS() - PhysicalCountInt())[31:0];
end;
else
if CNTP_CTL().ENABLE == '0' then
R(t) = ARBITRARY:bits(32);
else
R(t) = (CNTP_CVAL() - PhysicalCountInt())[31:0];
end;
end;
elsif PSTATE.EL == EL3 then
if SCR().NS == '0' then
if CNTP_CTL_S().ENABLE == '0' then
R(t) = ARBITRARY:bits(32);
else
R(t) = (CNTP_CVAL_S() - PhysicalCountInt())[31:0];
end;
else
if CNTP_CTL_NS().ENABLE == '0' then
R(t) = ARBITRARY:bits(32);
else
R(t) = (CNTP_CVAL_NS() - PhysicalCountInt())[31:0];
end;
end;
end;
MCR{<c>}{<q>} <coproc>, {#}<opc1>, <Rt>, <CRn>, <CRm>{, {#}<opc2>}
(coproc = 0b1111, opc1 = 0b000, CRn = 0b1110, CRm = 0b0010, opc2 = 0b000)
if !IsFeatureImplemented(FEAT_AA32) then
Undefined();
elsif PSTATE.EL == EL0 then
if IsFeatureImplemented(FEAT_AA64EL1) && !ELUsingAArch32(EL1) && EffectivelyAtEL0NotInHost() && CNTKCTL_EL1().EL0PTEN == '0' then
AArch64_AArch32SystemAccessTraptoEL1orEL2(0x03);
elsif IsFeatureImplemented(FEAT_AA32EL1) && ELUsingAArch32(EL1) && CNTKCTL().PL0PTEN == '0' then
if EL2Enabled() && (IsFeatureImplemented(FEAT_AA64EL2) && !ELUsingAArch32(EL2)) && HCR_EL2().TGE == '1' then
AArch64_AArch32SystemAccessTrap(EL2, 0x03);
elsif EL2Enabled() && (IsFeatureImplemented(FEAT_AA32EL2) && ELUsingAArch32(EL2)) && HCR().TGE == '1' then
AArch32_TakeHypTrapException(0x00);
else
Undefined();
end;
elsif EL2Enabled() && (IsFeatureImplemented(FEAT_AA64EL2) && !ELUsingAArch32(EL2)) && !ELIsInHost(EL2) && CNTHCTL_EL2().EL1PCEN == '0' then
AArch64_AArch32SystemAccessTrap(EL2, 0x03);
elsif ELIsInHost(EL2) && (IsFeatureImplemented(FEAT_AA64EL2) && !ELUsingAArch32(EL2)) && EffectiveTGEforEL0Traps() == '0' && CNTHCTL_EL2().EL1PTEN == '0' then
AArch64_AArch32SystemAccessTrap(EL2, 0x03);
elsif EffectivelyAtEL0InHost() && (IsFeatureImplemented(FEAT_AA64EL2) && !ELUsingAArch32(EL2)) && CNTHCTL_EL2().EL0PTEN == '0' then
AArch64_AArch32SystemAccessTrap(EL2, 0x03);
elsif EL2Enabled() && (IsFeatureImplemented(FEAT_AA32EL2) && ELUsingAArch32(EL2)) && CNTHCTL().PL1PCEN == '0' then
AArch32_TakeHypTrapException(0x03);
elsif EffectivelyAtEL0InHost() && IsCurrentSecurityState(SS_Secure) && IsFeatureImplemented(FEAT_SEL2) then
CNTHPS_CVAL_EL2() = SignExtend{64}(R(t)) + PhysicalCountInt();
elsif EffectivelyAtEL0InHost() && !IsCurrentSecurityState(SS_Secure) then
CNTHP_CVAL_EL2() = SignExtend{64}(R(t)) + PhysicalCountInt();
elsif IsFeatureImplemented(FEAT_ECV_POFF) && EL2Enabled() && (IsFeatureImplemented(FEAT_AA64EL2) && !ELUsingAArch32(EL2)) && (!HaveEL(EL3) || SCR_EL3().ECVEn == '1') && CNTHCTL_EL2().ECV == '1' && EffectivelyAtEL0NotInHost() then
CNTP_CVAL() = (SignExtend{64}(R(t)) + PhysicalCountInt()) - CNTPOFF_EL2();
elsif HaveEL(EL3) && IsFeatureImplemented(FEAT_AA32EL3) && ELUsingAArch32(EL3) then
if SCR().NS == '1' then
CNTP_CVAL_NS() = SignExtend{64}(R(t)) + PhysicalCountInt();
else
CNTP_CVAL_S() = SignExtend{64}(R(t)) + PhysicalCountInt();
end;
else
CNTP_CVAL() = SignExtend{64}(R(t)) + PhysicalCountInt();
end;
elsif PSTATE.EL == EL1 then
if EL2Enabled() && IsFeatureImplemented(FEAT_AA64EL2) && !ELUsingAArch32(EL2) && !ELIsInHost(EL2) && CNTHCTL_EL2().EL1PCEN == '0' then
AArch64_AArch32SystemAccessTrap(EL2, 0x03);
elsif ELIsInHost(EL2) && IsFeatureImplemented(FEAT_AA64EL2) && !ELUsingAArch32(EL2) && CNTHCTL_EL2().EL1PTEN == '0' then
AArch64_AArch32SystemAccessTrap(EL2, 0x03);
elsif EL2Enabled() && IsFeatureImplemented(FEAT_AA32EL2) && ELUsingAArch32(EL2) && CNTHCTL().PL1PCEN == '0' then
AArch32_TakeHypTrapException(0x03);
elsif IsFeatureImplemented(FEAT_ECV_POFF) && EL2Enabled() && IsFeatureImplemented(FEAT_AA64EL2) && !ELUsingAArch32(EL2) && (!HaveEL(EL3) || SCR_EL3().ECVEn == '1') && CNTHCTL_EL2().ECV == '1' then
CNTP_CVAL() = (SignExtend{64}(R(t)) + PhysicalCountInt()) - CNTPOFF_EL2();
elsif HaveEL(EL3) && IsFeatureImplemented(FEAT_AA32EL3) && ELUsingAArch32(EL3) then
CNTP_CVAL_NS() = SignExtend{64}(R(t)) + PhysicalCountInt();
else
CNTP_CVAL() = SignExtend{64}(R(t)) + PhysicalCountInt();
end;
elsif PSTATE.EL == EL2 then
if HaveEL(EL3) && IsFeatureImplemented(FEAT_AA32EL3) && ELUsingAArch32(EL3) then
CNTP_CVAL_NS() = SignExtend{64}(R(t)) + PhysicalCountInt();
else
CNTP_CVAL() = SignExtend{64}(R(t)) + PhysicalCountInt();
end;
elsif PSTATE.EL == EL3 then
if SCR().NS == '0' then
CNTP_CVAL_S() = SignExtend{64}(R(t)) + PhysicalCountInt();
else
CNTP_CVAL_NS() = SignExtend{64}(R(t)) + PhysicalCountInt();
end;
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.