Module Name: src Committed By: jmcneill Date: Thu Jun 29 00:11:28 UTC 2017
Modified Files: src/sys/arch/arm/cortex: gic.c Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/arch/arm/cortex/gic.c 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/arm/cortex/gic.c diff -u src/sys/arch/arm/cortex/gic.c:1.29 src/sys/arch/arm/cortex/gic.c:1.30 --- src/sys/arch/arm/cortex/gic.c:1.29 Wed Jun 28 20:46:35 2017 +++ src/sys/arch/arm/cortex/gic.c Thu Jun 29 00:11:28 2017 @@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: gic.c,v 1.29 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 *);