Re: VAXstation 3100/30 KA420 SCSI DMA problem on netboot (and fix)

Izumi Tsutsui <[email protected]>
Newsgroups gmane.os.netbsd.ports.vax
Message-ID <[email protected]>
kwellsch@ wrote:

> >>> boot DKA500
 :
> [   1.0000000] VAXstation 3100/m76
> 
>       ...
> 
> [   1.0000000] si0 at vsbus0 csr 0x200c0080 vec 770 ipl 17 maskbit 1
> [   1.0000000] Dumping KA420_SCD region
> [   1.0000000] 0x200C00A0: 00 08 00 00 FF FF FF FF FF FF FF FF FF FF FF FF
> [   1.0000000] 0x200C00B0: 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF
> [   1.0000000] 0x200C00C0: 00 00 00 00 01 00 00 00 FF FF FF FF FF FF FF FF
> [   1.0000000] 0x200C00D0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
> [   1.0000000] 0x200C00E0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
> [   1.0000000] 0x200C00F0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
> [   1.0000000] si0: NCR5380, SCSI ID 6
> [   1.0000000] scsibus0 at si0: 8 targets, 8 luns per target

> >>> boot esa0
 :
> [   1.0000000] si0 at vsbus0 csr 0x200c0080 vec 770 ipl 17 maskbit 1
> [   1.0000000] Dumping KA420_SCD region
> [   1.0000000] 0x200C00A0: 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF
> [   1.0000000] 0x200C00B0: 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF
> [   1.0000000] 0x200C00C0: 00 00 00 00 00 00 00 00 FF FF FF FF FF FF FF FF
> [   1.0000000] 0x200C00D0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
> [   1.0000000] 0x200C00E0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
> [   1.0000000] 0x200C00F0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
> [   1.0000000] si0: NCR5380, SCSI ID 6
> [   1.0000000] scsibus0 at si0: 8 targets, 8 luns per target

Thanks for your reports.  Per these outputs we can assume:
 - no difference at 0x200C00B0 (unknown register)
 - no differnece at 0x200C00E0 (STC_MODE register)
 - 0x200C00A0 (SCD_DADR) and 0x200C00C4 (SCD_DDIR) may have leftover
   values on firmware's SCSI read ops on DKA0 boot

So maybe we don't have to explicitly write STC_MODE (or other registers)
for KA430 to enable "Big DMA" mode and avoid KA410 compatible DMA.

To confirm this, could you try "fsck after newfs" tests on
a SCSI disk drive on your m76?

If you don't have any empty partition, newfs against a swap partition
(/dev/sd0b) is also okay.

NetBSD/vax 10.0_RC4 GENERIC (that doesn't include "Big DMA" fix)
shows the following results on my KA420
(i.e. "ROOT INODE UNALLOCATED" error on netboot due to 16KB DMA):
---


>>> boot esa0


-ESA0
>> NetBSD/vax boot [1.12 (Tue Jan 16 08:28:51 UTC 2024)] <<
>> Press any key to abort autoboot 5
Press '?' for help
> boot -s
Trying BOOTP
Using IP address: 192.168.20.76
myip:  (192.168.20.76)
root addr=192.168.20.1 path=/r/export/NetBSD/vax/root
3557656+185792 [249504+235927]=0x408b20
 :
[   1.0000000] NetBSD 10.0_RC4 (GENERIC) #0: Tue Feb  6 12:38:53 UTC 2024
[   1.0000000] 	[email protected]:/usr/src/sys/arch/vax/compile/GENERIC
[   1.0000000] VAXstation 3100/m{30,40}
[   1.0000000] total memory = 32640 KB
[   1.0000000] avail memory = 27004 KB
 :
[   1.0000000] si0 at vsbus0 csr 0x200c0080 vec 770 ipl 17 maskbit 1
[   1.0000000] si0: NCR5380, SCSI ID 6
[   1.0000000] scsibus0 at si0: 8 targets, 8 luns per target
 :
[   3.8600050] sd0 at scsibus0 target 0 lun 0: <ATA, SanDisk SSD U100, 10.5> disk fixed
[   3.9300050] sd0: 15272 MB, 7757 cyl, 64 head, 63 sec, 512 bytes/sect x 31277232 sectors
[   3.9800050] sd0: async, 8-bit transfers
 :

Enter pathname of shell or RETURN for /bin/sh: 
We recommend that you create a non-root account and use su(1) for root access.
# newfs -I /dev/rsd0b
/dev/rsd0b: 128.3MB (262760 sectors) block size 8192, fragment size 1024
	using 4 cylinder groups of 32.08MB, 4106 blks, 8000 inodes.
super-block backups (for fsck_ffs -b #) at:
32,
65728,
131424,
197120,
cg 0: bad magic number
# fsck_ffs -fn /dev/rsd0b
** /dev/rsd0b (NO WRITE)
BAD SUPER BLOCK: VALUES IN SUPER BLOCK DISAGREE WITH THOSE IN FIRST ALTERNATE
** File system is already clean
** Last Mounted on 
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
ROOT INODE UNALLOCATED
ALLOCATE? no

# halt
halt: halted by root
[ 838.5800050] syncing disks... done
[ 838.6100050] unmounting file systems...
[ 839.1200050] unmounting done

?06 HLT INST
    PC = 80014807
>>> boot dka0


-DKA0
>> NetBSD/vax boot [1.12 (Tue Jan 16 08:28:51 UTC 2024)] <<
>> Press any key to abort autoboot 4
Press '?' for help
> boot le()netbsd -s
Trying BOOTP
Using IP address: 192.168.20.76
myip:  (192.168.20.76)
root addr=192.168.20.1 path=/r/export/NetBSD/vax/root
3557656+185792 [249504+235927]=0x408b20
 :
[   1.0000000] NetBSD 10.0_RC4 (GENERIC) #0: Tue Feb  6 12:38:53 UTC 2024
[   1.0000000] 	[email protected]:/usr/src/sys/arch/vax/compile/GENERIC
[   1.0000000] VAXstation 3100/m{30,40}
[   1.0000000] total memory = 32640 KB
[   1.0000000] avail memory = 27004 KB
 :
[   1.0000000] si0 at vsbus0 csr 0x200c0080 vec 770 ipl 17 maskbit 1
[   1.0000000] si0: NCR5380, SCSI ID 6
[   1.0000000] scsibus0 at si0: 8 targets, 8 luns per target
 :
[   3.8600050] sd0 at scsibus0 target 0 lun 0: <ATA, SanDisk SSD U100, 10.5> disk fixed
[   3.9300050] sd0: 15272 MB, 7757 cyl, 64 head, 63 sec, 512 bytes/sect x 31277232 sectors
[   3.9800050] sd0: async, 8-bit transfers
 :

Enter pathname of shell or RETURN for /bin/sh: 
We recommend that you create a non-root account and use su(1) for root access.
# newfs -I /dev/rsd0b
/dev/rsd0b: 128.3MB (262760 sectors) block size 8192, fragment size 1024
	using 4 cylinder groups of 32.08MB, 4106 blks, 8000 inodes.
super-block backups (for fsck_ffs -b #) at:
32,
65728,
131424,
197120,
# fsck_ffs -fn /dev/rsd0b
** /dev/rsd0b (NO WRITE)
** File system is already clean
** Last Mounted on 
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
1 files, 1 used, 127298 free (18 frags, 15910 blocks, 0.0% fragmentation)
# 

---
Izumi Tsutsui
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.