Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/evbarm make sure uboot_args is in the data segment ...



details:   https://anonhg.NetBSD.org/src/rev/ea02031f9078
branches:  trunk
changeset: 324172:ea02031f9078
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Jul 17 18:41:00 2018 +0000

description:
make sure uboot_args is in the data segment by saying so, as opposed to
depending on initializing it to 0.

diffstat:

 sys/arch/evbarm/amlogic/amlogic_machdep.c     |   8 +++++---
 sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c     |   7 ++++---
 sys/arch/evbarm/beagle/beagle_machdep.c       |   7 ++++---
 sys/arch/evbarm/fdt/fdt_machdep.c             |  12 ++++++------
 sys/arch/evbarm/hawk/hawk_machdep.c           |   5 +++--
 sys/arch/evbarm/imx7/imx7_machdep.c           |   7 ++++---
 sys/arch/evbarm/nitrogen6/nitrogen6_machdep.c |   7 ++++---
 sys/arch/evbarm/zynq/zynq_machdep.c           |   7 ++++---
 8 files changed, 34 insertions(+), 26 deletions(-)

diffs (224 lines):

diff -r 90b243b65098 -r ea02031f9078 sys/arch/evbarm/amlogic/amlogic_machdep.c
--- a/sys/arch/evbarm/amlogic/amlogic_machdep.c Tue Jul 17 18:33:07 2018 +0000
+++ b/sys/arch/evbarm/amlogic/amlogic_machdep.c Tue Jul 17 18:41:00 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: amlogic_machdep.c,v 1.22 2018/06/05 08:03:28 hkenken Exp $ */
+/*     $NetBSD: amlogic_machdep.c,v 1.23 2018/07/17 18:41:00 christos Exp $ */
 
 /*
  * Machine dependent functions for kernel setup for TI OSK5912 board.
@@ -125,7 +125,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amlogic_machdep.c,v 1.22 2018/06/05 08:03:28 hkenken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amlogic_machdep.c,v 1.23 2018/07/17 18:41:00 christos Exp $");
 
 #include "opt_machdep.h"
 #include "opt_ddb.h"
@@ -200,7 +200,9 @@
 static char bootargs[AMLOGIC_MAX_BOOT_STRING];
 char *boot_args = NULL;
 char *boot_file = NULL;
-u_int uboot_args[4] = { 0 };   /* filled in by amlogic_start.S (not in bss) */
+
+/* filled in before cleaning bss. keep in .data */
+u_int uboot_args[4] __attribute__((__section__(".data")));
 
 /* Same things, but for the free (unused by the kernel) memory. */
 
diff -r 90b243b65098 -r ea02031f9078 sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c
--- a/sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c Tue Jul 17 18:33:07 2018 +0000
+++ b/sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c Tue Jul 17 18:41:00 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bcm53xx_machdep.c,v 1.9 2015/07/17 20:29:29 matt Exp $ */
+/*     $NetBSD: bcm53xx_machdep.c,v 1.10 2018/07/17 18:41:01 christos Exp $    */
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
 #define IDM_PRIVATE
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bcm53xx_machdep.c,v 1.9 2015/07/17 20:29:29 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm53xx_machdep.c,v 1.10 2018/07/17 18:41:01 christos Exp $");
 
 #include "opt_evbarm_boardtype.h"
 #include "opt_broadcom.h"
@@ -83,7 +83,8 @@
 static char bootargs[MAX_BOOT_STRING];
 char *boot_args = NULL;     
 
-u_int uboot_args[4] = { 0 };
+/* filled in before cleaning bss. keep in .data */
+u_int uboot_args[4] __attribute__((__section__(".data")));
 
 static void bcm53xx_system_reset(void);
 
diff -r 90b243b65098 -r ea02031f9078 sys/arch/evbarm/beagle/beagle_machdep.c
--- a/sys/arch/evbarm/beagle/beagle_machdep.c   Tue Jul 17 18:33:07 2018 +0000
+++ b/sys/arch/evbarm/beagle/beagle_machdep.c   Tue Jul 17 18:41:00 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: beagle_machdep.c,v 1.70 2018/07/15 05:16:41 maxv Exp $ */
+/*     $NetBSD: beagle_machdep.c,v 1.71 2018/07/17 18:41:01 christos Exp $ */
 
 /*
  * Machine dependent functions for kernel setup for TI OSK5912 board.
@@ -125,7 +125,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: beagle_machdep.c,v 1.70 2018/07/15 05:16:41 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: beagle_machdep.c,v 1.71 2018/07/17 18:41:01 christos Exp $");
 
 #include "opt_machdep.h"
 #include "opt_ddb.h"
@@ -222,7 +222,8 @@
 
 static uint8_t beagle_edid[128];       /* EDID storage */
 
-u_int uboot_args[4] = { 0 };   /* filled in by beagle_start.S (not in bss) */
+/* filled in before cleaning bss. keep in .data */
+u_int uboot_args[4] __attribute__((__section__(".data")));
 
 /* Same things, but for the free (unused by the kernel) memory. */
 
diff -r 90b243b65098 -r ea02031f9078 sys/arch/evbarm/fdt/fdt_machdep.c
--- a/sys/arch/evbarm/fdt/fdt_machdep.c Tue Jul 17 18:33:07 2018 +0000
+++ b/sys/arch/evbarm/fdt/fdt_machdep.c Tue Jul 17 18:41:00 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fdt_machdep.c,v 1.25 2018/07/17 00:38:27 christos Exp $ */
+/* $NetBSD: fdt_machdep.c,v 1.26 2018/07/17 18:41:01 christos Exp $ */
 
 /*-
  * Copyright (c) 2015-2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.25 2018/07/17 00:38:27 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.26 2018/07/17 18:41:01 christos Exp $");
 
 #include "opt_machdep.h"
 #include "opt_bootconfig.h"
@@ -95,10 +95,10 @@
 BootConfig bootconfig;
 char bootargs[FDT_MAX_BOOT_STRING] = "";
 char *boot_args = NULL;
-/*
- * filled in by xxx_start.S (must not be in bss)
- */
-unsigned long  uboot_args[4] = { 0 };
+
+/* filled in before cleaning bss. keep in .data */
+u_int uboot_args[4] __attribute__((__section__(".data")));
+
 const uint8_t *fdt_addr_r = (const uint8_t *)0xdeadc0de;
 
 static char fdt_memory_ext_storage[EXTENT_FIXED_STORAGE_SIZE(DRAM_BLOCKS)];
diff -r 90b243b65098 -r ea02031f9078 sys/arch/evbarm/hawk/hawk_machdep.c
--- a/sys/arch/evbarm/hawk/hawk_machdep.c       Tue Jul 17 18:33:07 2018 +0000
+++ b/sys/arch/evbarm/hawk/hawk_machdep.c       Tue Jul 17 18:41:00 2018 +0000
@@ -26,7 +26,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: hawk_machdep.c,v 1.1 2013/10/02 16:48:26 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hawk_machdep.c,v 1.2 2018/07/17 18:41:01 christos Exp $");
 
 #include "opt_timer.h"
 #include "opt_machdep.h"
@@ -83,7 +83,8 @@
 static char bootargs[MAX_BOOT_STRING];
 char *boot_args = NULL;
 
-u_int uboot_args[4] = { 0 };
+/* filled in before cleaning bss. keep in .data */
+u_int uboot_args[4] __attribute__((__section__(".data")));
 
 static struct arm32_dma_range omapl1x_dma_ranges[4];
 extern char KERNEL_BASE_phys[];
diff -r 90b243b65098 -r ea02031f9078 sys/arch/evbarm/imx7/imx7_machdep.c
--- a/sys/arch/evbarm/imx7/imx7_machdep.c       Tue Jul 17 18:33:07 2018 +0000
+++ b/sys/arch/evbarm/imx7/imx7_machdep.c       Tue Jul 17 18:41:00 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: imx7_machdep.c,v 1.6 2017/09/08 05:29:12 hkenken Exp $ */
+/*     $NetBSD: imx7_machdep.c,v 1.7 2018/07/17 18:41:01 christos Exp $        */
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: imx7_machdep.c,v 1.6 2017/09/08 05:29:12 hkenken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imx7_machdep.c,v 1.7 2018/07/17 18:41:01 christos Exp $");
 
 #include "opt_evbarm_boardtype.h"
 #include "opt_arm_debug.h"
@@ -73,7 +73,8 @@
 static char bootargs[MAX_BOOT_STRING];
 char *boot_args = NULL;
 
-u_int uboot_args[4] = { 0 };
+/* filled in before cleaning bss. keep in .data */
+u_int uboot_args[4] __attribute__((__section__(".data")));
 
 /*
  * Macros to translate between physical and virtual for a subset of the
diff -r 90b243b65098 -r ea02031f9078 sys/arch/evbarm/nitrogen6/nitrogen6_machdep.c
--- a/sys/arch/evbarm/nitrogen6/nitrogen6_machdep.c     Tue Jul 17 18:33:07 2018 +0000
+++ b/sys/arch/evbarm/nitrogen6/nitrogen6_machdep.c     Tue Jul 17 18:41:00 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nitrogen6_machdep.c,v 1.7 2017/09/08 05:29:12 hkenken Exp $    */
+/*     $NetBSD: nitrogen6_machdep.c,v 1.8 2018/07/17 18:41:01 christos Exp $   */
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nitrogen6_machdep.c,v 1.7 2017/09/08 05:29:12 hkenken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nitrogen6_machdep.c,v 1.8 2018/07/17 18:41:01 christos Exp $");
 
 #include "opt_evbarm_boardtype.h"
 #include "opt_arm_debug.h"
@@ -74,7 +74,8 @@
 static char bootargs[MAX_BOOT_STRING];
 char *boot_args = NULL;
 
-u_int uboot_args[4] = { 0 };
+/* filled in before cleaning bss. keep in .data */
+u_int uboot_args[4] __attribute__((__section__(".data")));
 
 /*
  * Macros to translate between physical and virtual for a subset of the
diff -r 90b243b65098 -r ea02031f9078 sys/arch/evbarm/zynq/zynq_machdep.c
--- a/sys/arch/evbarm/zynq/zynq_machdep.c       Tue Jul 17 18:33:07 2018 +0000
+++ b/sys/arch/evbarm/zynq/zynq_machdep.c       Tue Jul 17 18:41:00 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: zynq_machdep.c,v 1.1 2015/01/23 12:34:09 hkenken Exp $ */
+/*     $NetBSD: zynq_machdep.c,v 1.2 2018/07/17 18:41:01 christos Exp $        */
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: zynq_machdep.c,v 1.1 2015/01/23 12:34:09 hkenken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: zynq_machdep.c,v 1.2 2018/07/17 18:41:01 christos Exp $");
 
 #include "opt_evbarm_boardtype.h"
 #include "opt_arm_debug.h"
@@ -70,7 +70,8 @@
 static char bootargs[MAX_BOOT_STRING];
 char *boot_args = NULL;
 
-u_int uboot_args[4] = { 0 };
+/* filled in before cleaning bss. keep in .data */
+u_int uboot_args[4] __attribute__((__section__(".data")));
 
 /*
  * Macros to translate between physical and virtual for a subset of the



Home | Main Index | Thread Index | Old Index