Revision 5245d57a

b/hw/cirrus_vga.c
32 32
#include "console.h"
33 33
#include "vga_int.h"
34 34
#include "kvm.h"
35
#include "loader.h"
35 36

  
36 37
/*
37 38
 * TODO:
......
3162 3163
                                     s->vga.screen_dump, s->vga.text_update,
3163 3164
                                     &s->vga);
3164 3165
    vmstate_register(0, &vmstate_cirrus_vga, s);
3166
    rom_add_vga(VGABIOS_CIRRUS_FILENAME);
3165 3167
    /* XXX ISA-LFB support */
3166 3168
}
3167 3169

  
......
3245 3247
                          PCI_ADDRESS_SPACE_MEM, cirrus_pci_mmio_map);
3246 3248
     }
3247 3249
     vmstate_register(0, &vmstate_pci_cirrus_vga, d);
3248
     /* XXX: ROM BIOS */
3250

  
3251
     /* ROM BIOS */
3252
     rom_add_vga(VGABIOS_CIRRUS_FILENAME);
3249 3253
     return 0;
3250 3254
}
3251 3255

  
b/hw/pc.c
47 47
//#define DEBUG_MULTIBOOT
48 48

  
49 49
#define BIOS_FILENAME "bios.bin"
50
#define VGABIOS_FILENAME "vgabios.bin"
51
#define VGABIOS_CIRRUS_FILENAME "vgabios-cirrus.bin"
52 50

  
53 51
#define PC_MAX_BIOS_SIZE (4 * 1024 * 1024)
54 52

  
......
1050 1048
    IsaIrqState *isa_irq_state;
1051 1049
    DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS];
1052 1050
    DriveInfo *fd[MAX_FD];
1053
    int using_vga = cirrus_vga_enabled || std_vga_enabled || vmsvga_enabled;
1054 1051
    void *fw_cfg;
1055 1052

  
1056 1053
    if (ram_size >= 0xe0000000 ) {
......
1141 1138
    option_rom_offset = qemu_ram_alloc(PC_ROM_SIZE);
1142 1139
    cpu_register_physical_memory(PC_ROM_MIN_VGA, PC_ROM_SIZE, option_rom_offset);
1143 1140

  
1144
    if (using_vga) {
1145
        /* VGA BIOS load */
1146
        if (cirrus_vga_enabled) {
1147
            rom_add_vga(VGABIOS_CIRRUS_FILENAME);
1148
        } else {
1149
            rom_add_vga(VGABIOS_FILENAME);
1150
        }
1151
    }
1152

  
1153 1141
    /* map all the bios at the top of memory */
1154 1142
    cpu_register_physical_memory((uint32_t)(-bios_size),
1155 1143
                                 bios_size, bios_offset | IO_MEM_ROM);
b/hw/vga-isa.c
27 27
#include "vga_int.h"
28 28
#include "pixel_ops.h"
29 29
#include "qemu-timer.h"
30
#include "loader.h"
30 31

  
31 32
int isa_vga_init(void)
32 33
{
......
46 47
    cpu_register_physical_memory(VBE_DISPI_LFB_PHYSICAL_ADDRESS,
47 48
                                 VGA_RAM_SIZE, s->vram_offset);
48 49
#endif
50
    /* ROM BIOS */
51
    rom_add_vga(VGABIOS_FILENAME);
49 52
    return 0;
50 53
}
b/hw/vga-pci.c
28 28
#include "vga_int.h"
29 29
#include "pixel_ops.h"
30 30
#include "qemu-timer.h"
31
#include "loader.h"
31 32

  
32 33
typedef struct PCIVGAState {
33 34
    PCIDevice dev;
......
105 106
        pci_register_bar(&d->dev, PCI_ROM_SLOT, bios_total_size,
106 107
                         PCI_ADDRESS_SPACE_MEM_PREFETCH, vga_map);
107 108
     }
109

  
110
     /* ROM BIOS */
111
     rom_add_vga(VGABIOS_FILENAME);
108 112
     return 0;
109 113
}
110 114

  
b/hw/vga_int.h
223 223
extern const uint8_t gr_mask[16];
224 224

  
225 225
#define VGA_RAM_SIZE (8192 * 1024)
226
#define VGABIOS_FILENAME "vgabios.bin"
227
#define VGABIOS_CIRRUS_FILENAME "vgabios-cirrus.bin"
226 228

  
227 229
extern CPUReadMemoryFunc * const vga_mem_read[3];
228 230
extern CPUWriteMemoryFunc * const vga_mem_write[3];

Also available in: Unified diff