svn commit: r205557 - head/sys/dev/fb
Jung-uk Kim
jkim at FreeBSD.org
Tue Mar 23 22:35:52 UTC 2010
Author: jkim
Date: Tue Mar 23 22:35:52 2010
New Revision: 205557
URL: http://svn.freebsd.org/changeset/base/205557
Log:
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.
Modified:
head/sys/dev/fb/vesa.c
Modified: head/sys/dev/fb/vesa.c
==============================================================================
--- head/sys/dev/fb/vesa.c Tue Mar 23 22:24:02 2010 (r205556)
+++ head/sys/dev/fb/vesa.c Tue Mar 23 22:35:52 2010 (r205557)
@@ -1209,7 +1209,7 @@ vesa_set_mode(video_adapter_t *adp, int
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
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
#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;
More information about the svn-src-head
mailing list