[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-ia64-devel] [PATCH 2/2] ioemu: initialize vram area to 0xff
commit 508db40e2c8714a43016a77b7bc32a5fe15577a9 Author: Isaku Yamahata <yamahata@xxxxxxxxxxxxx> Date: Thu Jan 15 21:23:12 2009 +0900 vga: initialize vram area to 0xff Initialize vram memory in xen_vga_populate_vram(). and some fixes. Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx> diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c index f2ec05b..e1a416b 100644 --- a/hw/cirrus_vga.c +++ b/hw/cirrus_vga.c @@ -3167,8 +3167,9 @@ static int cirrus_vga_load(QEMUFile *f, void *opaque, int version_id) * ourselves */ s->vram_gmfn = vga_acc ? s->lfb_addr : VRAM_RESERVED_ADDRESS; xen_vga_populate_vram(s->vram_gmfn, s->vram_size); + } else { + xen_vga_vram_map(s->vram_gmfn, s->vram_size); } - xen_vga_vram_map(s->vram_gmfn, s->vram_size); if (version_id < 3 || (!vga_acc && !t)) qemu_get_buffer(f, s->vram_ptr, s->vram_size); diff --git a/hw/vga.c b/hw/vga.c index 2ae6e85..4c3b57e 100644 --- a/hw/vga.c +++ b/hw/vga.c @@ -2251,7 +2251,6 @@ static int vga_load(QEMUFile *f, void *opaque, int version_id) /* Old guest, VRAM is not mapped, we have to restore it ourselves */ if (!s->vram_gmfn) { xen_vga_populate_vram(VRAM_RESERVED_ADDRESS, s->vram_size); - xen_vga_vram_map(VRAM_RESERVED_ADDRESS, s->vram_size); s->vram_gmfn = VRAM_RESERVED_ADDRESS; qemu_get_buffer(f, s->vram_ptr, s->vram_size); } @@ -2447,6 +2446,12 @@ void xen_vga_populate_vram(uint64_t vram_addr, uint32_t vga_ram_size) exit(1); } free(pfn_list); + + xen_vga_vram_map(vram_addr, vga_ram_size); + + /* Win2K seems to assume that the pattern buffer is at 0xff + initially ! */ + memset(xen_vga_state->vram_ptr, 0xff, vga_ram_size); } /* Mapping the video memory from GPFN space */ @@ -2482,6 +2487,10 @@ void xen_vga_vram_map(uint64_t vram_addr, uint32_t vga_ram_size) #ifdef CONFIG_STUBDOM xenfb_pv_display_start(vram); #endif + /* If some display is already working, we need to update it now */ + ds= xen_vga_state->ds; + if (ds) + dpy_update(ds, 0,0, ds->width,ds->height); } /* when used on xen environment, the vga_ram_base is not used */ @@ -2526,7 +2535,6 @@ void vga_common_init(VGAState *s, DisplayState *ds, uint8_t *vga_ram_base, if (!restore) { xen_vga_populate_vram(VRAM_RESERVED_ADDRESS, s->vram_size); - xen_vga_vram_map(VRAM_RESERVED_ADDRESS, s->vram_size); s->vram_gmfn = VRAM_RESERVED_ADDRESS; } -- yamahata _______________________________________________ Xen-ia64-devel mailing list Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-ia64-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |