Port-hp300 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: HP 9000-382 based instrument panics on cnopen()



> Next up is to figure out the internal video somehow.
> What kinds of steps should I take for that? It's undoubtedly
> DIO-attached, but whether it has a select code or just an address
> space, I don't know. Is there instrumentation I should enable or
> a printf() that I can add into the DIO scanning?

In src/sys/arch/hp300/dev/topcat.c:
 https://nxr.netbsd.org/xref/src/sys/arch/hp300/dev/topcat.c?r=1.5

- topcat_intio_match() checks (struct diofbreg *) at FB_BASE
 https://nxr.netbsd.org/xref/src/sys/arch/hp300/dev/topcat.c?r=1.5#166
- topcat_dio_match() checks DIO IDs
 https://nxr.netbsd.org/xref/src/sys/arch/hp300/dev/topcat.c?r=1.5#217
- topcatcnattach() checks checks (struct diofbreg *) at FB_BASE or
  PA of the DIO devices
 https://nxr.netbsd.org/xref/src/sys/arch/hp300/dev/topcat.c?r=1.5#537
 https://nxr.netbsd.org/xref/src/sys/arch/hp300/hp300/autoconf.c?r=1.110#896
- your dmesg has the following "unconfigured" DIO devices:
>> [   1.0000000] 98622A at dio0 scode 16 ipl 4 not configured
>> [   1.0000000] 98622A at dio0 scode 17 ipl 6 not configured

So one possibility is either of the above 98622A (DIO ID == 3)
devices could actually be a topcat framebuffer, i.e. topcatcnattach()
can recognize it but topcat_dio_match() doesn't.

Could you try the following patch that checks diofbreg even on DIO ones?
(compile test only)

Index: dev/topcat.c
===================================================================
RCS file: /cvsroot/src/sys/arch/hp300/dev/topcat.c,v
retrieving revision 1.5
diff -u -p -d -r1.5 topcat.c
--- dev/topcat.c	15 Apr 2021 14:43:19 -0000	1.5
+++ dev/topcat.c	5 Oct 2021 14:21:33 -0000
@@ -232,6 +232,28 @@ topcat_dio_match(device_t parent, cfdata
 		}
 	}
 
+	/*
+	 * Some HP 9000/382 based instrument has weird DIO framebuffer.
+	 */
+	if (da->da_id == DIO_DEVICE_ID_MISC0) {
+		bus_space_handle_t bsh;
+		void *va;
+		struct diofbreg *fbr;
+		int rv = 0;
+
+		if (bus_space_map(da->da_bst, da->da_addr, PAGE_SIZE,
+		    0, &bsh))
+			return 0;
+		va = bus_space_vaddr(da->da_bst, bsh);
+		fbr = va;
+
+		if (fbr->id == GRFHWID && fbr->fbid == GID_TOPCAT)
+			rv = 1;
+
+		bus_space_unmap(da->da_bst, da->da_addr, PAGE_SIZE);
+		return rv;
+	}
+
 	return 0;
 }
 

Thanks,
---
Izumi Tsutsui


Home | Main Index | Thread Index | Old Index