Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0af0b189 authored by Marc Zyngier's avatar Marc Zyngier Committed by Mark Rutland
Browse files

ARM: hyp: initialize CNTVOFF to zero



In order to be able to use the virtual counter in a safe way,
make sure it is initialized to zero before dropping to SVC.

Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
Acked-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Dave Martin <dave.martin@linaro.org>
parent e4aa937e
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -153,6 +153,8 @@ THUMB( orr r7, #(1 << 30) ) @ HSCTLR.TE
	mrc	p15, 4, r7, c14, c1, 0	@ CNTHCTL
	orr	r7, r7, #3		@ PL1PCEN | PL1PCTEN
	mcr	p15, 4, r7, c14, c1, 0	@ CNTHCTL
	mov	r7, #0
	mcrr	p15, 4, r7, r7, c14	@ CNTVOFF
1:
#endif