diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2007-07-01 12:53:53 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2007-07-01 12:53:53 +0000 |
commit | bc960728434adb6759ade32e4a169e30055a6fa8 (patch) | |
tree | 17911340afdbd23d209fde6811f71b8469cb386d /sys/arch/hppa | |
parent | 9cf6dbd0db8dd1f46ec0aed430e13c7478fd166d (diff) |
Reset PDC devices before enabling iova space if we're not on a serial console.
Makes glass console on four-digit B/C/J-class systems work.
Diffstat (limited to 'sys/arch/hppa')
-rw-r--r-- | sys/arch/hppa/dev/astro.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/arch/hppa/dev/astro.c b/sys/arch/hppa/dev/astro.c index 6dac5e0fca7..d87a63a4b0e 100644 --- a/sys/arch/hppa/dev/astro.c +++ b/sys/arch/hppa/dev/astro.c @@ -1,4 +1,4 @@ -/* $OpenBSD: astro.c,v 1.6 2007/07/01 11:13:41 kettenis Exp $ */ +/* $OpenBSD: astro.c,v 1.7 2007/07/01 12:53:52 kettenis Exp $ */ /* * Copyright (c) 2007 Mark Kettenis @@ -292,6 +292,18 @@ astro_attach(struct device *parent, struct device *self, void *aux) pmap_update(pmap_kernel()); memset(sc->sc_pdir, 0, size); + /* + * The PDC might have set up some devices to do DMA. It will do + * this for the onboard USB controller if an USB keyboard is used + * for console input. In that case, bad things will happen if we + * enable iova space. So reset the PDC devices before we do that. + * Don't do this if we're using a serial console though, since it + * will stop working if we do. This is fine since the serial port + * doesn't do DMA. + */ + if (PAGE0->mem_cons.pz_class != PCL_DUPLEX) + pdc_call((iodcio_t)pdc, 0, PDC_IO, PDC_IO_RESET_DEVICES); + /* Enable iova space. */ r->tlb_ibase = htole32(1); |