Module Name: src
Committed By: ad
Date: Sun Dec 1 14:18:51 UTC 2019
Modified Files:
src/sys/dev/ic: vga.c vga_raster.c
src/sys/dev/isa: pcdisplay.c
Log Message:
Map the video RAM cacheable/prefetchable, it's very slow and this helps a bit.
To generate a diff of this commit:
cvs rdiff -u -r1.116 -r1.117 src/sys/dev/ic/vga.c
cvs rdiff -u -r1.45 -r1.46 src/sys/dev/ic/vga_raster.c
cvs rdiff -u -r1.43 -r1.44 src/sys/dev/isa/pcdisplay.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/ic/vga.c
diff -u src/sys/dev/ic/vga.c:1.116 src/sys/dev/ic/vga.c:1.117
--- src/sys/dev/ic/vga.c:1.116 Sun Nov 10 21:16:35 2019
+++ src/sys/dev/ic/vga.c Sun Dec 1 14:18:51 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: vga.c,v 1.116 2019/11/10 21:16:35 chs Exp $ */
+/* $NetBSD: vga.c,v 1.117 2019/12/01 14:18:51 ad Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vga.c,v 1.116 2019/11/10 21:16:35 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vga.c,v 1.117 2019/12/01 14:18:51 ad Exp $");
#include "opt_vga.h"
/* for WSCONS_SUPPORT_PCVTFONTS */
@@ -544,7 +544,9 @@ vga_init(struct vga_config *vc, bus_spac
&vh->vh_ioh_6845))
panic("vga_init: couldn't map 6845 io");
- if (bus_space_map(vh->vh_memt, 0xa0000, 0x20000, 0, &vh->vh_allmemh))
+ if (bus_space_map(vh->vh_memt, 0xa0000, 0x20000,
+ BUS_SPACE_MAP_CACHEABLE | BUS_SPACE_MAP_PREFETCHABLE,
+ &vh->vh_allmemh))
panic("vga_init: couldn't map memory");
if (bus_space_subregion(vh->vh_memt, vh->vh_allmemh,
Index: src/sys/dev/ic/vga_raster.c
diff -u src/sys/dev/ic/vga_raster.c:1.45 src/sys/dev/ic/vga_raster.c:1.46
--- src/sys/dev/ic/vga_raster.c:1.45 Sun Nov 10 21:16:35 2019
+++ src/sys/dev/ic/vga_raster.c Sun Dec 1 14:18:51 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: vga_raster.c,v 1.45 2019/11/10 21:16:35 chs Exp $ */
+/* $NetBSD: vga_raster.c,v 1.46 2019/12/01 14:18:51 ad Exp $ */
/*
* Copyright (c) 2001, 2002 Bang Jun-Young
@@ -56,7 +56,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vga_raster.c,v 1.45 2019/11/10 21:16:35 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vga_raster.c,v 1.46 2019/12/01 14:18:51 ad Exp $");
#include "opt_vga.h"
#include "opt_wsmsgattrs.h" /* for WSDISPLAY_CUSTOM_OUTPUT */
@@ -395,8 +395,10 @@ vga_raster_init(struct vga_config *vc, b
&vh->vh_ioh_6845))
panic("vga_raster_init: couldn't map 6845 io");
- if (bus_space_map(vh->vh_memt, 0xa0000, 0x20000, 0, &vh->vh_allmemh))
- panic("vga_raster_init: couldn't map memory");
+ if (bus_space_map(vh->vh_memt, 0xa0000, 0x20000,
+ BUS_SPACE_MAP_CACHEABLE | BUS_SPACE_MAP_PREFETCHABLE,
+ &vh->vh_allmemh))
+ panic("vga_init: couldn't map memory");
if (bus_space_subregion(vh->vh_memt, vh->vh_allmemh, 0, 0x10000,
&vh->vh_memh))
Index: src/sys/dev/isa/pcdisplay.c
diff -u src/sys/dev/isa/pcdisplay.c:1.43 src/sys/dev/isa/pcdisplay.c:1.44
--- src/sys/dev/isa/pcdisplay.c:1.43 Sat Apr 21 15:10:28 2018
+++ src/sys/dev/isa/pcdisplay.c Sun Dec 1 14:18:51 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: pcdisplay.c,v 1.43 2018/04/21 15:10:28 mlelstv Exp $ */
+/* $NetBSD: pcdisplay.c,v 1.44 2019/12/01 14:18:51 ad Exp $ */
/*
* Copyright (c) 1998
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pcdisplay.c,v 1.43 2018/04/21 15:10:28 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pcdisplay.c,v 1.44 2019/12/01 14:18:51 ad Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -190,7 +190,8 @@ pcdisplay_init(struct pcdisplay_config *
dc->mono = mono;
if (bus_space_map(memt, mono ? 0xb0000 : 0xb8000, 0x8000,
- 0, &ph->ph_memh))
+ BUS_SPACE_MAP_CACHEABLE | BUS_SPACE_MAP_PREFETCHABLE,
+ &ph->ph_memh))
panic("pcdisplay_init: cannot map memory");
if (bus_space_map(iot, mono ? 0x3b0 : 0x3d0, 0x10,
0, &ph->ph_ioh_6845))