Revision 44654490 hw/ppc_newworld.c
b/hw/ppc_newworld.c | ||
---|---|---|
110 | 110 |
BlockDriverState *hd[MAX_IDE_BUS * MAX_IDE_DEVS]; |
111 | 111 |
void *fw_cfg; |
112 | 112 |
void *dbdma; |
113 |
uint8_t *vga_bios_ptr; |
|
113 | 114 |
|
114 | 115 |
linux_boot = (kernel_filename != NULL); |
115 | 116 |
|
... | ... | |
154 | 155 |
|
155 | 156 |
/* allocate and load VGA BIOS */ |
156 | 157 |
vga_bios_offset = qemu_ram_alloc(VGA_BIOS_SIZE); |
158 |
vga_bios_ptr = qemu_get_ram_ptr(vga_bios_offset); |
|
157 | 159 |
snprintf(buf, sizeof(buf), "%s/%s", bios_dir, VGABIOS_FILENAME); |
158 |
vga_bios_size = load_image(buf, phys_ram_base + vga_bios_offset + 8);
|
|
160 |
vga_bios_size = load_image(buf, vga_bios_ptr + 8);
|
|
159 | 161 |
if (vga_bios_size < 0) { |
160 | 162 |
/* if no bios is present, we can still work */ |
161 | 163 |
fprintf(stderr, "qemu: warning: could not load VGA bios '%s'\n", buf); |
... | ... | |
163 | 165 |
} else { |
164 | 166 |
/* set a specific header (XXX: find real Apple format for NDRV |
165 | 167 |
drivers) */ |
166 |
phys_ram_base[vga_bios_offset] = 'N'; |
|
167 |
phys_ram_base[vga_bios_offset + 1] = 'D'; |
|
168 |
phys_ram_base[vga_bios_offset + 2] = 'R'; |
|
169 |
phys_ram_base[vga_bios_offset + 3] = 'V'; |
|
170 |
cpu_to_be32w((uint32_t *)(phys_ram_base + vga_bios_offset + 4), |
|
171 |
vga_bios_size); |
|
168 |
vga_bios_ptr[0] = 'N'; |
|
169 |
vga_bios_ptr[1] = 'D'; |
|
170 |
vga_bios_ptr[2] = 'R'; |
|
171 |
vga_bios_ptr[3] = 'V'; |
|
172 |
cpu_to_be32w((uint32_t *)(vga_bios_ptr + 4), vga_bios_size); |
|
172 | 173 |
vga_bios_size += 8; |
173 | 174 |
} |
174 | 175 |
|
... | ... | |
199 | 200 |
/* load initrd */ |
200 | 201 |
if (initrd_filename) { |
201 | 202 |
initrd_base = INITRD_LOAD_ADDR; |
202 |
initrd_size = load_image(initrd_filename,
|
|
203 |
phys_ram_base + initrd_base);
|
|
203 |
initrd_size = load_image_targphys(initrd_filename, initrd_base,
|
|
204 |
ram_size - initrd_base);
|
|
204 | 205 |
if (initrd_size < 0) { |
205 | 206 |
cpu_abort(env, "qemu: could not load initial ram disk '%s'\n", |
206 | 207 |
initrd_filename); |
Also available in: Unified diff