summaryrefslogtreecommitdiff
path: root/sys/dev/pci/vga_pci.c
diff options
context:
space:
mode:
authorPaul Irofti <pirofti@cvs.openbsd.org>2009-06-06 00:35:01 +0000
committerPaul Irofti <pirofti@cvs.openbsd.org>2009-06-06 00:35:01 +0000
commitae8d51383026ad58c6f4a80c429d1ea6baeef3f2 (patch)
tree30925450336d18c4ea9ec48e94ea312a02616b1b /sys/dev/pci/vga_pci.c
parent0beb67fb1755f6972960b884f8640f623226401c (diff)
Add vga bios repost support. Fetched from the NetBSD tree mostly.
Tested on multiple i386 and it works, amd64 works also with a few exceptions that will get fixed. The initial effort of importing was done by oga@, thanks! Lots of testing and debugging by mlarkin@ and me. Okay deraadt@, oga@, mlarkin@.
Diffstat (limited to 'sys/dev/pci/vga_pci.c')
-rw-r--r--sys/dev/pci/vga_pci.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/dev/pci/vga_pci.c b/sys/dev/pci/vga_pci.c
index 9016c46f7ad..7c34674d7fa 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.42 2009/06/03 23:33:01 miod Exp $ */
+/* $OpenBSD: vga_pci.c,v 1.43 2009/06/06 00:35:00 pirofti Exp $ */
/* $NetBSD: vga_pci.c,v 1.3 1998/06/08 06:55:58 thorpej Exp $ */
/*
@@ -91,6 +91,10 @@
#include <dev/wscons/wsconsio.h>
#include <dev/wscons/wsdisplayvar.h>
+#ifdef VGA_POST
+#include <machine/vga_post.h>
+#endif
+
#ifdef VESAFB
#include <dev/vesa/vesabiosvar.h>
#endif
@@ -187,6 +191,12 @@ vga_pci_attach(struct device *parent, struct device *self, void *aux)
vga_pci_bar_init(sc, pa);
+#ifdef VGA_POST
+ if ((sc->sc_posth = vga_post_init(pa->pa_bus, pa->pa_device,
+ pa->pa_function)) == NULL)
+ printf("couldn't set up vga POST handler\n");
+#endif
+
#if NINTAGP > 0
/*
* attach intagp here instead of pchb so it can share mappings