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]>
mcguire@ wrote:

> On 2/17/24 04:19, Anders Magnusson wrote:
> > About the /m76, no idea.  We leave it for now until someone with that 
> > hardware can test if it is needed.
> 
>    If anyone is stuck on this, I can try to dig out one of my M76 
> machines and get it running.  Let me know.

Ok, if you can try netboot (via mopd(8) etc.) on your M76,
 http://www.netbsd.org/docs/network/netboot/intro.vax.html
could you try to boot the following debug kernel to check a
region around KA420_STC_MODE?
(This diff is for -current but may work on netbsd-10)

---
Index: ncr.c
===================================================================
RCS file: /cvsroot/src/sys/arch/vax/vsa/ncr.c,v
retrieving revision 1.52
diff -u -p -d -r1.52 ncr.c
--- ncr.c	17 Feb 2024 17:41:43 -0000	1.52
+++ ncr.c	17 Feb 2024 18:07:40 -0000
@@ -185,6 +185,21 @@ si_vsbus_attach(device_t parent, device_
 /*	ncr_sc->sc_regt =  Unused on VAX */
 	ncr_sc->sc_regh = vax_map_physmem(va->va_paddr, 1);
 
+#if 1	/* Check regions KA420_SCD_D* and KA420_STC_MODE for DMA control */
+	{
+		int i;
+		volatile uint8_t *ncr_va = (uint8_t *)ncr_sc->sc_regh;
+
+		printf("\nDumping KA420_SCD region\n");
+		for (i = 0x20; i < 0x80; i++) {
+			if (i % 0x10 == 0)
+				printf("0x%08lX:", va->va_paddr + i);
+			printf(" %02X", ncr_va[i]);
+			if (i % 0x10 == 0xf && i != 0x7f)
+				printf("\n");
+		}
+	}
+#endif
 	/* Register offsets */
 	ncr_sc->sci_r0 = 0;
 	ncr_sc->sci_r1 = 4;
---

On my KA420, it shows on netboot (ESA0):
---
>>> boot esa0


-ESA0
>> NetBSD/vax boot [1.12 (Tue Jan 16 08:28:51 UTC 2024)] <<
>> Press any key to abort autoboot 0
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
open netbsd.vax: No such file or directory
> boot netbsd
3560596+184596 [250768+237395]=0x409c9c
[   1.0000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
[   1.0000000]     2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013,
[   1.0000000]     2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023,
[   1.0000000]     2024
[   1.0000000]     The NetBSD Foundation, Inc.  All rights reserved.
[   1.0000000] Copyright (c) 1982, 1986, 1989, 1991, 1993
[   1.0000000]     The Regents of the University of California.  All rights reserved.

[   1.0000000] NetBSD 10.99.10 (GENERIC) #28: Sun Feb 18 03:00:36 JST 2024
[   1.0000000] 	tsutsui@mirage:/s/cvs/src/sys/arch/vax/compile/GENERIC
[   1.0000000] VAXstation 3100/m{30,40}

(snip)

[   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: FF FF FF FF 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: 00 00 00 00 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

---

on SCSI (DKA0) boot
(note a valid bootloader needs to be installed on DKA0):
---
>>> boot dka0


-DKA0
>> NetBSD/vax boot [1.12 (Tue Jan 16 08:28:51 UTC 2024)] <<
>> Press any key to abort autoboot 5
Press '?' for help
> boot le()netbsd
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
3560596+184596 [250768+237395]=0x409c9c
[   1.0000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
[   1.0000000]     2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013,
[   1.0000000]     2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023,
[   1.0000000]     2024
[   1.0000000]     The NetBSD Foundation, Inc.  All rights reserved.
[   1.0000000] Copyright (c) 1982, 1986, 1989, 1991, 1993
[   1.0000000]     The Regents of the University of California.  All rights reserved.

[   1.0000000] NetBSD 10.99.10 (GENERIC) #28: Sun Feb 18 03:00:36 JST 2024
[   1.0000000] 	tsutsui@mirage:/s/cvs/src/sys/arch/vax/compile/GENERIC
[   1.0000000] VAXstation 3100/m{30,40}

(snip)

[   1.0000000] si0 at vsbus0 csr 0x200c0080 vec 770 ipl 17 maskbit 1
[   1.0000000] Dumping KA420_SCD region
[   1.0000000] 0x200C00A0: 00 20 00 00 FF FF FF FF FF FF FF FF FF FF FF FF
[   1.0000000] 0x200C00B0: FF FF FF FF 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: 01 00 00 00 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

---

I'd like to see what value is shown at KA420_STC_MODE (0x200C00E0)
on KA430:

>> [   1.0000000] 0x200C00E0: 01 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF

- if it's FF FF FF FF, it implies no valid register there on KA430
- if it's 01 00 00 00, the "Big DMA" might be enabled as KA420
- if it's 00 00 00 00, the "Big DMA" might be disabled as KA420
- if it's another value, maybe there is a different register from KA420

Thanks,
---
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.