diff options
author | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-11-05 19:25:39 +0000 |
---|---|---|
committer | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-11-05 19:25:39 +0000 |
commit | 5c6602c5468a1408686abce6cdb2617ee462a333 (patch) | |
tree | 1c927783bc9510bd6c5b7de0f60464e0dec0f9b6 /hw/sun4u.c | |
parent | 053304480a134a01cc50c25166e569b811a75849 (diff) |
Use qemu_ram_alloc
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5630 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/sun4u.c')
-rw-r--r-- | hw/sun4u.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/hw/sun4u.c b/hw/sun4u.c index 057e78fc49..48c1f2cf0f 100644 --- a/hw/sun4u.c +++ b/hw/sun4u.c @@ -344,7 +344,8 @@ static void sun4uv_init(ram_addr_t RAM_size, int vga_ram_size, m48t59_t *nvram; int ret, linux_boot; unsigned int i; - long prom_offset, initrd_size, kernel_size; + ram_addr_t ram_offset, prom_offset, vga_ram_offset; + long initrd_size, kernel_size; PCIBus *pci_bus; QEMUBH *bh; qemu_irq *irq; @@ -387,9 +388,10 @@ static void sun4uv_init(ram_addr_t RAM_size, int vga_ram_size, env->npc = env->pc + 4; /* allocate RAM */ - cpu_register_physical_memory(0, RAM_size, 0); + ram_offset = qemu_ram_alloc(RAM_size); + cpu_register_physical_memory(0, RAM_size, ram_offset); - prom_offset = RAM_size + vga_ram_size; + prom_offset = qemu_ram_alloc(PROM_SIZE_MAX); cpu_register_physical_memory(hwdef->prom_addr, (PROM_SIZE_MAX + TARGET_PAGE_SIZE) & TARGET_PAGE_MASK, @@ -451,8 +453,9 @@ static void sun4uv_init(ram_addr_t RAM_size, int vga_ram_size, } pci_bus = pci_apb_init(APB_SPECIAL_BASE, APB_MEM_BASE, NULL); isa_mem_base = VGA_BASE; - pci_cirrus_vga_init(pci_bus, ds, phys_ram_base + RAM_size, RAM_size, - vga_ram_size); + vga_ram_offset = qemu_ram_alloc(vga_ram_size); + pci_cirrus_vga_init(pci_bus, ds, phys_ram_base + vga_ram_offset, + vga_ram_offset, vga_ram_size); i = 0; if (hwdef->console_serial_base) { |