summaryrefslogtreecommitdiffstats
path: root/sys/dev/fb
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2010-03-23 22:35:52 +0000
committerjkim <jkim@FreeBSD.org>2010-03-23 22:35:52 +0000
commit8459b985d8daa2877a2781d96a387e459ec005a8 (patch)
treec5ae23acb167cd6737122920db3994aaf4b42a0e /sys/dev/fb
parent3a9a11a6bdaa096babff3bcdf41e8cbf8c229498 (diff)
downloadFreeBSD-src-8459b985d8daa2877a2781d96a387e459ec005a8.zip
FreeBSD-src-8459b985d8daa2877a2781d96a387e459ec005a8.tar.gz
Map entire video memory again. This is a partial backout of r203535.
Although we do not use them all directly, it seems VGA render may access unmapped memory region and cause kernel panic.
Diffstat (limited to 'sys/dev/fb')
-rw-r--r--sys/dev/fb/vesa.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/fb/vesa.c b/sys/dev/fb/vesa.c
index 2602440..2b11f78 100644
--- a/sys/dev/fb/vesa.c
+++ b/sys/dev/fb/vesa.c
@@ -1209,7 +1209,7 @@ vesa_set_mode(video_adapter_t *adp, int mode)
int10_set_mode(adp->va_initial_bios_mode);
if (adp->va_info.vi_flags & V_INFO_LINEAR)
pmap_unmapdev(adp->va_buffer,
- adp->va_buffer_size);
+ vesa_adp_info->v_memsize * 64 * 1024);
/*
* Once (*prevvidsw->get_info)() succeeded,
* (*prevvidsw->set_mode)() below won't fail...
@@ -1246,7 +1246,8 @@ vesa_set_mode(video_adapter_t *adp, int mode)
adp->va_flags |= V_ADP_DAC8;
if (adp->va_info.vi_flags & V_INFO_LINEAR)
- pmap_unmapdev(adp->va_buffer, adp->va_buffer_size);
+ pmap_unmapdev(adp->va_buffer,
+ vesa_adp_info->v_memsize * 64 * 1024);
#if VESA_DEBUG > 0
printf("VESA: mode set!\n");
@@ -1263,7 +1264,7 @@ vesa_set_mode(video_adapter_t *adp, int mode)
#endif
vesa_adp->va_buffer =
(vm_offset_t)pmap_mapdev_attr(info.vi_buffer,
- info.vi_buffer_size, PAT_WRITE_COMBINING);
+ vesa_adp_info->v_memsize * 64 * 1024, PAT_WRITE_COMBINING);
vesa_adp->va_window = vesa_adp->va_buffer;
vesa_adp->va_window_size = info.vi_buffer_size / info.vi_planes;
vesa_adp->va_window_gran = info.vi_buffer_size / info.vi_planes;
OpenPOWER on IntegriCloud