qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Blue Swirl <blauwirbel@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [6611] Use qemu_ram_alloc
Date: Wed, 11 Feb 2009 18:04:12 +0000	[thread overview]
Message-ID: <E1LXJRU-0003Qb-TR@cvs.savannah.gnu.org> (raw)

Revision: 6611
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6611
Author:   blueswir1
Date:     2009-02-11 18:04:12 +0000 (Wed, 11 Feb 2009)

Log Message:
-----------
Use qemu_ram_alloc

Modified Paths:
--------------
    trunk/hw/ppc_prep.c

Modified: trunk/hw/ppc_prep.c
===================================================================
--- trunk/hw/ppc_prep.c	2009-02-11 15:21:54 UTC (rev 6610)
+++ trunk/hw/ppc_prep.c	2009-02-11 18:04:12 UTC (rev 6611)
@@ -543,7 +543,7 @@
     m48t59_t *m48t59;
     int PPC_io_memory;
     int linux_boot, i, nb_nics1, bios_size;
-    unsigned long bios_offset;
+    ram_addr_t ram_offset, vga_ram_offset, bios_offset;
     uint32_t kernel_base, kernel_size, initrd_base, initrd_size;
     PCIBus *pci_bus;
     qemu_irq *i8259;
@@ -577,10 +577,14 @@
     }
 
     /* allocate RAM */
-    cpu_register_physical_memory(0, ram_size, IO_MEM_RAM);
+    ram_offset = qemu_ram_alloc(ram_size);
+    cpu_register_physical_memory(0, ram_size, ram_offset);
 
+    /* allocate VGA RAM */
+    vga_ram_offset = qemu_ram_alloc(vga_ram_size);
+
     /* allocate and load BIOS */
-    bios_offset = ram_size + vga_ram_size;
+    bios_offset = qemu_ram_alloc(BIOS_SIZE);
     if (bios_name == NULL)
         bios_name = BIOS_FILENAME;
     snprintf(buf, sizeof(buf), "%s/%s", bios_dir, bios_name);
@@ -653,8 +657,8 @@
     cpu_register_physical_memory(0x80000000, 0x00800000, PPC_io_memory);
 
     /* init basic PC hardware */
-    pci_vga_init(pci_bus, phys_ram_base + ram_size, ram_size,
-                 vga_ram_size, 0, 0);
+    pci_vga_init(pci_bus, phys_ram_base + vga_ram_offset,
+                 vga_ram_offset, vga_ram_size, 0, 0);
     //    openpic = openpic_init(0x00000000, 0xF0000000, 1);
     //    pit = pit_init(0x40, i8259[0]);
     rtc_init(0x70, i8259[8], 2000);

                 reply	other threads:[~2009-02-11 18:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1LXJRU-0003Qb-TR@cvs.savannah.gnu.org \
    --to=blauwirbel@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).