Skip to contentSkip to conversation

Armv8: Initializing CNTVOFF_EL2

PATCH New fenghua at phytium.com.cn 2 participants 2 messages Mar 2, 2015 – Apr 16, 2015 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Armv8: Initializing CNTVOFF_EL2

From: David Feng <[email protected]>

Linux-arm64 require that CNTVOFF_EL2 should be programmed with a consistent value on all cpus. Initializing CNTVOFF_EL2 at state transition instead of start.S could prevent potential different value on cpus if ATF exist and u-boot runs at only one cpu.

---
 arch/arm/include/asm/macro.h |    3 +++
 1 file changed, 3 insertions(+)
arch/arm/include/asm/macro.h +3 -0
index 1c8c425..39df86a 100644
@@ -113,6 +113,9 @@ lr	.req	x30
 	mov	\xreg1, #0x33ff
 	msr	cptr_el2, \xreg1	/* Disable coprocessor traps to EL2 */
 
+	/* Initialize Generic Timers */
+	msr	cntvoff_el2, xzr
+
 	/* Initialize SCTLR_EL2
 	 *
 	 * setting RES1 bits (29,28,23,22,18,16,11,5,4) to 1
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 Armv8: Initializing CNTVOFF_EL2

Hello fenghua at phytium.com.cn,

Quoted 30 lines · fenghua at phytium.com.cn

From: David Feng <[email protected]>

Linux-arm64 require that CNTVOFF_EL2 should be programmed with a consistent value on all cpus. Initializing CNTVOFF_EL2 at state transition instead of start.S could prevent potential different value on cpus if ATF exist and u-boot runs at only one cpu.

---
 arch/arm/include/asm/macro.h |    3 +++
 1 file changed, 3 insertions(+)
arch/arm/include/asm/macro.h +3 -0
index 1c8c425..39df86a 100644
@@ -113,6 +113,9 @@ lr	.req	x30
 	mov	\xreg1, #0x33ff
 	msr	cptr_el2, \xreg1	/* Disable coprocessor traps to EL2 */
 
+	/* Initialize Generic Timers */
+	msr	cntvoff_el2, xzr
+
 	/* Initialize SCTLR_EL2
 	 *
 	 * setting RES1 bits (29,28,23,22,18,16,11,5,4) to 1
Signature · 1 line
1.7.9.5

Applied to u-boot-arm/master, thanks!

Amicalement,

Signature · 1 line
Albert.