Commit 4efe27556dea874030f1cd53a6d70452ee064fba
1 parent
0e1f5a0c
better type checking for vga (Glauber Costa)
unsigned long is too bad of a type. Use ram_addr_t instead. aligurori: fixed a compile warning in this patch Signed-off-by: Glauber Costa <glommer@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5790 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
4 changed files
with
7 additions
and
7 deletions
hw/cirrus_vga.c
... | ... | @@ -3231,7 +3231,7 @@ static void cirrus_init_common(CirrusVGAState * s, int device_id, int is_pci) |
3231 | 3231 | ***************************************/ |
3232 | 3232 | |
3233 | 3233 | void isa_cirrus_vga_init(DisplayState *ds, uint8_t *vga_ram_base, |
3234 | - unsigned long vga_ram_offset, int vga_ram_size) | |
3234 | + ram_addr_t vga_ram_offset, int vga_ram_size) | |
3235 | 3235 | { |
3236 | 3236 | CirrusVGAState *s; |
3237 | 3237 | |
... | ... | @@ -3273,7 +3273,7 @@ static void cirrus_pci_mmio_map(PCIDevice *d, int region_num, |
3273 | 3273 | } |
3274 | 3274 | |
3275 | 3275 | void pci_cirrus_vga_init(PCIBus *bus, DisplayState *ds, uint8_t *vga_ram_base, |
3276 | - unsigned long vga_ram_offset, int vga_ram_size) | |
3276 | + ram_addr_t vga_ram_offset, int vga_ram_size) | |
3277 | 3277 | { |
3278 | 3278 | PCICirrusVGAState *d; |
3279 | 3279 | uint8_t *pci_conf; | ... | ... |
hw/pc.h
... | ... | @@ -134,9 +134,9 @@ int isa_vga_mm_init(DisplayState *ds, uint8_t *vga_ram_base, |
134 | 134 | |
135 | 135 | /* cirrus_vga.c */ |
136 | 136 | void pci_cirrus_vga_init(PCIBus *bus, DisplayState *ds, uint8_t *vga_ram_base, |
137 | - unsigned long vga_ram_offset, int vga_ram_size); | |
137 | + ram_addr_t vga_ram_offset, int vga_ram_size); | |
138 | 138 | void isa_cirrus_vga_init(DisplayState *ds, uint8_t *vga_ram_base, |
139 | - unsigned long vga_ram_offset, int vga_ram_size); | |
139 | + ram_addr_t vga_ram_offset, int vga_ram_size); | |
140 | 140 | |
141 | 141 | /* ide.c */ |
142 | 142 | void isa_ide_init(int iobase, int iobase2, qemu_irq irq, | ... | ... |
hw/vga.c
... | ... | @@ -2105,7 +2105,7 @@ static void vga_map(PCIDevice *pci_dev, int region_num, |
2105 | 2105 | } |
2106 | 2106 | |
2107 | 2107 | void vga_common_init(VGAState *s, DisplayState *ds, uint8_t *vga_ram_base, |
2108 | - unsigned long vga_ram_offset, int vga_ram_size) | |
2108 | + ram_addr_t vga_ram_offset, int vga_ram_size) | |
2109 | 2109 | { |
2110 | 2110 | int i, j, v, b; |
2111 | 2111 | ... | ... |
hw/vga_int.h
... | ... | @@ -100,7 +100,7 @@ typedef void (* vga_update_retrace_info_fn)(struct VGAState *s); |
100 | 100 | |
101 | 101 | #define VGA_STATE_COMMON \ |
102 | 102 | uint8_t *vram_ptr; \ |
103 | - unsigned long vram_offset; \ | |
103 | + ram_addr_t vram_offset; \ | |
104 | 104 | unsigned int vram_size; \ |
105 | 105 | unsigned long bios_offset; \ |
106 | 106 | unsigned int bios_size; \ |
... | ... | @@ -186,7 +186,7 @@ static inline int c6_to_8(int v) |
186 | 186 | } |
187 | 187 | |
188 | 188 | void vga_common_init(VGAState *s, DisplayState *ds, uint8_t *vga_ram_base, |
189 | - unsigned long vga_ram_offset, int vga_ram_size); | |
189 | + ram_addr_t vga_ram_offset, int vga_ram_size); | |
190 | 190 | void vga_init(VGAState *s); |
191 | 191 | uint32_t vga_mem_readb(void *opaque, target_phys_addr_t addr); |
192 | 192 | void vga_mem_writeb(void *opaque, target_phys_addr_t addr, uint32_t val); | ... | ... |