summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authordrochner <drochner@NetBSD.org>1998-06-12 18:41:01 +0000
committerdrochner <drochner@NetBSD.org>1998-06-12 18:41:01 +0000
commit96840772f5204fec86e8af3bc2bf077c9621f2f5 (patch)
tree4799298296d3654ee68569038ad390d5fb4e06de /sys/dev
parentad793db324228b541d1830931644272136b90130 (diff)
reserve the VGA BIOS area (but don't worry if it fails)
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/vga.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/dev/ic/vga.c b/sys/dev/ic/vga.c
index b9beb77624d..a6f81c69c30 100644
--- a/sys/dev/ic/vga.c
+++ b/sys/dev/ic/vga.c
@@ -1,4 +1,4 @@
-/* $NetBSD: vga.c,v 1.4 1998/05/28 16:48:40 drochner Exp $ */
+/* $NetBSD: vga.c,v 1.5 1998/06/12 18:41:01 drochner Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -67,6 +67,10 @@ struct vga_config {
int nscreens;
LIST_HEAD(, vgascreen) screens;
struct vgascreen *active; /* current display */
+
+ int vc_biosmapped;
+ bus_space_tag_t vc_biostag;
+ bus_space_handle_t vc_bioshdl;
};
static int vgaconsole, vga_console_type, vga_console_attached;
@@ -332,6 +336,14 @@ vga_init(vc, iot, memt)
&vh->vh_memh))
panic("vga_common_setup: mem subrange failed");
+ /* should only reserve the space (no need to map - save KVM) */
+ vc->vc_biostag = memt;
+ if (bus_space_map(vc->vc_biostag, 0xc0000, 0x8000, 0,
+ &vc->vc_bioshdl))
+ vc->vc_biosmapped = 0;
+ else
+ vc->vc_biosmapped = 1;
+
vc->nscreens = 0;
LIST_INIT(&vc->screens);
vc->active = NULL;