Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/aarch64/aarch64 deal with gas not having icc_sre_el...
details: https://anonhg.NetBSD.org/src/rev/7448f4bd5c03
branches: trunk
changeset: 324725:7448f4bd5c03
user: christos <christos%NetBSD.org@localhost>
date: Tue Jul 17 00:33:02 2018 +0000
description:
deal with gas not having icc_sre_el2 (from jmcneill)
diffstat:
sys/arch/aarch64/aarch64/locore_el2.S | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diffs (37 lines):
diff -r e4169d7f649c -r 7448f4bd5c03 sys/arch/aarch64/aarch64/locore_el2.S
--- a/sys/arch/aarch64/aarch64/locore_el2.S Tue Jul 17 00:32:28 2018 +0000
+++ b/sys/arch/aarch64/aarch64/locore_el2.S Tue Jul 17 00:33:02 2018 +0000
@@ -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 @@
/* 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 */
Home |
Main Index |
Thread Index |
Old Index