Module Name:    src
Committed By:   matt
Date:           Thu Sep 27 00:22:39 UTC 2012

Modified Files:
        src/sys/arch/evbarm/bcm53xx: bcm53xx_machdep.c bcm53xx_start.S

Log Message:
Print out u-boot args


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbarm/bcm53xx/bcm53xx_start.S

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/bcm53xx/bcm53xx_machdep.c
diff -u src/sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c:1.2 src/sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c:1.3
--- src/sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c:1.2	Fri Sep  7 11:53:49 2012
+++ src/sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c	Thu Sep 27 00:22:39 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm53xx_machdep.c,v 1.2 2012/09/07 11:53:49 matt Exp $	*/
+/*	$NetBSD: bcm53xx_machdep.c,v 1.3 2012/09/27 00:22:39 matt 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.2 2012/09/07 11:53:49 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm53xx_machdep.c,v 1.3 2012/09/27 00:22:39 matt Exp $");
 
 #include "opt_evbarm_boardtype.h"
 #include "opt_broadcom.h"
@@ -83,6 +83,8 @@ BootConfig bootconfig;
 static char bootargs[MAX_BOOT_STRING];
 char *boot_args = NULL;     
 
+u_int uboot_args[4] = { 0 };
+
 static void bcm53xx_system_reset(void);
 
 /*
@@ -214,6 +216,9 @@ initarm(void *arg)
 	bcm53xx_rng_start(bcm53xx_ioreg_bst, bcm53xx_ioreg_bsh);
 #endif
 
+	printf("uboot arg = %#x, %#x, %#x, %#x\n",
+	    uboot_args[0], uboot_args[1], uboot_args[2], uboot_args[3]);      
+
 	/* Talk to the user */
 	printf("\nNetBSD/evbarm (" ___STRING(EVBARM_BOARDTYPE) ") booting ...\n");
 
@@ -226,10 +231,15 @@ initarm(void *arg)
 	    arm_cpu_max + 1, arm_cpu_max + 1 ? "s" : "",
 	    arm_cpu_hatched);
 #endif
+	printf(", CLIDR=%010o CTR=%#x",
+	    armreg_clidr_read(), armreg_ctr_read());
 	printf("\n");
 #endif
 
-	arm32_bootmem_init(KERN_VTOPHYS(KERNEL_BASE), bcm53xx_memprobe(),
+	psize_t memsize = bcm53xx_memprobe();
+	//memsize = 128*1024*1024;
+
+	arm32_bootmem_init(KERN_VTOPHYS(KERNEL_BASE), memsize,
 	    (paddr_t)KERNEL_BASE_phys);
 
 	/*

Index: src/sys/arch/evbarm/bcm53xx/bcm53xx_start.S
diff -u src/sys/arch/evbarm/bcm53xx/bcm53xx_start.S:1.3 src/sys/arch/evbarm/bcm53xx/bcm53xx_start.S:1.4
--- src/sys/arch/evbarm/bcm53xx/bcm53xx_start.S:1.3	Fri Sep  7 11:53:50 2012
+++ src/sys/arch/evbarm/bcm53xx/bcm53xx_start.S	Thu Sep 27 00:22:39 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm53xx_start.S,v 1.3 2012/09/07 11:53:50 matt Exp $	*/
+/*	$NetBSD: bcm53xx_start.S,v 1.4 2012/09/27 00:22:39 matt Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -45,7 +45,7 @@
 #define	CONADDR		0x18000300
 #endif
 
-RCSID("$NetBSD: bcm53xx_start.S,v 1.3 2012/09/07 11:53:50 matt Exp $")
+RCSID("$NetBSD: bcm53xx_start.S,v 1.4 2012/09/27 00:22:39 matt Exp $")
 
 #undef VERBOSE_INIT_ARM
 #define VERBOSE_INIT_ARM
@@ -67,6 +67,12 @@ RCSID("$NetBSD: bcm53xx_start.S,v 1.3 20
 	.global	_C_LABEL(bcm53xx_start)
 _C_LABEL(bcm53xx_start):
 	/*
+	 * Save any arguments u-boot passed us.
+	 */
+	ldr	r4, .Luboot_args
+	stmia	r4, {r0-r3}
+
+	/*
 	 * Let's turn on the CCA watchdog in case something goes horribly wrong.
 	 */
 	ldr	r0, .Lcca_wdog
@@ -127,6 +133,9 @@ _C_LABEL(bcm53xx_start):
 
 	/* NOTREACHED */
 
+.Luboot_args:
+	.word	uboot_args
+
 .Lsku_rom_lut:
 	.word	0xffff0400
 

Reply via email to