qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [7058] Use cpu_physical_memory_write_rom instead of memcpy.
@ 2009-04-09 21:02 Paul Brook
  0 siblings, 0 replies; only message in thread
From: Paul Brook @ 2009-04-09 21:02 UTC (permalink / raw)
  To: qemu-devel

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;
     }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-04-09 21:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-09 21:02 [Qemu-devel] [7058] Use cpu_physical_memory_write_rom instead of memcpy Paul Brook

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).