static uint16_t expand2[256];
static uint8_t expand4to8[16];
-VGAState vga_state;
+VGAState *vga_state;
int vga_io_memory;
static uint32_t vga_ioport_read(void *opaque, uint32_t addr)
void vga_update_display(void)
{
- VGAState *s = &vga_state;
+ VGAState *s = vga_state;
int full_update, graphic_mode;
if (s->ds->depth == 0) {
static void vga_map(PCIDevice *pci_dev, int region_num,
uint32_t addr, uint32_t size, int type)
{
- VGAState *s = &vga_state;
+ VGAState *s = vga_state;
cpu_register_physical_memory(addr, s->vram_size, s->vram_offset);
}
s->ds = ds;
s->get_bpp = vga_get_bpp;
s->get_offsets = vga_get_offsets;
+ /* XXX: currently needed for display */
+ vga_state = s;
}
unsigned long vga_ram_offset, int vga_ram_size,
int is_pci)
{
- VGAState *s = &vga_state;
+ VGAState *s;
+
+ s = qemu_mallocz(sizeof(VGAState));
+ if (!s)
+ return -1;
vga_common_init(s, ds, vga_ram_base, vga_ram_offset, vga_ram_size);
available */
void vga_screen_dump(const char *filename)
{
- VGAState *s = &vga_state;
+ VGAState *s = vga_state;
DisplayState *saved_ds, ds1, *ds = &ds1;
/* XXX: this is a little hackish */