Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/luna68k/luna68k Handle bootarg strings passed from ...
details: https://anonhg.NetBSD.org/src/rev/b5379b128157
branches: trunk
changeset: 780538:b5379b128157
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Sat Jul 28 17:33:53 2012 +0000
description:
Handle bootarg strings passed from firmware prompt properly on LUNA-II.
LUNA-II seems to use a different vector from LUNA to pass bootargs.
Now we can specify RB_ASKNAME and RB_SINGLE at boot on LUNA-II.
Should be pulled up to netbsd-6.
diffstat:
sys/arch/luna68k/luna68k/locore.s | 26 ++++++++++++++++++--------
sys/arch/luna68k/luna68k/machdep.c | 12 +++++++-----
2 files changed, 25 insertions(+), 13 deletions(-)
diffs (86 lines):
diff -r cb5561bac808 -r b5379b128157 sys/arch/luna68k/luna68k/locore.s
--- a/sys/arch/luna68k/luna68k/locore.s Sat Jul 28 16:14:17 2012 +0000
+++ b/sys/arch/luna68k/luna68k/locore.s Sat Jul 28 17:33:53 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.48 2012/07/23 15:10:17 tsutsui Exp $ */
+/* $NetBSD: locore.s,v 1.49 2012/07/28 17:33:53 tsutsui Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -136,13 +136,6 @@
RELOC(hwplanemask,%a0)
movl %d5,%a0@ | save hwplanemask
- movl #0x41000000,%a0 | argument of 'x' command on boot
- movl %a0@(212),%a0 | (char *)base[53]
- RELOC(bootarg,%a1)
- movl #63,%d0
-1: movb %a0@+,%a1@+ | copy to bootarg
- dbra %d0,1b | upto 63 characters
-
movl #CACHE_OFF,%d0
movc %d0,%cacr | clear and disable on-chip cache(s)
@@ -169,6 +162,23 @@
movl %d2,%a0@
/*
+ * save argument of 'x' command on boot per machine type
+ * XXX: assume CPU_68040 is LUNA-II
+ */
+ movl #0x41000000,%a0
+ cmpl #CPU_68040,%d0 | 68040?
+ jne 1f | no, assume 68030 LUNA
+ movl %a0@(8),%a0 | arg at (char *)base[2] on LUNA-II
+ jra Lstart1
+1:
+ movl %a0@(212),%a0 | arg at (char *)base[53] on LUNA
+Lstart1:
+ RELOC(bootarg,%a1)
+ movl #63,%d0
+1: movb %a0@+,%a1@+ | copy to bootarg
+ dbra %d0,1b | upto 63 characters
+
+ /*
* Now that we know what CPU we have, initialize the address error
* and bus error handlers in the vector table:
*
diff -r cb5561bac808 -r b5379b128157 sys/arch/luna68k/luna68k/machdep.c
--- a/sys/arch/luna68k/luna68k/machdep.c Sat Jul 28 16:14:17 2012 +0000
+++ b/sys/arch/luna68k/luna68k/machdep.c Sat Jul 28 17:33:53 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.90 2012/07/27 05:36:10 matt Exp $ */
+/* $NetBSD: machdep.c,v 1.91 2012/07/28 17:33:53 tsutsui Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.90 2012/07/27 05:36:10 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.91 2012/07/28 17:33:53 tsutsui Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@@ -183,15 +183,17 @@
boothowto = 0;
i = 0;
/*
- * 'bootarg' has;
+ * 'bootarg' on LUNA has:
* "<args of x command> ENADDR=<addr> HOST=<host> SERVER=<name>"
* where <addr> is MAC address of which network loader used (not
* necessarily same as one at 0x4101.FFE0), <host> and <name>
- * are the values of HOST and SERVER environment variables,
+ * are the values of HOST and SERVER environment variables.
+ *
+ * 'bootarg' on LUNA-II has "<args of x command>" only.
*
* NetBSD/luna68k cares only the first argment; any of "sda".
*/
- for (cp = bootarg; *cp != ' '; cp++) {
+ for (cp = bootarg; *cp != ' ' && *cp != 0; cp++) {
BOOT_FLAG(*cp, boothowto);
if (i++ >= sizeof(bootarg))
break;
Home |
Main Index |
Thread Index |
Old Index