aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc_oldworld.c
diff options
context:
space:
mode:
authorpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2009-04-10 00:26:15 +0000
committerpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2009-04-10 00:26:15 +0000
commit446544909738bbaf7af927ecd5dcef45debc7167 (patch)
tree88c1b2935a3f0bb1015edb4628d72d43284b73e1 /hw/ppc_oldworld.c
parentdc828ca1b59b0c390a6994c78e9658174f821f74 (diff)
More phys_ram_base removal.
Signed-off-by: Paul Brook <paul@codesourcery.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7060 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/ppc_oldworld.c')
-rw-r--r--hw/ppc_oldworld.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/hw/ppc_oldworld.c b/hw/ppc_oldworld.c
index 820413c634..4b4bd8becd 100644
--- a/hw/ppc_oldworld.c
+++ b/hw/ppc_oldworld.c
@@ -138,6 +138,7 @@ static void ppc_heathrow_init (ram_addr_t ram_size, int vga_ram_size,
int index;
void *fw_cfg;
void *dbdma;
+ uint8_t *vga_bios_ptr;
linux_boot = (kernel_filename != NULL);
@@ -187,8 +188,9 @@ static void ppc_heathrow_init (ram_addr_t ram_size, int vga_ram_size,
/* allocate and load VGA BIOS */
vga_bios_offset = qemu_ram_alloc(VGA_BIOS_SIZE);
+ vga_bios_ptr = qemu_get_ram_ptr(vga_bios_offset);
snprintf(buf, sizeof(buf), "%s/%s", bios_dir, VGABIOS_FILENAME);
- vga_bios_size = load_image(buf, phys_ram_base + vga_bios_offset + 8);
+ vga_bios_size = load_image(buf, vga_bios_ptr + 8);
if (vga_bios_size < 0) {
/* if no bios is present, we can still work */
fprintf(stderr, "qemu: warning: could not load VGA bios '%s'\n", buf);
@@ -196,12 +198,11 @@ static void ppc_heathrow_init (ram_addr_t ram_size, int vga_ram_size,
} else {
/* set a specific header (XXX: find real Apple format for NDRV
drivers) */
- phys_ram_base[vga_bios_offset] = 'N';
- phys_ram_base[vga_bios_offset + 1] = 'D';
- phys_ram_base[vga_bios_offset + 2] = 'R';
- phys_ram_base[vga_bios_offset + 3] = 'V';
- cpu_to_be32w((uint32_t *)(phys_ram_base + vga_bios_offset + 4),
- vga_bios_size);
+ vga_bios_ptr[0] = 'N';
+ vga_bios_ptr[1] = 'D';
+ vga_bios_ptr[2] = 'R';
+ vga_bios_ptr[3] = 'V';
+ cpu_to_be32w((uint32_t *)(vga_bios_ptr + 4), vga_bios_size);
vga_bios_size += 8;
}