qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paul Brook <paul@nowt.org>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [7058] Use cpu_physical_memory_write_rom instead of memcpy.
Date: Thu, 09 Apr 2009 21:02:04 +0000	[thread overview]
Message-ID: <E1Ls1Ns-0003zD-Mv@cvs.savannah.gnu.org> (raw)

Revision: 7058
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=7058
Author:   pbrook
Date:     2009-04-09 21:02:04 +0000 (Thu, 09 Apr 2009)
Log Message:
-----------
Use cpu_physical_memory_write_rom instead of memcpy.

Signed-off-by: Glauber Costa <glommer@redhat.com>

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

Modified: trunk/hw/pc.c
===================================================================
--- trunk/hw/pc.c	2009-04-09 20:59:05 UTC (rev 7057)
+++ trunk/hw/pc.c	2009-04-09 21:02:04 UTC (rev 7058)
@@ -446,7 +446,7 @@
 
 /* Generate an initial boot sector which sets state and jump to
    a specified vector */
-static void generate_bootsect(uint8_t *option_rom,
+static void generate_bootsect(target_phys_addr_t option_rom,
                               uint32_t gpr[8], uint16_t segs[6], uint16_t ip)
 {
     uint8_t rom[512], *p, *reloc;
@@ -520,7 +520,7 @@
         sum += rom[i];
     rom[sizeof(rom) - 1] = -sum;
 
-    memcpy(option_rom, rom, sizeof(rom));
+    cpu_physical_memory_write_rom(option_rom, rom, sizeof(rom));
 }
 
 static long get_file_size(FILE *f)
@@ -537,7 +537,7 @@
     return size;
 }
 
-static void load_linux(uint8_t *option_rom,
+static void load_linux(target_phys_addr_t option_rom,
                        const char *kernel_filename,
 		       const char *initrd_filename,
 		       const char *kernel_cmdline)
@@ -909,7 +909,7 @@
         oprom_area_size = 0x8000;
 
     if (linux_boot) {
-        load_linux(phys_ram_base + option_rom_offset + oprom_area_size,
+        load_linux(0xc0000 + oprom_area_size,
                    kernel_filename, initrd_filename, kernel_cmdline);
         oprom_area_size += 2048;
     }

                 reply	other threads:[~2009-04-09 21:02 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=E1Ls1Ns-0003zD-Mv@cvs.savannah.gnu.org \
    --to=paul@nowt.org \
    --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).