Port-alpha archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Possible fix for DEC 2000 / Jensen
Hi,
> First of all thanks for committing the patch and there is still hope that
> the Jensen will ever run NetBSD :)
> I have tried to boot the latest snapshot, but it still hangs at the same
> point.
Umm, bad news..
> Full log attached.
>
> [ 1.0000000] vga0 at isa0 port 0x3b0-0x3df iomem 0xa0000-0xbffff
> [ 1.0000000] wsdisplay0 at vga0 (kbdmux ignored)
> [ 1.0000000] fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
>
> As always I am ready to test anything as it is sitting below my desk.
I wonder when COM_REG_MCR is written on startup because
cominit() doesn't refer sc->sc_mcr on writing COM_REG_MCR
(because it's called from early cninit).
https://nxr.netbsd.org/xref/src/sys/dev/ic/com.c?r=1.359#2461
Could you try the following patch?
(if you need a pre-build kernel please let me know)
Index: sys/arch/alpha/jensenio/com_jensenio.c
===================================================================
RCS file: /cvsroot/src/sys/arch/alpha/jensenio/com_jensenio.c,v
retrieving revision 1.16
diff -u -p -d -r1.16 com_jensenio.c
--- sys/arch/alpha/jensenio/com_jensenio.c 19 Sep 2020 16:54:34 -0000 1.16
+++ sys/arch/alpha/jensenio/com_jensenio.c 22 Sep 2020 15:56:05 -0000
@@ -93,6 +93,7 @@ com_jensenio_attach(device_t parent, dev
struct com_jensenio_softc *jsc = device_private(self);
struct com_softc *sc = &jsc->sc_com;
struct jensenio_attach_args *ja = aux;
+ struct com_regs *regsp = &sc->sc_regs;
bus_space_handle_t ioh;
sc->sc_dev = self;
@@ -102,7 +103,7 @@ com_jensenio_attach(device_t parent, dev
aprint_error(": can't map i/o space\n");
return;
}
- com_init_regs(&sc->sc_regs, ja->ja_iot, ioh, ja->ja_ioaddr);
+ com_init_regs(regsp, ja->ja_iot, ioh, ja->ja_ioaddr);
sc->sc_frequency = COM_FREQ;
@@ -110,11 +111,13 @@ com_jensenio_attach(device_t parent, dev
* According to comments in Linux drivers/tty/serial/8250/8250.h,
* the driver has to set OUT1 and OUT2 lines for "some ALPHA"
* otherwise "the machine locks up with endless interrupts."
- * Note OUT2 (MCR_IENABLE) is set in MI com_attach_subr()
- * so we have to set OUT1 (MCR_DSR) in the MD attachment.
+ * Note OUT2 (MCR_IENABLE) is also set in MI com_attach_subr()
+ * but we have to set them before interrupts are enabled.
* See also PR/36628.
*/
- SET(sc->sc_mcr, MCR_DRS);
+ SET(sc->sc_mcr, MCR_DRS | MCR_IENABLE);
+ bus_space_write_1(regsp->cr_iot, regsp->cr_ioh,
+ regsp->cr_map[COM_REG_MCR], sc->sc_mcr);
com_attach_subr(sc);
Thanks,
---
Izumi Tsutsui
Home |
Main Index |
Thread Index |
Old Index