simh / simh

The Computer History Simulation Project
http://simh.trailing-edge.com
Other
1.66k stars 304 forks source link

VAX simulators fail to bood old versions of NetBSD #315

Closed jguillaumes closed 8 years ago

jguillaumes commented 8 years ago

How to reproduce:

sim> attach rq0 vaxcd210.iso
sim> boot
Loading boot code from internal ka655x.bin

KA655-B V5.3, VMB 2.7
Performing normal system tests.
40..39..38..37..36..35..34..33..32..31..30..29..28..27..26..25..
24..23..22..21..20..19..18..17..16..15..14..13..12..11..10..09..
08..07..06..05..04..03..
Tests completed.
>>>boot dua0
(BOOT/R5:0 DUA0

  2..
-DUA0
  1..0..

>> NetBSD/vax boot [1.11 Tue Oct 25 01:22:31 UTC 2005] <<
>> Press any key to abort autoboot 0
getdisklabel: no disk label
nfs_open: must mount first.
2490992+155176=0x286284
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005

Infinite loop, PC: 800B505D (RET)
sim>                                                      

I have bissected the repository, and it looks this was introduced in commit 90ea285c

sim> show ver
MicroVAX 3900 simulator V4.0-0 Beta
        Simulator Framework Capabilities:
                64b data
                64b addresses
                Ethernet Packet transports:PCAP:TAP:VDE:NAT:UDP
                Idle/Throttling support is available
                Virtual Hard Disk (VHD) support
                Asynchronous I/O support
                FrontPanel API Version 1
        Host Platform:
                Compiler: GCC 5.3.0
                Simulator Compiled: May 17 2016 at 10:47:46
                Memory Access: Little Endian
                Memory Pointer Size: 64 bits
                Large File (>2GB) support
                SDL Video support: SDL Version 2.0.4
                PCRE RegEx support for EXPECT commands
                OS clock resolution: 1ms
                Time taken by msleep(1): 2ms
                OS: Darwin MacJordi.local 15.4.0 Darwin Kernel Version 15.4.0: Fri Feb 26 22:08:05 PST 2016; root:xnu-3248.40.184~3/RELEASE_X86_64 x86_64

        git commit id: 90ea285c
sim>                                                            

For reference, this is the log message:

commit 90ea285c1a0bc6437fe51a493ed72786c7f9fd48
Author: Mark Pizzolato <mark@infocomm.com>
Date:   Sun Dec 6 11:15:11 2015 -0800

    VAX: Generalized idle checks for all branch to self cases and fixed logic for 32V idle

The previous commit works:

MicroVAX 3900 simulator V4.0-0 Beta        git commit id: b942bac4
sim> att rq0 vaxcd210.iso
sim> b
Loading boot code from internal ka655x.bin

KA655-B V5.3, VMB 2.7
Performing normal system tests.
40..39..38..37..36..35..34..33..32..31..30..29..28..27..26..25..
24..23..22..21..20..19..18..17..16..15..14..13..12..11..10..09..
08..07..06..05..04..03..
Tests completed.
>>>b dua0
(BOOT/R5:0 DUA0

  2..
-DUA0
  1..0..

>> NetBSD/vax boot [1.11 Tue Oct 25 01:22:31 UTC 2005] <<
>> Press any key to abort autoboot 5
getdisklabel: no disk label
nfs_open: must mount first.
2490992+155176=0x286284
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 2.1 (INSTALL) #0: Tue Oct 25 01:38:26 UTC 2005
        jmc@faith.netbsd.org:/home/builds/ab/netbsd-2-1-RELEASE/vax/200510241747Z-obj/home/builds/ab/netbsd-2-1-RELEASE/src/sys/arch/vax/compile/INSTALL

MicroVAX 3800/3900
cpu: KA655, CVAX microcode rev 6 Firmware rev 83
total memory = 16328 KB
avail memory = 12860 KB
mainbus0 (root)
ibus0 at mainbus0
uba0 at ibus0: Q22
dz1 at uba0 csr 160100 vec 304 ipl 17
mtc0 at uba0 csr 174500 vec 774 ipl 17
mscpbus0 at mtc0: version 5 model 3
mscpbus0: DMA burst size set to 4
mt0 at mscpbus0 drive 0: TK50
mt1 at mscpbus0 drive 1: TK50
mt2 at mscpbus0 drive 2: TK50                                 
...

PS: Also fails using the vax780 and vax8600 simulators.

markpizz commented 8 years ago

Thanks for tracking down the commit which introduced the problem.

Meanwhile, in order for me to fix this, I'll need to reproduce it.

Where did you pick up these ancient versions of NetBSD?

jguillaumes commented 8 years ago

Oh, sorry for forgetting that. You can pull it from the official NetBSD ftp site:

ftp://ftp.netbsd.org/pub/NetBSD-archive/iso/2.1/vaxcd.iso

markpizz commented 8 years ago

Please give the latest code a try and close the issue if you're happy.

jguillaumes commented 8 years ago

It works now. Thanks!