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
This commit is contained in:
aliguori 2008-11-24 19:33:59 +00:00
parent 0e1f5a0c49
commit 4efe27556d
4 changed files with 7 additions and 7 deletions

View File

@ -3231,7 +3231,7 @@ static void cirrus_init_common(CirrusVGAState * s, int device_id, int is_pci)
***************************************/
void isa_cirrus_vga_init(DisplayState *ds, uint8_t *vga_ram_base,
unsigned long vga_ram_offset, int vga_ram_size)
ram_addr_t vga_ram_offset, int vga_ram_size)
{
CirrusVGAState *s;
@ -3273,7 +3273,7 @@ static void cirrus_pci_mmio_map(PCIDevice *d, int region_num,
}
void pci_cirrus_vga_init(PCIBus *bus, DisplayState *ds, uint8_t *vga_ram_base,
unsigned long vga_ram_offset, int vga_ram_size)
ram_addr_t vga_ram_offset, int vga_ram_size)
{
PCICirrusVGAState *d;
uint8_t *pci_conf;

View File

@ -134,9 +134,9 @@ int isa_vga_mm_init(DisplayState *ds, uint8_t *vga_ram_base,
/* cirrus_vga.c */
void pci_cirrus_vga_init(PCIBus *bus, DisplayState *ds, uint8_t *vga_ram_base,
unsigned long vga_ram_offset, int vga_ram_size);
ram_addr_t vga_ram_offset, int vga_ram_size);
void isa_cirrus_vga_init(DisplayState *ds, uint8_t *vga_ram_base,
unsigned long vga_ram_offset, int vga_ram_size);
ram_addr_t vga_ram_offset, int vga_ram_size);
/* ide.c */
void isa_ide_init(int iobase, int iobase2, qemu_irq irq,

View File

@ -2105,7 +2105,7 @@ static void vga_map(PCIDevice *pci_dev, int region_num,
}
void vga_common_init(VGAState *s, DisplayState *ds, uint8_t *vga_ram_base,
unsigned long vga_ram_offset, int vga_ram_size)
ram_addr_t vga_ram_offset, int vga_ram_size)
{
int i, j, v, b;

View File

@ -100,7 +100,7 @@ typedef void (* vga_update_retrace_info_fn)(struct VGAState *s);
#define VGA_STATE_COMMON \
uint8_t *vram_ptr; \
unsigned long vram_offset; \
ram_addr_t vram_offset; \
unsigned int vram_size; \
unsigned long bios_offset; \
unsigned int bios_size; \
@ -186,7 +186,7 @@ static inline int c6_to_8(int v)
}
void vga_common_init(VGAState *s, DisplayState *ds, uint8_t *vga_ram_base,
unsigned long vga_ram_offset, int vga_ram_size);
ram_addr_t vga_ram_offset, int vga_ram_size);
void vga_init(VGAState *s);
uint32_t vga_mem_readb(void *opaque, target_phys_addr_t addr);
void vga_mem_writeb(void *opaque, target_phys_addr_t addr, uint32_t val);