Module Name:    src
Committed By:   christos
Date:           Tue Jul 17 00:33:02 UTC 2018

Modified Files:
        src/sys/arch/aarch64/aarch64: locore_el2.S

Log Message:
deal with gas not having icc_sre_el2 (from jmcneill)


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/aarch64/aarch64/locore_el2.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/aarch64/aarch64/locore_el2.S
diff -u src/sys/arch/aarch64/aarch64/locore_el2.S:1.2 src/sys/arch/aarch64/aarch64/locore_el2.S:1.3
--- src/sys/arch/aarch64/aarch64/locore_el2.S:1.2	Mon Jul  9 02:10:21 2018
+++ src/sys/arch/aarch64/aarch64/locore_el2.S	Mon Jul 16 20:33:02 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore_el2.S,v 1.2 2018/07/09 06:10:21 ryo Exp $	*/
+/*	$NetBSD: locore_el2.S,v 1.3 2018/07/17 00:33:02 christos Exp $	*/
 
 /*-
  * Copyright (c) 2012-2014 Andrew Turner
@@ -32,7 +32,7 @@
 #include <aarch64/hypervisor.h>
 #include "assym.h"
 
-RCSID("$NetBSD: locore_el2.S,v 1.2 2018/07/09 06:10:21 ryo Exp $")
+RCSID("$NetBSD: locore_el2.S,v 1.3 2018/07/17 00:33:02 christos Exp $")
 
 
 /* for use in #include "locore_el2.S" */
@@ -108,11 +108,16 @@ drop_to_el1:
 	/* GIC[3:0] == 0001 - GIC CPU interface via special regs. supported */
 	cmp	x2, #ID_AA64PFR0_EL1_GIC_CPUIF_EN
 	b.ne	2f
+#ifdef __clang__
+#define ICC_SRE_EL2 icc_sre_el2
+#else
+#define ICC_SRE_EL2 S3_4_C12_C9_5
+#endif
 
-	mrs	x2, icc_sre_el2
+	mrs	x2, ICC_SRE_EL2
 	orr	x2, x2, #ICC_SRE_EL2_EN	/* Enable access from insecure EL1 */
 	orr	x2, x2, #ICC_SRE_EL2_SRE	/* Enable system registers */
-	msr	icc_sre_el2, x2
+	msr	ICC_SRE_EL2, x2
 2:
 
 	/* keep stack pointer */

Reply via email to