summaryrefslogtreecommitdiff
path: root/sys/dev/vt
diff options
context:
space:
mode:
authorMarcel Moolenaar <marcel@FreeBSD.org>2015-08-13 14:43:11 +0000
committerMarcel Moolenaar <marcel@FreeBSD.org>2015-08-13 14:43:11 +0000
commit6280434f9a0d487967001ccee98a01f0ad7cc942 (patch)
tree0c8624e9878ca975a58f96a5fd9ffdf77cb792b7 /sys/dev/vt
parentf3bfa7d1cf89cd759be30f734e8f2287102646b2 (diff)
Notes
Diffstat (limited to 'sys/dev/vt')
-rw-r--r--sys/dev/vt/hw/vga/vt_vga.c10
-rw-r--r--sys/dev/vt/hw/vga/vt_vga_reg.h2
2 files changed, 8 insertions, 4 deletions
diff --git a/sys/dev/vt/hw/vga/vt_vga.c b/sys/dev/vt/hw/vga/vt_vga.c
index 0b7ebe40bdbd..4661f357a3bb 100644
--- a/sys/dev/vt/hw/vga/vt_vga.c
+++ b/sys/dev/vt/hw/vga/vt_vga.c
@@ -883,9 +883,9 @@ vga_bitblt_text_txtmode(struct vt_device *vd, const struct vt_window *vw,
/* Convert colors to VGA attributes. */
attr = bg << 4 | fg;
- MEM_WRITE1(sc, 0x18000 + (row * 80 + col) * 2 + 0,
+ MEM_WRITE1(sc, (row * 80 + col) * 2 + 0,
ch);
- MEM_WRITE1(sc, 0x18000 + (row * 80 + col) * 2 + 1,
+ MEM_WRITE1(sc, (row * 80 + col) * 2 + 1,
attr);
}
}
@@ -1226,8 +1226,6 @@ vga_init(struct vt_device *vd)
# error "Architecture not yet supported!"
#endif
- bus_space_map(sc->vga_fb_tag, VGA_MEM_BASE, VGA_MEM_SIZE, 0,
- &sc->vga_fb_handle);
bus_space_map(sc->vga_reg_tag, VGA_REG_BASE, VGA_REG_SIZE, 0,
&sc->vga_reg_handle);
@@ -1236,9 +1234,13 @@ vga_init(struct vt_device *vd)
vd->vd_flags |= VDF_TEXTMODE;
vd->vd_width = 80;
vd->vd_height = 25;
+ bus_space_map(sc->vga_fb_tag, VGA_TXT_BASE, VGA_TXT_SIZE, 0,
+ &sc->vga_fb_handle);
} else {
vd->vd_width = VT_VGA_WIDTH;
vd->vd_height = VT_VGA_HEIGHT;
+ bus_space_map(sc->vga_fb_tag, VGA_MEM_BASE, VGA_MEM_SIZE, 0,
+ &sc->vga_fb_handle);
}
if (vga_initialize(vd, textmode) != 0)
return (CN_DEAD);
diff --git a/sys/dev/vt/hw/vga/vt_vga_reg.h b/sys/dev/vt/hw/vga/vt_vga_reg.h
index 5bfb8ce585da..cf33a37e555b 100644
--- a/sys/dev/vt/hw/vga/vt_vga_reg.h
+++ b/sys/dev/vt/hw/vga/vt_vga_reg.h
@@ -49,6 +49,8 @@
#define VGA_MEM_BASE 0xA0000
#define VGA_MEM_SIZE 0x10000
+#define VGA_TXT_BASE 0xB8000
+#define VGA_TXT_SIZE 0x08000
#define VGA_REG_BASE 0x3c0
#define VGA_REG_SIZE 0x10+0x0c