PERFORCE change 76050 for review
Marcel Moolenaar
marcel at FreeBSD.org
Tue Apr 26 22:31:29 PDT 2005
http://perforce.freebsd.org/chv.cgi?CH=76050
Change 76050 by marcel at marcel_nfs on 2005/04/27 05:30:27
Check if the bridge forwards VGA addresses before allowing
a device to allocate VGA specific addresses.
Affected files ...
.. //depot/projects/tty/sys/dev/pci/pci_pci.c#9 edit
Differences ...
==== //depot/projects/tty/sys/dev/pci/pci_pci.c#9 (text+ko) ====
@@ -331,9 +331,12 @@
break;
ok = (start >= sc->iobase && end <= sc->iolimit);
- /* Make sure we allow access to VGA ports. */
- if (!ok)
- ok = is_vga_resource(type, start, end);
+ /*
+ * Make sure we allow access to VGA I/O addresses when the
+ * bridge has the "VGA Enable" bit set.
+ */
+ if (!ok && is_vga_resource(type, start, end))
+ ok = (sc->bridgectl & PCIB_BCR_VGA_ENABLE) ? 1 : 0;
if ((sc->flags & PCIB_SUBTRACTIVE) == 0) {
if (!ok) {
@@ -380,9 +383,12 @@
if (pcib_is_prefetch_open(sc))
ok = ok || (start >= sc->pmembase && end <= sc->pmemlimit);
- /* Make sure we allow access to VGA memory. */
- if (!ok)
- ok = is_vga_resource(type, start, end);
+ /*
+ * Make sure we allow access to VGA memory addresses when the
+ * bridge has the "VGA Enable" bit set.
+ */
+ if (!ok && is_vga_resource(type, start, end))
+ ok = (sc->bridgectl & PCIB_BCR_VGA_ENABLE) ? 1 : 0;
if ((sc->flags & PCIB_SUBTRACTIVE) == 0) {
if (!ok) {
More information about the p4-projects
mailing list