Diff for /qemu/hw/armv7m.c between versions 1.1.1.8 and 1.1.1.9

version 1.1.1.8, 2018/04/24 19:27:49 version 1.1.1.9, 2018/04/24 19:47:34
Line 126  static int bitband_init(SysBusDevice *de Line 126  static int bitband_init(SysBusDevice *de
   
     memory_region_init_io(&s->iomem, &bitband_ops, &s->base, "bitband",      memory_region_init_io(&s->iomem, &bitband_ops, &s->base, "bitband",
                           0x02000000);                            0x02000000);
     sysbus_init_mmio_region(dev, &s->iomem);      sysbus_init_mmio(dev, &s->iomem);
     return 0;      return 0;
 }  }
   
Line 149  static void armv7m_bitband_init(void) Line 149  static void armv7m_bitband_init(void)
   
 static void armv7m_reset(void *opaque)  static void armv7m_reset(void *opaque)
 {  {
     cpu_reset((CPUState *)opaque);      cpu_state_reset((CPUARMState *)opaque);
 }  }
   
 /* Init CPU and memory for a v7-M based board.  /* Init CPU and memory for a v7-M based board.
Line 160  qemu_irq *armv7m_init(MemoryRegion *addr Line 160  qemu_irq *armv7m_init(MemoryRegion *addr
                       int flash_size, int sram_size,                        int flash_size, int sram_size,
                       const char *kernel_filename, const char *cpu_model)                        const char *kernel_filename, const char *cpu_model)
 {  {
     CPUState *env;      CPUARMState *env;
     DeviceState *nvic;      DeviceState *nvic;
     /* FIXME: make this local state.  */      /* FIXME: make this local state.  */
     static qemu_irq pic[64];      static qemu_irq pic[64];
Line 198  qemu_irq *armv7m_init(MemoryRegion *addr Line 198  qemu_irq *armv7m_init(MemoryRegion *addr
 #endif  #endif
   
     /* Flash programming is done via the SCU, so pretend it is ROM.  */      /* Flash programming is done via the SCU, so pretend it is ROM.  */
     memory_region_init_ram(flash, NULL, "armv7m.flash", flash_size);      memory_region_init_ram(flash, "armv7m.flash", flash_size);
       vmstate_register_ram_global(flash);
     memory_region_set_readonly(flash, true);      memory_region_set_readonly(flash, true);
     memory_region_add_subregion(address_space_mem, 0, flash);      memory_region_add_subregion(address_space_mem, 0, flash);
     memory_region_init_ram(sram, NULL, "armv7m.sram", sram_size);      memory_region_init_ram(sram, "armv7m.sram", sram_size);
       vmstate_register_ram_global(sram);
     memory_region_add_subregion(address_space_mem, 0x20000000, sram);      memory_region_add_subregion(address_space_mem, 0x20000000, sram);
     armv7m_bitband_init();      armv7m_bitband_init();
   
Line 235  qemu_irq *armv7m_init(MemoryRegion *addr Line 237  qemu_irq *armv7m_init(MemoryRegion *addr
     /* Hack to map an additional page of ram at the top of the address      /* Hack to map an additional page of ram at the top of the address
        space.  This stops qemu complaining about executing code outside RAM         space.  This stops qemu complaining about executing code outside RAM
        when returning from an exception.  */         when returning from an exception.  */
     memory_region_init_ram(hack, NULL, "armv7m.hack", 0x1000);      memory_region_init_ram(hack, "armv7m.hack", 0x1000);
       vmstate_register_ram_global(hack);
     memory_region_add_subregion(address_space_mem, 0xfffff000, hack);      memory_region_add_subregion(address_space_mem, 0xfffff000, hack);
   
     qemu_register_reset(armv7m_reset, env);      qemu_register_reset(armv7m_reset, env);
     return pic;      return pic;
 }  }
   
 static SysBusDeviceInfo bitband_info = {  static Property bitband_properties[] = {
     .init = bitband_init,      DEFINE_PROP_UINT32("base", BitBandState, base, 0),
     .qdev.name  = "ARM,bitband-memory",      DEFINE_PROP_END_OF_LIST(),
     .qdev.size  = sizeof(BitBandState),  };
     .qdev.props = (Property[]) {  
         DEFINE_PROP_UINT32("base", BitBandState, base, 0),  static void bitband_class_init(ObjectClass *klass, void *data)
         DEFINE_PROP_END_OF_LIST(),  {
     }      DeviceClass *dc = DEVICE_CLASS(klass);
       SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
   
       k->init = bitband_init;
       dc->props = bitband_properties;
   }
   
   static TypeInfo bitband_info = {
       .name          = "ARM,bitband-memory",
       .parent        = TYPE_SYS_BUS_DEVICE,
       .instance_size = sizeof(BitBandState),
       .class_init    = bitband_class_init,
 };  };
   
 static void armv7m_register_devices(void)  static void armv7m_register_types(void)
 {  {
     sysbus_register_withprop(&bitband_info);      type_register_static(&bitband_info);
 }  }
   
 device_init(armv7m_register_devices)  type_init(armv7m_register_types)

Removed from v.1.1.1.8  
changed lines
  Added in v.1.1.1.9


unix.superglobalmegacorp.com