ArmPkg: Add CNTHCTL_EL2 support functions
Added helper functions for reading and writing the CNTHCTL_EL2 register. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Signed-off-by: Evan Lloyd <evan.lloyd@arm.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
This commit is contained in:
committed by
Leif Lindholm
parent
7320b8ed18
commit
23d6348f92
@@ -480,4 +480,14 @@ ASM_FUNC(ArmReadCurrentEL)
|
||||
mrs x0, CurrentEL
|
||||
ret
|
||||
|
||||
// UINT32 ArmReadCntHctl(VOID)
|
||||
ASM_FUNC(ArmReadCntHctl)
|
||||
mrs x0, cnthctl_el2
|
||||
ret
|
||||
|
||||
// VOID ArmWriteCntHctl(UINT32 CntHctl)
|
||||
ASM_FUNC(ArmWriteCntHctl)
|
||||
msr cnthctl_el2, x0
|
||||
ret
|
||||
|
||||
ASM_FUNCTION_REMOVE_IF_UNREFERENCED
|
||||
|
Reference in New Issue
Block a user