Diff for /qemu/hw/etraxfs.c between versions 1.1.1.4 and 1.1.1.5

version 1.1.1.4, 2018/04/24 17:24:28 version 1.1.1.5, 2018/04/24 17:38:52
Line 28 Line 28
 #include "net.h"  #include "net.h"
 #include "flash.h"  #include "flash.h"
 #include "etraxfs.h"  #include "etraxfs.h"
   #include "loader.h"
   #include "elf.h"
   
 #define FLASH_SIZE 0x2000000  #define FLASH_SIZE 0x2000000
 #define INTMEM_SIZE (128 * 1024)  #define INTMEM_SIZE (128 * 1024)
Line 55  void bareetraxfs_init (ram_addr_t ram_si Line 57  void bareetraxfs_init (ram_addr_t ram_si
     void *etraxfs_dmac;      void *etraxfs_dmac;
     struct etraxfs_dma_client *eth[2] = {NULL, NULL};      struct etraxfs_dma_client *eth[2] = {NULL, NULL};
     int kernel_size;      int kernel_size;
       DriveInfo *dinfo;
     int i;      int i;
     ram_addr_t phys_ram;      ram_addr_t phys_ram;
     ram_addr_t phys_flash;      ram_addr_t phys_flash;
Line 79  void bareetraxfs_init (ram_addr_t ram_si Line 82  void bareetraxfs_init (ram_addr_t ram_si
   
   
     phys_flash = qemu_ram_alloc(FLASH_SIZE);      phys_flash = qemu_ram_alloc(FLASH_SIZE);
     i = drive_get_index(IF_PFLASH, 0, 0);      dinfo = drive_get(IF_PFLASH, 0, 0);
     pflash_cfi02_register(0x0, phys_flash,      pflash_cfi02_register(0x0, phys_flash,
                           i != -1 ? drives_table[i].bdrv : NULL, (64 * 1024),                            dinfo ? dinfo->bdrv : NULL, (64 * 1024),
                           FLASH_SIZE >> 16,                            FLASH_SIZE >> 16,
                           1, 2, 0x0000, 0x0000, 0x0000, 0x0000,                            1, 2, 0x0000, 0x0000, 0x0000, 0x0000,
                           0x555, 0x2aa);                            0x555, 0x2aa);
Line 89  void bareetraxfs_init (ram_addr_t ram_si Line 92  void bareetraxfs_init (ram_addr_t ram_si
     dev = qdev_create(NULL, "etraxfs,pic");      dev = qdev_create(NULL, "etraxfs,pic");
     /* FIXME: Is there a proper way to signal vectors to the CPU core?  */      /* FIXME: Is there a proper way to signal vectors to the CPU core?  */
     qdev_prop_set_ptr(dev, "interrupt_vector", &env->interrupt_vector);      qdev_prop_set_ptr(dev, "interrupt_vector", &env->interrupt_vector);
     qdev_init(dev);      qdev_init_nofail(dev);
     s = sysbus_from_qdev(dev);      s = sysbus_from_qdev(dev);
     sysbus_mmio_map(s, 0, 0x3001c000);      sysbus_mmio_map(s, 0, 0x3001c000);
     sysbus_connect_irq(s, 0, cpu_irq[0]);      sysbus_connect_irq(s, 0, cpu_irq[0]);
Line 135  void bareetraxfs_init (ram_addr_t ram_si Line 138  void bareetraxfs_init (ram_addr_t ram_si
         /* Boots a kernel elf binary, os/linux-2.6/vmlinux from the axis           /* Boots a kernel elf binary, os/linux-2.6/vmlinux from the axis 
            devboard SDK.  */             devboard SDK.  */
         kernel_size = load_elf(kernel_filename, -0x80000000LL,          kernel_size = load_elf(kernel_filename, -0x80000000LL,
                                &entry, NULL, &high);                                 &entry, NULL, &high, 0, ELF_MACHINE, 0);
         bootstrap_pc = entry;          bootstrap_pc = entry;
         if (kernel_size < 0) {          if (kernel_size < 0) {
             /* Takes a kimage from the axis devboard SDK.  */              /* Takes a kimage from the axis devboard SDK.  */
Line 154  void bareetraxfs_init (ram_addr_t ram_si Line 157  void bareetraxfs_init (ram_addr_t ram_si
             /* Let the kernel know we are modifying the cmdline.  */              /* Let the kernel know we are modifying the cmdline.  */
             env->regs[10] = 0x87109563;              env->regs[10] = 0x87109563;
             env->regs[11] = 0x40000000;              env->regs[11] = 0x40000000;
             pstrcpy_targphys(env->regs[11], 256, kernel_cmdline);              pstrcpy_targphys("cmdline", env->regs[11], 256, kernel_cmdline);
         }          }
     }      }
     env->pc = bootstrap_pc;      env->pc = bootstrap_pc;

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


unix.superglobalmegacorp.com