Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Jan 2010 09:23:34 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r202786 - head/sys/mips/cavium
Message-ID:  <201001220923.o0M9NYBS020801@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Fri Jan 22 09:23:34 2010
New Revision: 202786
URL: http://svn.freebsd.org/changeset/base/202786

Log:
  Don't clear bss/sbss.  The boot loader already does this. In addition,
  the Cavium version of the boot loader puts data just after &end, so
  our rounding up to the next page in clearing memory overwrote their
  data, which meant we'd get a lot of wrong values for parameters to the
  system.
  
  While I'm here, remove argc/argv parsing.  Those values aren't passed
  in via a0 and a1, so it was a guaranted panic on some boards.

Modified:
  head/sys/mips/cavium/octeon_machdep.c

Modified: head/sys/mips/cavium/octeon_machdep.c
==============================================================================
--- head/sys/mips/cavium/octeon_machdep.c	Fri Jan 22 09:19:57 2010	(r202785)
+++ head/sys/mips/cavium/octeon_machdep.c	Fri Jan 22 09:23:34 2010	(r202786)
@@ -643,14 +643,7 @@ platform_start(__register_t a0, __regist
     __register_t a3)
 {
 	uint64_t platform_counter_freq;
-	vm_offset_t kernend;
-	int argc = a0;
-	char **argv = (char **)a1;
-	int i, mem;
-
-	/* clear the BSS and SBSS segments */
-	kernend = round_page((vm_offset_t)&end);
-	memset(&edata, 0, kernend - (vm_offset_t)(&edata));
+	int i, mem = 0;
 
 	/* Initialize pcpu stuff */
 	mips_pcpu0_init();
@@ -660,17 +653,6 @@ platform_start(__register_t a0, __regist
         octeon_ciu_reset();
     	octeon_uart_write_string(0, "Platform Starting\n");
 
-	/*
-	 * Looking for mem=XXM argument
-	 */
-	mem = 0; /* Just something to start with */
-	for (i=0; i < argc; i++) {
-		if (strncmp(argv[i], "mem=", 4) == 0) {
-			mem = strtol(argv[i] + 4, NULL, 0);
-			break;
-		}
-	}
-
 	bootverbose = 1;
 	if (mem > 0)
 		realmem = btoc(mem << 20);
@@ -694,10 +676,6 @@ platform_start(__register_t a0, __regist
 	platform_counter_freq = 330000000UL; /* XXX: from idt */
 	mips_timer_init_params(platform_counter_freq, 1);
 	cninit();
-	printf("cmd line: ");
-	for (i=0; i < argc; i++)
-		printf("%s ", argv[i]);
-	printf("\n");
 	init_param2(physmem);
 	mips_cpu_init();
 	mutex_init();



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001220923.o0M9NYBS020801>