Module Name:    src
Committed By:   christos
Date:           Tue Jul 17 18:41:01 UTC 2018

Modified Files:
        src/sys/arch/evbarm/amlogic: amlogic_machdep.c
        src/sys/arch/evbarm/bcm53xx: bcm53xx_machdep.c
        src/sys/arch/evbarm/beagle: beagle_machdep.c
        src/sys/arch/evbarm/fdt: fdt_machdep.c
        src/sys/arch/evbarm/hawk: hawk_machdep.c
        src/sys/arch/evbarm/imx7: imx7_machdep.c
        src/sys/arch/evbarm/nitrogen6: nitrogen6_machdep.c
        src/sys/arch/evbarm/zynq: zynq_machdep.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/evbarm/amlogic/amlogic_machdep.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c
cvs rdiff -u -r1.70 -r1.71 src/sys/arch/evbarm/beagle/beagle_machdep.c
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/evbarm/fdt/fdt_machdep.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/hawk/hawk_machdep.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/evbarm/imx7/imx7_machdep.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbarm/nitrogen6/nitrogen6_machdep.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/zynq/zynq_machdep.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/evbarm/amlogic/amlogic_machdep.c
diff -u src/sys/arch/evbarm/amlogic/amlogic_machdep.c:1.22 src/sys/arch/evbarm/amlogic/amlogic_machdep.c:1.23
--- src/sys/arch/evbarm/amlogic/amlogic_machdep.c:1.22	Tue Jun  5 04:03:28 2018
+++ src/sys/arch/evbarm/amlogic/amlogic_machdep.c	Tue Jul 17 14:41:00 2018
@@ -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 @@ BootConfig bootconfig;		/* Boot config s
 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. */
 

Index: src/sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c
diff -u src/sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c:1.9 src/sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c:1.10
--- src/sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c:1.9	Fri Jul 17 16:29:29 2015
+++ src/sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c	Tue Jul 17 14:41:01 2018
@@ -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 @@ BootConfig bootconfig;
 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);
 

Index: src/sys/arch/evbarm/beagle/beagle_machdep.c
diff -u src/sys/arch/evbarm/beagle/beagle_machdep.c:1.70 src/sys/arch/evbarm/beagle/beagle_machdep.c:1.71
--- src/sys/arch/evbarm/beagle/beagle_machdep.c:1.70	Sun Jul 15 01:16:41 2018
+++ src/sys/arch/evbarm/beagle/beagle_machdep.c	Tue Jul 17 14:41:01 2018
@@ -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 @@ char *boot_file = NULL;
 
 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. */
 

Index: src/sys/arch/evbarm/fdt/fdt_machdep.c
diff -u src/sys/arch/evbarm/fdt/fdt_machdep.c:1.25 src/sys/arch/evbarm/fdt/fdt_machdep.c:1.26
--- src/sys/arch/evbarm/fdt/fdt_machdep.c:1.25	Mon Jul 16 20:38:27 2018
+++ src/sys/arch/evbarm/fdt/fdt_machdep.c	Tue Jul 17 14:41:01 2018
@@ -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 <jmcne...@invisible.ca>
@@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: fdt_machdep.
 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)];

Index: src/sys/arch/evbarm/hawk/hawk_machdep.c
diff -u src/sys/arch/evbarm/hawk/hawk_machdep.c:1.1 src/sys/arch/evbarm/hawk/hawk_machdep.c:1.2
--- src/sys/arch/evbarm/hawk/hawk_machdep.c:1.1	Wed Oct  2 12:48:26 2013
+++ src/sys/arch/evbarm/hawk/hawk_machdep.c	Tue Jul 17 14:41:01 2018
@@ -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 @@ BootConfig bootconfig;		/* Boot config s
 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[];

Index: src/sys/arch/evbarm/imx7/imx7_machdep.c
diff -u src/sys/arch/evbarm/imx7/imx7_machdep.c:1.6 src/sys/arch/evbarm/imx7/imx7_machdep.c:1.7
--- src/sys/arch/evbarm/imx7/imx7_machdep.c:1.6	Fri Sep  8 01:29:12 2017
+++ src/sys/arch/evbarm/imx7/imx7_machdep.c	Tue Jul 17 14:41:01 2018
@@ -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 @@ BootConfig bootconfig;
 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

Index: src/sys/arch/evbarm/nitrogen6/nitrogen6_machdep.c
diff -u src/sys/arch/evbarm/nitrogen6/nitrogen6_machdep.c:1.7 src/sys/arch/evbarm/nitrogen6/nitrogen6_machdep.c:1.8
--- src/sys/arch/evbarm/nitrogen6/nitrogen6_machdep.c:1.7	Fri Sep  8 01:29:12 2017
+++ src/sys/arch/evbarm/nitrogen6/nitrogen6_machdep.c	Tue Jul 17 14:41:01 2018
@@ -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 @@ BootConfig bootconfig;
 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

Index: src/sys/arch/evbarm/zynq/zynq_machdep.c
diff -u src/sys/arch/evbarm/zynq/zynq_machdep.c:1.1 src/sys/arch/evbarm/zynq/zynq_machdep.c:1.2
--- src/sys/arch/evbarm/zynq/zynq_machdep.c:1.1	Fri Jan 23 07:34:09 2015
+++ src/sys/arch/evbarm/zynq/zynq_machdep.c	Tue Jul 17 14:41:01 2018
@@ -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 @@ BootConfig bootconfig;
 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

Reply via email to