Module Name: src Committed By: jmcneill Date: Tue Jun 6 09:56:00 UTC 2017
Modified Files: src/sys/arch/evbarm/fdt: fdt_machdep.c Log Message: Initialize boot_args before bootstrap for the benefit of platform code. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/evbarm/fdt/fdt_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/fdt/fdt_machdep.c diff -u src/sys/arch/evbarm/fdt/fdt_machdep.c:1.5 src/sys/arch/evbarm/fdt/fdt_machdep.c:1.6 --- src/sys/arch/evbarm/fdt/fdt_machdep.c:1.5 Tue Jun 6 00:28:05 2017 +++ src/sys/arch/evbarm/fdt/fdt_machdep.c Tue Jun 6 09:56:00 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: fdt_machdep.c,v 1.5 2017/06/06 00:28:05 jmcneill Exp $ */ +/* $NetBSD: fdt_machdep.c,v 1.6 2017/06/06 09:56:00 jmcneill 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.5 2017/06/06 00:28:05 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.6 2017/06/06 09:56:00 jmcneill Exp $"); #include "opt_machdep.h" #include "opt_ddb.h" @@ -168,6 +168,11 @@ initarm(void *arg) DPRINTN((uintptr_t)fdt_addr_r, 16); DPRINT(">"); + const int chosen = OF_finddevice("/chosen"); + if (chosen >= 0) + OF_getprop(chosen, "bootargs", bootargs, sizeof(bootargs)); + boot_args = bootargs; + DPRINT(" devmap"); pmap_devmap_register(plat->devmap()); @@ -179,11 +184,6 @@ initarm(void *arg) if (set_cpufuncs()) panic("cpu not recognized!"); - const int chosen = OF_finddevice("/chosen"); - if (chosen >= 0) - OF_getprop(chosen, "bootargs", bootargs, sizeof(bootargs)); - boot_args = bootargs; - /* * If stdout-path is specified on the command line, override the * value in /chosen/stdout-path before initializing console.