Set the counter-timer virtual offset to a know value, it may not have been

set by the boot code and are reset to an implementation defined value that
may be unknown.

Sponsored by:	ABT Systems Ltd
This commit is contained in:
Andrew Turner 2015-08-12 17:06:22 +00:00
parent ad38a9d962
commit f03aa10f47
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=286674

View File

@ -220,6 +220,14 @@ drop_to_el1:
/* Don't trap to EL2 for CP15 traps */
msr hstr_el2, xzr
/* Enable access to the physical timers at EL1 */
mrs x2, cnthctl_el2
orr x2, x2, #(CNTHCTL_EL1PCTEN | CNTHCTL_EL1PCEN)
msr cnthctl_el2, x2
/* Set the counter offset to a known value */
msr cntvoff_el2, xzr
/* Hypervisor trap functions */
adr x2, hyp_vectors
msr vbar_el2, x2