From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 09:23:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0AE9F106568B; Fri, 22 Jan 2010 09:23:35 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D41688FC0A; Fri, 22 Jan 2010 09:23:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0M9NYHG020803; Fri, 22 Jan 2010 09:23:34 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0M9NYBS020801; Fri, 22 Jan 2010 09:23:34 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001220923.o0M9NYBS020801@svn.freebsd.org> From: Warner Losh Date: Fri, 22 Jan 2010 09:23:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202786 - head/sys/mips/cavium X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2010 09:23:35 -0000 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();