diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2003-10-31 04:10:06 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2003-10-31 04:10:06 +0000 |
commit | 1c773e53a8cbd2fdfb460b15cf12f001ed981b59 (patch) | |
tree | 8bfce2939e1aa76a1b090616cf7dac2b1cb14ecc | |
parent | e0b7d7330aa098483a3edf29c54691aa6730395b (diff) |
Work around a problem where the vga code expects to be able to map isa
io/memory space using PCI io/mem descriptors.
-rw-r--r-- | sys/dev/pci/vga_pci.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/sys/dev/pci/vga_pci.c b/sys/dev/pci/vga_pci.c index 5e37a8ad7b1..ed352c5355a 100644 --- a/sys/dev/pci/vga_pci.c +++ b/sys/dev/pci/vga_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vga_pci.c,v 1.14 2002/07/15 13:23:48 mickey Exp $ */ +/* $OpenBSD: vga_pci.c,v 1.15 2003/10/31 04:10:05 drahn Exp $ */ /* $NetBSD: vga_pci.c,v 1.3 1998/06/08 06:55:58 thorpej Exp $ */ /*- @@ -176,8 +176,13 @@ vga_pci_match(parent, match, aux) /* * If we might match, make sure that the card actually looks OK. */ +#ifdef ISA_SPACE_NOT_ACCESSABLE_WITH_PCI_IOT + if (!vga_common_probe(MD_ISA_IOT, MD_ISA_MEMT)) + return (0); +#else if (!vga_common_probe(pa->pa_iot, pa->pa_memt)) return (0); +#endif return (1); } @@ -187,7 +192,9 @@ vga_pci_attach(parent, self, aux) struct device *parent, *self; void *aux; { +#ifndef ISA_SPACE_NOT_ACCESSABLE_WITH_PCI_IOT struct pci_attach_args *pa = aux; +#endif #ifdef PCIAGP struct vga_pci_softc *sc = (struct vga_pci_softc *)self; const struct agp_product *ap; @@ -252,8 +259,13 @@ vga_pci_attach(parent, self, aux) } #endif printf("\n"); +#ifdef ISA_SPACE_NOT_ACCESSABLE_WITH_PCI_IOT + vga_extended_attach(self, MD_ISA_IOT, ppc_isa_membus_space, + WSDISPLAY_TYPE_PCIVGA, vga_pci_mmap); +#else vga_common_attach(self, pa->pa_iot, pa->pa_memt, WSDISPLAY_TYPE_PCIVGA); +#endif } paddr_t @@ -273,6 +285,10 @@ vga_pci_mmap(void *v, off_t off, int prot) #endif } #endif +#ifdef __pegasos__ + /* XXX */ + return off; +#endif return -1; } |