Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/cats/cats Add const, fix -Wcast-qual and fix shadow...
details: https://anonhg.NetBSD.org/src/rev/0f7eec628908
branches: trunk
changeset: 581710:0f7eec628908
user: chris <chris%NetBSD.org@localhost>
date: Fri Jun 03 23:19:48 2005 +0000
description:
Add const, fix -Wcast-qual and fix shadow warning.
Also add some tracing I used to debug booting issues with ABLE.
diffstat:
sys/arch/cats/cats/cats_machdep.c | 41 +++++++++++++++++++++++++++-----------
1 files changed, 29 insertions(+), 12 deletions(-)
diffs (102 lines):
diff -r a5b1452197b4 -r 0f7eec628908 sys/arch/cats/cats/cats_machdep.c
--- a/sys/arch/cats/cats/cats_machdep.c Fri Jun 03 23:07:20 2005 +0000
+++ b/sys/arch/cats/cats/cats_machdep.c Fri Jun 03 23:19:48 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cats_machdep.c,v 1.52 2004/12/12 20:42:53 abs Exp $ */
+/* $NetBSD: cats_machdep.c,v 1.53 2005/06/03 23:19:48 chris Exp $ */
/*
* Copyright (c) 1997,1998 Mark Brinicombe.
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cats_machdep.c,v 1.52 2004/12/12 20:42:53 abs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cats_machdep.c,v 1.53 2005/06/03 23:19:48 chris Exp $");
#include "opt_ddb.h"
#include "opt_pmap_debug.h"
@@ -177,7 +177,7 @@
int fcomcnattach __P((u_int iobase, int rate,tcflag_t cflag));
int fcomcndetach __P((void));
-static void process_kernel_args __P((char *));
+static void process_kernel_args __P((const char *));
extern void configure __P((void));
/* A load of console goo. */
@@ -353,10 +353,10 @@
*/
u_int
-initarm(bootargs)
- void *bootargs;
+initarm(arm_bootargs)
+ void *arm_bootargs;
{
- struct ebsaboot *bootinfo = bootargs;
+ struct ebsaboot *bootinfo = arm_bootargs;
int loop;
int loop1;
u_int l1pagetable;
@@ -399,6 +399,23 @@
&& ebsabootinfo.bt_magic != BT_MAGIC_NUMBER_CATS)
panic("Incompatible magic number passed in boot args");
+#ifdef VERBOSE_INIT_ARM
+ /* output the incoming bootinfo */
+ printf("bootinfo @ %p\n", arm_bootargs);
+ printf("bt_magic = 0x%08x\n", ebsabootinfo.bt_magic);
+ printf("bt_vargp = 0x%08x\n", ebsabootinfo.bt_vargp);
+ printf("bt_pargp = 0x%08x\n", ebsabootinfo.bt_pargp);
+ printf("bt_args @ %p, contents = \"%s\"\n", ebsabootinfo.bt_args, ebsabootinfo.bt_args);
+ printf("bt_l1 = %p\n", ebsabootinfo.bt_l1);
+
+ printf("bt_memstart = 0x%08x\n", ebsabootinfo.bt_memstart);
+ printf("bt_memend = 0x%08x\n", ebsabootinfo.bt_memend);
+ printf("bt_memavail = 0x%08x\n", ebsabootinfo.bt_memavail);
+ printf("bt_fclk = 0x%08x\n", ebsabootinfo.bt_fclk);
+ printf("bt_pciclk = 0x%08x\n", ebsabootinfo.bt_pciclk);
+ printf("bt_vers = 0x%08x\n", ebsabootinfo.bt_vers);
+ printf("bt_features = 0x%08x\n", ebsabootinfo.bt_features);
+#endif
/* {
int loop;
for (loop = 0; loop < 8; ++loop) {
@@ -435,7 +452,7 @@
* Examine the boot args string for options we need to know about
* now.
*/
- process_kernel_args((char *)ebsabootinfo.bt_args);
+ process_kernel_args(ebsabootinfo.bt_args);
printf("initarm: Configuring system ...\n");
@@ -912,14 +929,14 @@
}
static void
-process_kernel_args(args)
+process_kernel_args(loader_args)
+ const char *loader_args;
+{
char *args;
-{
-
boothowto = 0;
/* Make a local copy of the bootargs */
- strncpy(bootargs, args, MAX_BOOT_STRING);
+ strncpy(bootargs, loader_args, MAX_BOOT_STRING);
args = bootargs;
boot_file = bootargs;
@@ -950,7 +967,7 @@
consinit(void)
{
static int consinit_called = 0;
- char *console = CONSDEVNAME;
+ const char *console = CONSDEVNAME;
if (consinit_called != 0)
return;
Home |
Main Index |
Thread Index |
Old Index