提交 53ecf09d 编写于 作者: M Mark Cave-Ayland 提交者: David Gibson

ppc: add qemu_vga.ndrv ROM to fw_cfg interface for NewWorld Macs

Signed-off-by: NMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
上级 b50de5cd
...@@ -80,6 +80,8 @@ ...@@ -80,6 +80,8 @@
#define CLOCKFREQ (266UL * 1000UL * 1000UL) #define CLOCKFREQ (266UL * 1000UL * 1000UL)
#define BUSFREQ (100UL * 1000UL * 1000UL) #define BUSFREQ (100UL * 1000UL * 1000UL)
#define NDRV_VGA_FILENAME "qemu_vga.ndrv"
/* UniN device */ /* UniN device */
static void unin_write(void *opaque, hwaddr addr, uint64_t value, static void unin_write(void *opaque, hwaddr addr, uint64_t value,
unsigned size) unsigned size)
...@@ -160,7 +162,8 @@ static void ppc_core99_init(MachineState *machine) ...@@ -160,7 +162,8 @@ static void ppc_core99_init(MachineState *machine)
MACIOIDEState *macio_ide; MACIOIDEState *macio_ide;
BusState *adb_bus; BusState *adb_bus;
MacIONVRAMState *nvr; MacIONVRAMState *nvr;
int bios_size; int bios_size, ndrv_size;
uint8_t *ndrv_file;
MemoryRegion *pic_mem, *escc_mem; MemoryRegion *pic_mem, *escc_mem;
MemoryRegion *escc_bar = g_new(MemoryRegion, 1); MemoryRegion *escc_bar = g_new(MemoryRegion, 1);
int ppc_boot_device; int ppc_boot_device;
...@@ -494,6 +497,19 @@ static void ppc_core99_init(MachineState *machine) ...@@ -494,6 +497,19 @@ static void ppc_core99_init(MachineState *machine)
fw_cfg_add_i32(fw_cfg, FW_CFG_PPC_BUSFREQ, BUSFREQ); fw_cfg_add_i32(fw_cfg, FW_CFG_PPC_BUSFREQ, BUSFREQ);
fw_cfg_add_i32(fw_cfg, FW_CFG_PPC_NVRAM_ADDR, nvram_addr); fw_cfg_add_i32(fw_cfg, FW_CFG_PPC_NVRAM_ADDR, nvram_addr);
/* MacOS NDRV VGA driver */
filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, NDRV_VGA_FILENAME);
if (filename) {
ndrv_size = get_image_size(filename);
if (ndrv_size != -1) {
ndrv_file = g_malloc(ndrv_size);
ndrv_size = load_image(filename, ndrv_file);
fw_cfg_add_file(fw_cfg, "ndrv/qemu_vga.ndrv", ndrv_file, ndrv_size);
}
g_free(filename);
}
qemu_register_boot_set(fw_cfg_boot_set, fw_cfg); qemu_register_boot_set(fw_cfg_boot_set, fw_cfg);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册