1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * Copyright (C) 2014 Renesas Electronics Corp 4 * 5 * Initialization of CNTVOFF register from sec 6 * 7 */ 8 9 #include <linux/linkage.h> 10 #include <asm/assembler.h> 11 12 ENTRY(secure_cntvoff_init) 13 .arch armv7-a 14 /* 15 * CNTVOFF has to be initialized eithe 16 * mode or secure Monitor mode with SC 17 * then it should be handled by the se 18 * the virtualization extensions. 19 */ 20 cps #MON_MODE 21 mrc p15, 0, r1, c1, c1, 0 22 orr r0, r1, #1 23 mcr p15, 0, r0, c1, c1, 0 24 isb 25 mov r0, #0 26 mcrr p15, 4, r0, r0, c14 27 isb 28 mcr p15, 0, r1, c1, c1, 0 29 isb 30 cps #SVC_MODE 31 ret lr 32 ENDPROC(secure_cntvoff_init)
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.