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/boot_ustar Check whether MPU >= 68020.



details:   https://anonhg.NetBSD.org/src/rev/d9e68832ac3f
branches:  trunk
changeset: 968486:d9e68832ac3f
user:      isaki <isaki%NetBSD.org@localhost>
date:      Sat Jan 18 06:00:04 2020 +0000

description:
Check whether MPU >= 68020.
Because current secondary bootloader assumes that.
This will display a reasonable error message instead of "Error occurs,
please reset" (IPL message) when you try sysinst*.fs on X68000.

XXX secondary bootloader (/boot) should not assume mpu regardless of
whether primary bootloader has checked mpu. (?)

diffstat:

 sys/arch/x68k/stand/boot_ustar/boot_ustar.S |  14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diffs (31 lines):

diff -r abcbc77dc3cc -r d9e68832ac3f sys/arch/x68k/stand/boot_ustar/boot_ustar.S
--- a/sys/arch/x68k/stand/boot_ustar/boot_ustar.S       Sat Jan 18 05:56:51 2020 +0000
+++ b/sys/arch/x68k/stand/boot_ustar/boot_ustar.S       Sat Jan 18 06:00:04 2020 +0000
@@ -3,7 +3,7 @@
 |         ITOH Yasufumi
 |        minoura%NetBSD.org@localhost
 |
-| $NetBSD: boot_ustar.S,v 1.11 2020/01/18 05:07:34 isaki Exp $
+| $NetBSD: boot_ustar.S,v 1.12 2020/01/18 06:00:04 isaki Exp $
 
 | supports floppy only
 
@@ -56,6 +56,18 @@
                moveq   #0x10,%d1
                IOCS(__CRTMOD)
 
+               | We use 68020 instructions, and check MPU beforehand.
+               | Here "moveql #-1,%d0" = 0x70ff, and subsequent moveb loads
+               |   0xff if MPU <= 010 (chkmpu+2 + %d0.w)
+               |   0x70 if MPU >= 020 (chkmpu+2 + %d0.w*2).
+               | This is a move, not a tst instruction because tst with
+               | pc-relative is not available on 000/010.
+chkmpu:
+               moveql  #-1,%d0
+               .word   0x103b, 0x02fe  | moveb %pc@(chkmpu+2,%d0:W:2),%d0
+               jpl     mpuok           | MC68020 or later
+               BOOT_ERROR("MPU 68000?");
+mpuok:
                |
                | SASI or Floppy
                |



Home | Main Index | Thread Index | Old Index