Subject: old netbsd on nvax
To: None <port-vax@netbsd.org>
From: Lord Isildur <mrfusion@uranium.vaxpower.org>
List: port-vax
Date: 10/19/2002 17:39:02
hello all,
so, for reasons of insanity (or something), i'm trying to get 1.3.2 
working on a 4000/600. This definitely seems like the machine i try to 
get all sorts of outdated unix running on (successfully did 4.3tahoe, 
mostly did 4.3reno, next one on the list is netbsd 1.3.2) 1.3.2 also has 
the distinction of being (one of) the last versions that the CMD qbus 
scsi cards work right under. All the 1.4's and up that ive tried will 
crash hard after talking to a CMD for more than a few seconds, not only 
on the nvax box but also on a ka650. So, to make the long story short, i 
have had all sorts of imaginable troubles! one might think that after 
doing the 4.3tahoe i would be more aware of the issues of making 
something work on a 4600. I went through the 1.3.2 sources, adding 
ka680/690 support where i saaw fit, using as reference both the 
1.5-somthing code and my 4.3t code that does work. As before, i started 
with ka650 code and made what seemed to be the relevant modifications. 
The stray interrupt issue that was by and large solved by borrowing the 
little rei trick from ultrix might or might not be part of my current 
problem, but the rei trick doesnt improve things this time. so, im 
wondering what it is that ive overlooked or blatantly violated! 
i do have the ka680 TM and the 690 addendum, and ive read through the 
most of it multiple times now. 
It _seems_ as if somehow it is not figuring out something important about 
the memory map. It also, as a possibly related thing, couldnt properly 
sort out the console, so i had to fudge it and force it on the gencons 
code.. it took a very frustrated night to figure out why all my printf's 
werent doing anything :-)

here is some output from booting it. i have added massive debugging 
output in a so far vain attempt to figure out whats wrong.. the 
bootblocks didnt work right out of the box either, it took a couple days 
of smacking them around to get them to boot the kernel. i wonder if some
bit of initialization or setup that is supposed to happen in the 
bootblocks is not being done? 

well, here goes. for reference, the system is a vax 4600 with 64MB of 
memory. (originally 192MB but i wondered if there was a 64M limit, so i 
pulled out the other 2 boards. it didnt fix anything)
While i just kept continuing until the final machine check at the end of 
this output, ive been trying to solve the first problem that shows up 
from ubascan. As far as i can tell the error hits right after the 
priority is lowered at the end of a successful use of badaddr (where by 
successful i mean it properly caught the machine check and figured out 
that the address was bad). It successfully pops the saved ipl and 
restores it, but seems to either barf as the result of an interrupt right 
after that, or else die in the next instruction, which is just a mov from 
r3 to r0. I'm suspecting that it's the result of the lowered priority and 
something that was ready to strike just does. 
(the halts from memerr were put in by me, to see what was causing them.. )

thanks in advance for any advice or pointers! 
happy hacking,
isildur

>>>b dua0
(BOOT/R5:0 DUA0)

  2..
-DUA0
  1..0..

gbdev

howto 0x0, bdev 0x11, booting...dvopn
command
command
command
command
command
command
cpunix
command
command
command
command
command
command
command
command
done. (32100+22260)
in boot
SCBB: 6000
A
KA680/690
back in boot
SCBB: 6000
still in boot
SCBB: 6000

>> NetBSD/vax boot [020929 02:33] <<
SCBB: 6000
: /netbsd
SCB: 6000
SCB: 6000
SCB: 6000
SCB: 6000

?06 HLT INST
        PC = 00101036
>>>c
SCB: 6000

?06 HLT INST
        PC = 00101046
>>>c
SCB: 6000
ok, at the end of the first chunk
ok, at the end of the second chunk
ok, at the end of the third chunk
opened
loadpcs done
548864+22528+51852 start 0x7b288

?06 HLT INST
        PC = 0010084F
>>>c

?06 HLT INST
        PC = 8007B339
>>>c

?06 HLT INST
        PC = 8007B340
>>>c

?06 HLT INST
        PC = 8007F0DF
>>>c
Copyright (c) 1996, 1997, 1998
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

vm_mem_init: start 3be800, end 3fd8000
vm_mem_init: v avail 807bf000, v end 91118000
vm_page_startup: start 80091a68,3be800 end 80091cf4,3fd8000
vm_page_startup: end is now 3fd8000
vm_page_startup: vm_page_count is e553
vm_page_startup: first_page 1a0d, last_page ff5f
vm_page_startup: first_phys_addr 683400, last_phys_addr 3fd7fff
vm_mem_init: start 683400, end 3fd8000
vm_mem_init: v avail 80a83c00, v end 91118000
vm_mem_init: start 683400, end 3fd8000
vm_mem_init: v avail 80a83c00, v end 91118000
kmem_init: start 80a83c00, end 91118000
vm_map_create: kmem_map 0, pmap 8008c468, min 80000000, max 91118000
kmem_init: start 80a83c00, end 91118000
map 8008c468:
        pmap 0, lock 400, header s 0 e 0
        nentries 262145, size -2147027097, ismain 0
        refct 0, reflck -2147483648, hint 91118000, sld 0
        entr 0, time 1
hdr 8083f024 start 80000000 end 91118000 next 8083f024
vm_map_create: kmem_map 0, pmap 8008c468, min 80a83c00, max 89483c00
vm_map_create: kmem_map 0, pmap 8008c468, min 89483c00, max 89883c00
mem_init
vm_map_create: kmem_map 0, pmap 8008c468, min 89887c00, max 89a87c00
kmem_init
disk_init
tty_init
config_init
NetBSD 1.3.2 (TEST) #49: Sat Oct 19 17:10:12 EDT 2002
    isildur@osgiliath:/usr/src/sys/arch/vax/compile/TEST

realmem = 66945024
vm_map_create: kmem_map 8083f18c, pmap 8008c468, min 89af4400, max 8ce04400
vm_map_create: kmem_map 8083f18c, pmap 8008c468, min 8ce04400, max 8d204400
vm_map_create: kmem_map 8083f18c, pmap 8008c468, min 8d204400, max 8d244400
vm_map_create: kmem_map 8083f18c, pmap 8008c468, min 8d244400, max 8d28f400
avail mem = 55887872
Using 3268 buffers containing 3346432 bytes of memory.
/sys/arch/vax/vax/autoconf.c:configure()
backplane0 (root)
cpu0 at backplane0: VAX 4600, microcode rev 2
uba0 at backplane0: Q22
vm_map_create: kmem_map 8083f18c, pmap 8008c468, min 8d28f400, max 8d290400
sc 898f0f00 . mini 8d28f400
qba_attach
uba_attach
uba_attach 1
vm_map_create: kmem_map 8083f18c, pmap 8008c468, min 8d290c00, max 8d292c00
mini is 8d290c00
mini is 8d290c00, iopagephys 20000000
uba_attach 2
uba_attach 3
uba_attach sc 898f0f00
ubascan 0
ubascan 0a
ubascan: iopage 8d290c00, cf_loc 800860d0
ubascan: cf 80086244, parent 898f0f00, match 0x898f1400
ubascan: ua.ua_addr 8d292540, sc 0x898f0f00
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
ubascan 0
ubascan 0a
ubascan: iopage 8d290c00, cf_loc 800860c8
ubascan: cf 80086260, parent 898f0f00, match 0x898f1400
ubascan: ua.ua_addr 8d292068, sc 0x898f0f00
ubascan 0b
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
ubascan 0c
ubascan 1
ubascan 2
uda0 at uba0 csr 172150 vec 774 ipl 17
mscpbus0 at uda0memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
: version 6 model 13
mscpbus0: DMA burst size set to 4
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
ra0 at mscpbus0 drive 0: RA90
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
ubascan 3
ubascan 0
ubascan 0a
ubascan: iopage 8d290c00, cf_loc 800860cc
ubascan: cf 8008627c, parent 898f0f00, match 0x898f3400
ubascan: ua.ua_addr 8d290cdc, sc 0x898f0f00
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
ubascan 0
ubascan 0a
ubascan: iopage 8d290c00, cf_loc 800860c4
ubascan: cf 80086298, parent 898f0f00, match 0x898f3400
ubascan: ua.ua_addr 8d292520, sc 0x898f0f00
ubascan 0b
ubascan 0c
ubascan 1
ubascan 2
qe0 at uba0 csr 174440 vec 770 ipl 17
qe0: delqa, hardware address 08:00:2b:0e:25:cc
ubascan 3
ubascan 0
ubascan 0a
ubascan: iopage 8d290c00, cf_loc 800860d4
ubascan: cf 800862b4, parent 898f0f00, match 0x898f3000
ubascan: ua.ua_addr 8d290d20, sc 0x898f0f00
ubascan 0b
ubascan 0c
ubascan 1
ubascan 2
dhu0 at uba0 csr 160440 vec 300 ipl 17
dhu0: rom(1) version 2 rom(0) version 2
ubascan 3
uba_attach 4
cpu_startup
boot device: ra0
root on ra0a dumps on ra0b
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
ra0memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
: size 2396969 sectors
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
TODR too small - CHECK AND RESET THE DATE.
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
vm_map_create: kmem_map 8083f18c, pmap 0, min 0, max 1b000
vm_map_create: kmem_map 8083f18c, pmap 0, min 0, max 800
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
memory err!

?06 HLT INST
        PC = 8007F199
>>>c
machine check
stray interrupt scb 0, vec 0x60
memory err!

?06 HLT INST
        PC = 8007F199
>>>