Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/cortex ARM Trusted Firmware reserves SGIs 8-15 ...



details:   https://anonhg.NetBSD.org/src/rev/8f8ef4fc0114
branches:  trunk
changeset: 825068:8f8ef4fc0114
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Thu Jun 29 00:11:28 2017 +0000

description:
ARM Trusted Firmware reserves SGIs 8-15 for secure use. Even without ATF,
U-Boot on some platforms may use SGIs in this range for the PSCI
implementation.

Change ARMGIC_IPI_BASE to 0 from (16 - NIPI) and add a compile-time assert
to ensure that we don't end up with a conflict.

diffstat:

 sys/arch/arm/cortex/gic.c |  11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diffs (32 lines):

diff -r ed3d963a2925 -r 8f8ef4fc0114 sys/arch/arm/cortex/gic.c
--- a/sys/arch/arm/cortex/gic.c Wed Jun 28 23:51:29 2017 +0000
+++ b/sys/arch/arm/cortex/gic.c Thu Jun 29 00:11:28 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: gic.c,v 1.29 2017/06/28 20:46:35 skrll Exp $   */
+/*     $NetBSD: gic.c,v 1.30 2017/06/29 00:11:28 jmcneill Exp $        */
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -34,7 +34,7 @@
 #define _INTR_PRIVATE
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gic.c,v 1.29 2017/06/28 20:46:35 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gic.c,v 1.30 2017/06/29 00:11:28 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -53,7 +53,12 @@
 
 void armgic_irq_handler(void *);
 
-#define        ARMGIC_SGI_IPIBASE      (16 - NIPI)
+#define        ARMGIC_SGI_IPIBASE      0
+
+/*
+ * SGIs 8-16 are reserved for use by ARM Trusted Firmware.
+ */
+__CTASSERT(ARMGIC_SGI_IPIBASE + NIPI <= 8);
 
 static int armgic_match(device_t, cfdata_t, void *);
 static void armgic_attach(device_t, device_t, void *);



Home | Main Index | Thread Index | Old Index