Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/i386/isa Reserve the I/O ports used by the CRT cont...



details:   https://anonhg.NetBSD.org/src/rev/0bd4f96896c3
branches:  trunk
changeset: 543196:0bd4f96896c3
user:      gson <gson%NetBSD.org@localhost>
date:      Wed Feb 19 04:07:56 2003 +0000

description:
Reserve the I/O ports used by the CRT controller to keep them from
being allocated for other purposes such as PCMCIA I/O space.  Fixes
port-i386/5177.

diffstat:

 sys/arch/i386/isa/pccons.c |  18 +++++++++++++++---
 1 files changed, 15 insertions(+), 3 deletions(-)

diffs (54 lines):

diff -r 2b982a5b3c29 -r 0bd4f96896c3 sys/arch/i386/isa/pccons.c
--- a/sys/arch/i386/isa/pccons.c        Wed Feb 19 02:09:46 2003 +0000
+++ b/sys/arch/i386/isa/pccons.c        Wed Feb 19 04:07:56 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pccons.c,v 1.160 2003/01/19 16:35:55 thorpej Exp $     */
+/*     $NetBSD: pccons.c,v 1.161 2003/02/19 04:07:56 gson Exp $        */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -83,7 +83,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pccons.c,v 1.160 2003/01/19 16:35:55 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pccons.c,v 1.161 2003/02/19 04:07:56 gson Exp $");
 
 #include "opt_ddb.h"
 #include "opt_xserver.h"
@@ -107,8 +107,8 @@
 #include <dev/cons.h>
 
 #include "pc.h"
+#include <machine/bus.h>
 #if (NPCCONSKBD > 0)
-#include <machine/bus.h>
 #include <dev/ic/pckbcvar.h>
 #else
 /* consistency check: plain pccons can't coexist with pckbc */
@@ -757,6 +757,7 @@
 #if (NPCCONSKBD == 0)
        struct isa_attach_args *ia = aux;
 #endif
+       bus_space_handle_t ioh;
 
        if (crtat == 0)
                pcinit();
@@ -771,6 +772,17 @@
            IST_EDGE, IPL_TTY, pcintr, sc);
 
        /*
+        * Reserve CRTC I/O ports to keep other devices such as PCMCIA
+        * from using them.
+        */
+       if (bus_space_map(ia->ia_iot, addr_6845, 0x2, 0, &ioh))
+               printf("pc: mapping of CRTC registers failed\n");
+
+       if (vs.color)
+               if (bus_space_map(ia->ia_iot, 0x3C0, 0x10, 0, &ioh))
+                       printf("pc: mapping of VGA registers failed\n");
+
+       /*
         * Look for children of the keyboard controller.
         * XXX Really should decouple keyboard controller
         * from the console code.



Home | Main Index | Thread Index | Old Index