Diff for /qemu/hw/omap_sx1.c between versions 1.1.1.3 and 1.1.1.4

version 1.1.1.3, 2018/04/24 17:39:27 version 1.1.1.4, 2018/04/24 18:30:00
Line 126  static void sx1_init(ram_addr_t ram_size Line 126  static void sx1_init(ram_addr_t ram_size
     static uint32_t cs1val = 0x00215070;      static uint32_t cs1val = 0x00215070;
     static uint32_t cs2val = 0x00001139;      static uint32_t cs2val = 0x00001139;
     static uint32_t cs3val = 0x00001139;      static uint32_t cs3val = 0x00001139;
     ram_addr_t phys_flash;  
     DriveInfo *dinfo;      DriveInfo *dinfo;
     int fl_idx;      int fl_idx;
     uint32_t flash_size = flash0_size;      uint32_t flash_size = flash0_size;
       int be;
   
     if (version == 2) {      if (version == 2) {
         flash_size = flash2_size;          flash_size = flash2_size;
Line 139  static void sx1_init(ram_addr_t ram_size Line 139  static void sx1_init(ram_addr_t ram_size
   
     /* External Flash (EMIFS) */      /* External Flash (EMIFS) */
     cpu_register_physical_memory(OMAP_CS0_BASE, flash_size,      cpu_register_physical_memory(OMAP_CS0_BASE, flash_size,
                     (phys_flash = qemu_ram_alloc(flash_size)) | IO_MEM_ROM);                                   qemu_ram_alloc(NULL, "omap_sx1.flash0-0",
                                                   flash_size) | IO_MEM_ROM);
   
     io = cpu_register_io_memory(static_readfn, static_writefn, &cs0val);      io = cpu_register_io_memory(static_readfn, static_writefn, &cs0val);
     cpu_register_physical_memory(OMAP_CS0_BASE + flash_size,      cpu_register_physical_memory(OMAP_CS0_BASE + flash_size,
Line 150  static void sx1_init(ram_addr_t ram_size Line 151  static void sx1_init(ram_addr_t ram_size
     cpu_register_physical_memory(OMAP_CS3_BASE, OMAP_CS3_SIZE, io);      cpu_register_physical_memory(OMAP_CS3_BASE, OMAP_CS3_SIZE, io);
   
     fl_idx = 0;      fl_idx = 0;
   #ifdef TARGET_WORDS_BIGENDIAN
       be = 1;
   #else
       be = 0;
   #endif
   
     if ((dinfo = drive_get(IF_PFLASH, 0, fl_idx)) != NULL) {      if ((dinfo = drive_get(IF_PFLASH, 0, fl_idx)) != NULL) {
         if (!pflash_cfi01_register(OMAP_CS0_BASE, qemu_ram_alloc(flash_size),          if (!pflash_cfi01_register(OMAP_CS0_BASE, qemu_ram_alloc(NULL,
             dinfo->bdrv, sector_size, flash_size / sector_size,                                     "omap_sx1.flash0-1", flash_size),
             4, 0, 0, 0, 0)) {                                     dinfo->bdrv, sector_size,
                                      flash_size / sector_size,
                                      4, 0, 0, 0, 0, be)) {
             fprintf(stderr, "qemu: Error registering flash memory %d.\n",              fprintf(stderr, "qemu: Error registering flash memory %d.\n",
                            fl_idx);                             fl_idx);
         }          }
Line 164  static void sx1_init(ram_addr_t ram_size Line 172  static void sx1_init(ram_addr_t ram_size
     if ((version == 1) &&      if ((version == 1) &&
             (dinfo = drive_get(IF_PFLASH, 0, fl_idx)) != NULL) {              (dinfo = drive_get(IF_PFLASH, 0, fl_idx)) != NULL) {
         cpu_register_physical_memory(OMAP_CS1_BASE, flash1_size,          cpu_register_physical_memory(OMAP_CS1_BASE, flash1_size,
                         (phys_flash = qemu_ram_alloc(flash1_size)) |                                       qemu_ram_alloc(NULL, "omap_sx1.flash1-0",
                         IO_MEM_ROM);                                                      flash1_size) | IO_MEM_ROM);
         io = cpu_register_io_memory(static_readfn, static_writefn, &cs1val);          io = cpu_register_io_memory(static_readfn, static_writefn, &cs1val);
         cpu_register_physical_memory(OMAP_CS1_BASE + flash1_size,          cpu_register_physical_memory(OMAP_CS1_BASE + flash1_size,
                         OMAP_CS1_SIZE - flash1_size, io);                          OMAP_CS1_SIZE - flash1_size, io);
   
         if (!pflash_cfi01_register(OMAP_CS1_BASE, qemu_ram_alloc(flash1_size),          if (!pflash_cfi01_register(OMAP_CS1_BASE, qemu_ram_alloc(NULL,
             dinfo->bdrv, sector_size, flash1_size / sector_size,                                     "omap_sx1.flash1-1", flash1_size),
             4, 0, 0, 0, 0)) {                                     dinfo->bdrv, sector_size,
                                      flash1_size / sector_size,
                                      4, 0, 0, 0, 0, be)) {
             fprintf(stderr, "qemu: Error registering flash memory %d.\n",              fprintf(stderr, "qemu: Error registering flash memory %d.\n",
                            fl_idx);                             fl_idx);
         }          }
Line 189  static void sx1_init(ram_addr_t ram_size Line 199  static void sx1_init(ram_addr_t ram_size
   
     /* Load the kernel.  */      /* Load the kernel.  */
     if (kernel_filename) {      if (kernel_filename) {
         /* Start at bootloader.  */  
         cpu->env->regs[15] = sx1_binfo.loader_start;  
   
         sx1_binfo.kernel_filename = kernel_filename;          sx1_binfo.kernel_filename = kernel_filename;
         sx1_binfo.kernel_cmdline = kernel_cmdline;          sx1_binfo.kernel_cmdline = kernel_cmdline;
         sx1_binfo.initrd_filename = initrd_filename;          sx1_binfo.initrd_filename = initrd_filename;
         arm_load_kernel(cpu->env, &sx1_binfo);          arm_load_kernel(cpu->env, &sx1_binfo);
     } else {  
         cpu->env->regs[15] = 0x00000000;  
     }      }
   
     /* TODO: fix next line */      /* TODO: fix next line */

Removed from v.1.1.1.3  
changed lines
  Added in v.1.1.1.4


unix.superglobalmegacorp.com