From b5f9be2beca998edb8007f8bda944bbff81e02e3 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 27 Nov 2008 12:01:00 +0000 Subject: [PATCH] cirrus vga save/restore and lfb_addr/lfb_end Cirrus VGA save and restore functions cast lfb_addr into an uint64_t pointer while lfb_addr is only an unsigned long. Same thing happened to lfb_end, causing pci_dev to be partially overwritten by mistake. Signed-off-by: Stefano Stabellini (cherry picked from commit ea324bf41565322b370b27253b1a7eaa3cc360b9) Conflicts: hw/cirrus_vga.c --- hw/cirrus_vga.c | 4 ++-- hw/vga_int.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c index 14618763..fb437769 100644 --- a/hw/cirrus_vga.c +++ b/hw/cirrus_vga.c @@ -290,8 +290,8 @@ typedef struct CirrusVGAState { int last_hw_cursor_y_end; int real_vram_size; /* XXX: suppress that */ CPUWriteMemoryFunc **cirrus_linear_write; - unsigned long map_addr; - unsigned long map_end; + uint32_t map_addr; + uint32_t map_end; } CirrusVGAState; typedef struct PCICirrusVGAState { diff --git a/hw/vga_int.h b/hw/vga_int.h index 06267746..95f2a65b 100644 --- a/hw/vga_int.h +++ b/hw/vga_int.h @@ -87,8 +87,8 @@ unsigned int vram_size; \ unsigned long bios_offset; \ unsigned int bios_size; \ - unsigned long lfb_addr; \ - unsigned long lfb_end; \ + uint32_t lfb_addr; \ + uint32_t lfb_end; \ PCIDevice *pci_dev; \ uint32_t latch; \ uint8_t sr_index; \ -- 2.39.5