# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1197460846 0
# Node ID 51c9755a52d52bb639bf332dfeb9edf5fd54e637
# Parent d54bcd73824702b8080c4885b6ebc649865fe022
Revert 16579:0884e0a5ecc33afac8d60ea09652cf436d1a33ce.
---
tools/ioemu/hw/vga.c | 32 ++++++++++----------------------
tools/ioemu/hw/vga_int.h | 3 ---
2 files changed, 10 insertions(+), 25 deletions(-)
diff -r d54bcd738247 -r 51c9755a52d5 tools/ioemu/hw/vga.c
--- a/tools/ioemu/hw/vga.c Wed Dec 12 11:42:06 2007 +0000
+++ b/tools/ioemu/hw/vga.c Wed Dec 12 12:00:46 2007 +0000
@@ -1742,8 +1742,6 @@ static void vga_save(QEMUFile *f, void *
static void vga_save(QEMUFile *f, void *opaque)
{
VGAState *s = opaque;
- unsigned save_format_flags;
- uint32_t vram_size;
#ifdef CONFIG_BOCHS_VBE
int i;
#endif
@@ -1774,9 +1772,8 @@ static void vga_save(QEMUFile *f, void *
qemu_put_buffer(f, s->palette, 768);
qemu_put_be32s(f, &s->bank_offset);
- save_format_flags = VGA_SAVE_FORMAT_FLAG_VRAM_DATA;
#ifdef CONFIG_BOCHS_VBE
- qemu_put_byte(f, save_format_flags | VGA_SAVE_FORMAT_FLAG_BOCHS_VBE);
+ qemu_put_byte(f, 1);
qemu_put_be16s(f, &s->vbe_index);
for(i = 0; i < VBE_DISPI_INDEX_NB; i++)
qemu_put_be16s(f, &s->vbe_regs[i]);
@@ -1784,19 +1781,17 @@ static void vga_save(QEMUFile *f, void *
qemu_put_be32s(f, &s->vbe_line_offset);
qemu_put_be32s(f, &s->vbe_bank_mask);
#else
- qemu_put_byte(f, save_format_flags);
-#endif
- vram_size = s->vram_size;
- qemu_put_be32s(f, &vram_size);
- qemu_put_buffer(f, s->vram_ptr, s->vram_size);
+ qemu_put_byte(f, 0);
+#endif
}
static int vga_load(QEMUFile *f, void *opaque, int version_id)
{
VGAState *s = opaque;
- int ret;
- unsigned int save_format_flags;
- uint32_t vram_size;
+ int is_vbe, ret;
+#ifdef CONFIG_BOCHS_VBE
+ int i;
+#endif
if (version_id > 2)
return -EINVAL;
@@ -1830,9 +1825,9 @@ static int vga_load(QEMUFile *f, void *o
qemu_get_buffer(f, s->palette, 768);
qemu_get_be32s(f, &s->bank_offset);
- save_format_flags = qemu_get_byte(f);
+ is_vbe = qemu_get_byte(f);
#ifdef CONFIG_BOCHS_VBE
- if (!(save_format_flags & VGA_SAVE_FORMAT_FLAG_BOCHS_VBE))
+ if (!is_vbe)
return -EINVAL;
qemu_get_be16s(f, &s->vbe_index);
for(i = 0; i < VBE_DISPI_INDEX_NB; i++)
@@ -1841,16 +1836,9 @@ static int vga_load(QEMUFile *f, void *o
qemu_get_be32s(f, &s->vbe_line_offset);
qemu_get_be32s(f, &s->vbe_bank_mask);
#else
- if (save_format_flags & VGA_SAVE_FORMAT_FLAG_BOCHS_VBE)
+ if (is_vbe)
return -EINVAL;
#endif
- if (save_format_flags & VGA_SAVE_FORMAT_FLAG_VRAM_DATA) {
- /* people who restore old images may be lucky ... */
- qemu_get_be32s(f, &vram_size);
- if (vram_size != s->vram_size)
- return -EINVAL;
- qemu_get_buffer(f, s->vram_ptr, s->vram_size);
- }
/* force refresh */
s->graphic_mode = -1;
diff -r d54bcd738247 -r 51c9755a52d5 tools/ioemu/hw/vga_int.h
--- a/tools/ioemu/hw/vga_int.h Wed Dec 12 11:42:06 2007 +0000
+++ b/tools/ioemu/hw/vga_int.h Wed Dec 12 12:00:46 2007 +0000
@@ -157,9 +157,6 @@ static inline int c6_to_8(int v)
return (v << 2) | (b << 1) | b;
}
-#define VGA_SAVE_FORMAT_FLAG_BOCHS_VBE 0x01
-#define VGA_SAVE_FORMAT_FLAG_VRAM_DATA 0x02
-
void vga_common_init(VGAState *s, DisplayState *ds, uint8_t *vga_ram_base,
unsigned long vga_ram_offset, int vga_ram_size);
uint32_t vga_mem_readb(void *opaque, target_phys_addr_t addr);
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|