/[qemu]/qemu/hw/ppc_prep.c
ViewVC logotype

Diff of /qemu/hw/ppc_prep.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.21 by bellard, Sun Jul 3 13:57:11 2005 UTC revision 1.22 by bellard, Sun Jul 3 16:00:49 2005 UTC
# Line 526  static void ppc_prep_init(int ram_size, Line 526  static void ppc_prep_init(int ram_size,
526      char buf[1024];      char buf[1024];
527      m48t59_t *nvram;      m48t59_t *nvram;
528      int PPC_io_memory;      int PPC_io_memory;
529      int ret, linux_boot, i, nb_nics1;      int linux_boot, i, nb_nics1, bios_size;
530      unsigned long bios_offset;      unsigned long bios_offset;
531      uint32_t kernel_base, kernel_size, initrd_base, initrd_size;      uint32_t kernel_base, kernel_size, initrd_base, initrd_size;
532      ppc_def_t *def;      ppc_def_t *def;
# Line 544  static void ppc_prep_init(int ram_size, Line 544  static void ppc_prep_init(int ram_size,
544      /* allocate and load BIOS */      /* allocate and load BIOS */
545      bios_offset = ram_size + vga_ram_size;      bios_offset = ram_size + vga_ram_size;
546      snprintf(buf, sizeof(buf), "%s/%s", bios_dir, BIOS_FILENAME);      snprintf(buf, sizeof(buf), "%s/%s", bios_dir, BIOS_FILENAME);
547      ret = load_image(buf, phys_ram_base + bios_offset);      bios_size = load_image(buf, phys_ram_base + bios_offset);
548      if (ret != BIOS_SIZE) {      if (bios_size < 0 || bios_size > BIOS_SIZE) {
549          fprintf(stderr, "qemu: could not load PPC PREP bios '%s'\n", buf);          fprintf(stderr, "qemu: could not load PPC PREP bios '%s'\n", buf);
550          exit(1);          exit(1);
551      }      }
552      cpu_register_physical_memory((uint32_t)(-BIOS_SIZE),      bios_size = (bios_size + 0xfff) & ~0xfff;
553                                   BIOS_SIZE, bios_offset | IO_MEM_ROM);      cpu_register_physical_memory((uint32_t)(-bios_size),
554                                     bios_size, bios_offset | IO_MEM_ROM);
555    
556      if (linux_boot) {      if (linux_boot) {
557          kernel_base = KERNEL_LOAD_ADDR;          kernel_base = KERNEL_LOAD_ADDR;

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26