Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-6]: src/sys/arch/luna68k/luna68k Pull up following revision(s) (r...



details:   https://anonhg.NetBSD.org/src/rev/7cb75f390595
branches:  netbsd-6
changeset: 774375:7cb75f390595
user:      martin <martin%NetBSD.org@localhost>
date:      Tue Jul 31 08:22:06 2012 +0000

description:
Pull up following revision(s) (requested by tsutsui in ticket #453):
        sys/arch/luna68k/luna68k/machdep.c: revision 1.91
        sys/arch/luna68k/luna68k/locore.s: revision 1.49
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 4e8671670ea0 -r 7cb75f390595 sys/arch/luna68k/luna68k/locore.s
--- a/sys/arch/luna68k/luna68k/locore.s Tue Jul 31 08:14:32 2012 +0000
+++ b/sys/arch/luna68k/luna68k/locore.s Tue Jul 31 08:22:06 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.47.2.1 2012/07/25 21:30:35 martin Exp $ */
+/* $NetBSD: locore.s,v 1.47.2.2 2012/07/31 08:22:06 martin 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 4e8671670ea0 -r 7cb75f390595 sys/arch/luna68k/luna68k/machdep.c
--- a/sys/arch/luna68k/luna68k/machdep.c        Tue Jul 31 08:14:32 2012 +0000
+++ b/sys/arch/luna68k/luna68k/machdep.c        Tue Jul 31 08:22:06 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.89 2011/12/12 19:03:10 mrg Exp $ */
+/* $NetBSD: machdep.c,v 1.89.2.1 2012/07/31 08:22:06 martin 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.89 2011/12/12 19:03:10 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.89.2.1 2012/07/31 08:22:06 martin Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -188,15 +188,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