svn commit: r306067 - head/sys/powerpc/powerpc

Justin Hibbits jhibbits at FreeBSD.org
Wed Sep 21 03:10:42 UTC 2016


Author: jhibbits
Date: Wed Sep 21 03:10:41 2016
New Revision: 306067
URL: https://svnweb.freebsd.org/changeset/base/306067

Log:
  Move ofw_parse_bootargs to the correct place.
  
  Also, create a static initial environment, so bootargs can be set from uboot.

Modified:
  head/sys/powerpc/powerpc/machdep.c

Modified: head/sys/powerpc/powerpc/machdep.c
==============================================================================
--- head/sys/powerpc/powerpc/machdep.c	Wed Sep 21 02:56:57 2016	(r306066)
+++ head/sys/powerpc/powerpc/machdep.c	Wed Sep 21 03:10:41 2016	(r306067)
@@ -141,6 +141,7 @@ int hw_direct_map = 1;
 extern void *ap_pcpu;
 
 struct pcpu __pcpu[MAXCPU];
+static char init_kenv[2048];
 
 static struct trapframe frame0;
 
@@ -293,13 +294,11 @@ powerpc_init(vm_offset_t fdt, vm_offset_
 		bzero(__sbss_start, __sbss_end - __sbss_start);
 		bzero(__bss_start, _end - __bss_start);
 #endif
-		init_static_kenv(NULL, 0);
+		init_static_kenv(init_kenv, sizeof(init_kenv));
 	}
 	/* Store boot environment state */
 	OF_initial_setup((void *)fdt, NULL, (int (*)(void *))ofentry);
 
-	ofw_parse_bootargs();
-
 	/*
 	 * Init params/tunables that can be overridden by the loader
 	 */
@@ -338,6 +337,8 @@ powerpc_init(vm_offset_t fdt, vm_offset_
 
 	OF_bootstrap();
 
+	ofw_parse_bootargs();
+
 	/*
 	 * Initialize the console before printing anything.
 	 */


More information about the svn-src-head mailing list