ia64/xen-unstable

changeset 16601:51c9755a52d5

Revert 16579:0884e0a5ecc33afac8d60ea09652cf436d1a33ce.
author Keir Fraser <keir.fraser@citrix.com>
date Wed Dec 12 12:00:46 2007 +0000 (2007-12-12)
parents d54bcd738247
children 20898120c8f9
files tools/ioemu/hw/vga.c tools/ioemu/hw/vga_int.h
line diff
     1.1 --- a/tools/ioemu/hw/vga.c	Wed Dec 12 11:42:06 2007 +0000
     1.2 +++ b/tools/ioemu/hw/vga.c	Wed Dec 12 12:00:46 2007 +0000
     1.3 @@ -1742,8 +1742,6 @@ static CPUWriteMemoryFunc *vga_mem_write
     1.4  static void vga_save(QEMUFile *f, void *opaque)
     1.5  {
     1.6      VGAState *s = opaque;
     1.7 -    unsigned save_format_flags;
     1.8 -    uint32_t vram_size;
     1.9  #ifdef CONFIG_BOCHS_VBE
    1.10      int i;
    1.11  #endif
    1.12 @@ -1774,9 +1772,8 @@ static void vga_save(QEMUFile *f, void *
    1.13      qemu_put_buffer(f, s->palette, 768);
    1.14  
    1.15      qemu_put_be32s(f, &s->bank_offset);
    1.16 -    save_format_flags = VGA_SAVE_FORMAT_FLAG_VRAM_DATA;
    1.17  #ifdef CONFIG_BOCHS_VBE
    1.18 -    qemu_put_byte(f, save_format_flags | VGA_SAVE_FORMAT_FLAG_BOCHS_VBE);
    1.19 +    qemu_put_byte(f, 1);
    1.20      qemu_put_be16s(f, &s->vbe_index);
    1.21      for(i = 0; i < VBE_DISPI_INDEX_NB; i++)
    1.22          qemu_put_be16s(f, &s->vbe_regs[i]);
    1.23 @@ -1784,19 +1781,17 @@ static void vga_save(QEMUFile *f, void *
    1.24      qemu_put_be32s(f, &s->vbe_line_offset);
    1.25      qemu_put_be32s(f, &s->vbe_bank_mask);
    1.26  #else
    1.27 -    qemu_put_byte(f, save_format_flags);
    1.28 +    qemu_put_byte(f, 0);
    1.29  #endif
    1.30 -    vram_size = s->vram_size;
    1.31 -    qemu_put_be32s(f, &vram_size); 
    1.32 -    qemu_put_buffer(f, s->vram_ptr, s->vram_size); 
    1.33  }
    1.34  
    1.35  static int vga_load(QEMUFile *f, void *opaque, int version_id)
    1.36  {
    1.37      VGAState *s = opaque;
    1.38 -    int ret;
    1.39 -    unsigned int save_format_flags;
    1.40 -    uint32_t vram_size;
    1.41 +    int is_vbe, ret;
    1.42 +#ifdef CONFIG_BOCHS_VBE
    1.43 +    int i;
    1.44 +#endif
    1.45  
    1.46      if (version_id > 2)
    1.47          return -EINVAL;
    1.48 @@ -1830,9 +1825,9 @@ static int vga_load(QEMUFile *f, void *o
    1.49      qemu_get_buffer(f, s->palette, 768);
    1.50  
    1.51      qemu_get_be32s(f, &s->bank_offset);
    1.52 -    save_format_flags = qemu_get_byte(f);
    1.53 +    is_vbe = qemu_get_byte(f);
    1.54  #ifdef CONFIG_BOCHS_VBE
    1.55 -    if (!(save_format_flags & VGA_SAVE_FORMAT_FLAG_BOCHS_VBE))
    1.56 +    if (!is_vbe)
    1.57          return -EINVAL;
    1.58      qemu_get_be16s(f, &s->vbe_index);
    1.59      for(i = 0; i < VBE_DISPI_INDEX_NB; i++)
    1.60 @@ -1841,16 +1836,9 @@ static int vga_load(QEMUFile *f, void *o
    1.61      qemu_get_be32s(f, &s->vbe_line_offset);
    1.62      qemu_get_be32s(f, &s->vbe_bank_mask);
    1.63  #else
    1.64 -    if (save_format_flags & VGA_SAVE_FORMAT_FLAG_BOCHS_VBE)
    1.65 +    if (is_vbe)
    1.66          return -EINVAL;
    1.67  #endif
    1.68 -    if (save_format_flags & VGA_SAVE_FORMAT_FLAG_VRAM_DATA) {
    1.69 -	/* people who restore old images may be lucky ... */
    1.70 -	qemu_get_be32s(f, &vram_size);
    1.71 -	if (vram_size != s->vram_size)
    1.72 -	    return -EINVAL;
    1.73 -	qemu_get_buffer(f, s->vram_ptr, s->vram_size); 
    1.74 -    }
    1.75  
    1.76      /* force refresh */
    1.77      s->graphic_mode = -1;
     2.1 --- a/tools/ioemu/hw/vga_int.h	Wed Dec 12 11:42:06 2007 +0000
     2.2 +++ b/tools/ioemu/hw/vga_int.h	Wed Dec 12 12:00:46 2007 +0000
     2.3 @@ -157,9 +157,6 @@ static inline int c6_to_8(int v)
     2.4      return (v << 2) | (b << 1) | b;
     2.5  }
     2.6  
     2.7 -#define VGA_SAVE_FORMAT_FLAG_BOCHS_VBE  0x01
     2.8 -#define VGA_SAVE_FORMAT_FLAG_VRAM_DATA  0x02
     2.9 -
    2.10  void vga_common_init(VGAState *s, DisplayState *ds, uint8_t *vga_ram_base, 
    2.11                       unsigned long vga_ram_offset, int vga_ram_size);
    2.12  uint32_t vga_mem_readb(void *opaque, target_phys_addr_t addr);