Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/x68k/stand Initialize the screen in all primary boo...



details:   https://anonhg.NetBSD.org/src/rev/25879390485b
branches:  trunk
changeset: 848115:25879390485b
user:      isaki <isaki%NetBSD.org@localhost>
date:      Sat Jan 18 05:07:34 2020 +0000

description:
Initialize the screen in all primary bootloaders.
- Some IPL (or boot selector) don't do it, but current secondary bootloader
  expects the screen to be initialized to display logo.
  To keep messages (like version signature) displayed by primary bootloader,
  this initialization should be done early in all primary bootloaders.
- For boot_ustar.S, relocates some registers to save bootinfo (%d0).
- Bumps version.

Confirmed on X68030+060turbo and my X68030.  This problem was found on
X68030+060turbo at NetBSD booth in OSC 2011 Hiroshima (8+ years ago).

diffstat:

 sys/arch/x68k/stand/boot_ufs/boot.S         |  10 +++++++++-
 sys/arch/x68k/stand/boot_ufs/version        |   3 ++-
 sys/arch/x68k/stand/boot_ustar/boot_ustar.S |  15 ++++++++++-----
 sys/arch/x68k/stand/boot_ustar/version      |   3 ++-
 sys/arch/x68k/stand/libiocs/iocscall.h      |   3 ++-
 sys/arch/x68k/stand/xxboot/boot.S           |  10 +++++++++-
 sys/arch/x68k/stand/xxboot/version          |   3 ++-
 7 files changed, 36 insertions(+), 11 deletions(-)

diffs (154 lines):

diff -r dbe19b39d819 -r 25879390485b sys/arch/x68k/stand/boot_ufs/boot.S
--- a/sys/arch/x68k/stand/boot_ufs/boot.S       Sat Jan 18 04:42:29 2020 +0000
+++ b/sys/arch/x68k/stand/boot_ufs/boot.S       Sat Jan 18 05:07:34 2020 +0000
@@ -2,7 +2,7 @@
 | author: chapuni(webmaster%chapuni.com@localhost)
 |         ITOH Yasufumi
 |
-| $NetBSD: boot.S,v 1.13 2020/01/16 13:37:26 isaki Exp $
+| $NetBSD: boot.S,v 1.14 2020/01/18 05:07:34 isaki Exp $
 
 #include <machine/asm.h>
 #include "iocscall.h"
@@ -290,6 +290,14 @@
 |      The latter text+data part is not accessible at the first boot time.
 |      PC-relative can be used from here.
 |
+               | Initialize the screen here.  Some IPL (060turbo ROM or
+               | genuine boot selector) don't initialize the screen.
+               | Such initialization should be done as early as possible
+               | but it's too severe to place it in first_kbyte area.
+               | Therefore do it here.
+               moveq   #0x10,%d1
+               IOCS(__CRTMOD)
+
                jmp     _C_LABEL(bootufs)       | 0x0Fxxxx ¤ËÈô¤ó¤Ç¤æ¤¯
 
                .word   0
diff -r dbe19b39d819 -r 25879390485b sys/arch/x68k/stand/boot_ufs/version
--- a/sys/arch/x68k/stand/boot_ufs/version      Sat Jan 18 04:42:29 2020 +0000
+++ b/sys/arch/x68k/stand/boot_ufs/version      Sat Jan 18 05:07:34 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: version,v 1.3 2020/01/12 13:51:12 isaki Exp $
+$NetBSD: version,v 1.4 2020/01/18 05:07:34 isaki Exp $
 
 NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE.  The format of this
 file is important - make sure the entries are appended on end, last item
@@ -9,3 +9,4 @@
        /boot.
        Add LFS support (not tested yet).
 1.1:   Add LFSv2 support
+1.2:   Initialize the screen.
diff -r dbe19b39d819 -r 25879390485b sys/arch/x68k/stand/boot_ustar/boot_ustar.S
--- a/sys/arch/x68k/stand/boot_ustar/boot_ustar.S       Sat Jan 18 04:42:29 2020 +0000
+++ b/sys/arch/x68k/stand/boot_ustar/boot_ustar.S       Sat Jan 18 05:07:34 2020 +0000
@@ -3,7 +3,7 @@
 |         ITOH Yasufumi
 |        minoura%NetBSD.org@localhost
 |
-| $NetBSD: boot_ustar.S,v 1.10 2020/01/16 13:37:26 isaki Exp $
+| $NetBSD: boot_ustar.S,v 1.11 2020/01/18 05:07:34 isaki Exp $
 
 | supports floppy only
 
@@ -36,9 +36,9 @@
                | 0xED0000...0xED3FFE   SRAM
                | others                ROM (SCSI?)
                |
-               movel   %d0,%d1
-               clrb    %d1
-               tstl    %d1
+               movel   %d0,%d6
+               clrb    %d0
+               tstl    %d0
                jne     boot_dev_unsupported
 
                bra     _ASM_LABEL(entry)
@@ -51,10 +51,15 @@
                .space  404
 
 ASENTRY_NOPROFILE(entry)
+               | Initialize the screen first.  Some IPL (060turbo ROM or
+               | genuine boot selector) doesn't initialize the screen.
+               moveq   #0x10,%d1
+               IOCS(__CRTMOD)
+
                |
                | SASI or Floppy
                |
-               movel   %d0,%d6
+               movel   %d6,%d0
                andib   #0xFC,%d0
                cmpib   #0x90,%d0
                jne     boot_dev_unsupported    | boot from SASI?
diff -r dbe19b39d819 -r 25879390485b sys/arch/x68k/stand/boot_ustar/version
--- a/sys/arch/x68k/stand/boot_ustar/version    Sat Jan 18 04:42:29 2020 +0000
+++ b/sys/arch/x68k/stand/boot_ustar/version    Sat Jan 18 05:07:34 2020 +0000
@@ -1,7 +1,8 @@
-$NetBSD: version,v 1.2 2020/01/12 13:51:12 isaki Exp $
+$NetBSD: version,v 1.3 2020/01/18 05:07:34 isaki Exp $
 
 NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE.  The format of this
 file is important - make sure the entries are appended on end, last item
 is taken as the current.
 
 1.0:   Initial revision.
+1.1:   Initialize the screen.
diff -r dbe19b39d819 -r 25879390485b sys/arch/x68k/stand/libiocs/iocscall.h
--- a/sys/arch/x68k/stand/libiocs/iocscall.h    Sat Jan 18 04:42:29 2020 +0000
+++ b/sys/arch/x68k/stand/libiocs/iocscall.h    Sat Jan 18 05:07:34 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: iocscall.h,v 1.1 2001/09/27 10:03:27 minoura Exp $     */
+/*     $NetBSD: iocscall.h,v 1.2 2020/01/18 05:07:34 isaki Exp $       */
 
 /*
  *     IOCS call macros for X680x0
@@ -19,6 +19,7 @@
 
 #define __B_KEYINP     0x00
 #define __B_SFTSNS     0x02
+#define __CRTMOD       0x10
 #define __TPALET2      0x14
 #define __TCOLOR       0x15
 #define __TEXTPUT      0x1B
diff -r dbe19b39d819 -r 25879390485b sys/arch/x68k/stand/xxboot/boot.S
--- a/sys/arch/x68k/stand/xxboot/boot.S Sat Jan 18 04:42:29 2020 +0000
+++ b/sys/arch/x68k/stand/xxboot/boot.S Sat Jan 18 05:07:34 2020 +0000
@@ -2,7 +2,7 @@
 | author: chapuni(webmaster%chapuni.com@localhost)
 |         ITOH Yasufumi
 |
-| $NetBSD: boot.S,v 1.5 2020/01/16 13:37:27 isaki Exp $
+| $NetBSD: boot.S,v 1.6 2020/01/18 05:07:34 isaki Exp $
 
 #include <machine/asm.h>
 #include "iocscall.h"
@@ -293,6 +293,14 @@
 |      The latter text+data part is not accessible at the first boot time.
 |      PC-relative can be used from here.
 |
+               | Initialize the screen here.  Some IPL (060turbo ROM or
+               | genuine boot selector) don't initialize the screen.
+               | Such initialization should be done as early as possible
+               | but it's too severe to place it in first_kbyte area.
+               | Therefore do it here.
+               moveq   #0x10,%d1
+               IOCS(__CRTMOD)
+
                jmp     _C_LABEL(bootmain)      | 0x0Fxxxx ¤ËÈô¤ó¤Ç¤æ¤¯
 
                .word   0
diff -r dbe19b39d819 -r 25879390485b sys/arch/x68k/stand/xxboot/version
--- a/sys/arch/x68k/stand/xxboot/version        Sat Jan 18 04:42:29 2020 +0000
+++ b/sys/arch/x68k/stand/xxboot/version        Sat Jan 18 05:07:34 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: version,v 1.2 2012/11/17 19:10:46 tsutsui Exp $
+$NetBSD: version,v 1.3 2020/01/18 05:07:34 isaki Exp $
 
 NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE.  The format of this
 file is important - make sure the entries are appended on end, last item
@@ -6,3 +6,4 @@
 
 1.0:   Initial revision.
 1.1:   Fix FFS and LFS boot from SCSI HD and floppies.  Always print version.
+1.2:   Initialize the screen.



Home | Main Index | Thread Index | Old Index