Diff for /qemu/hw/realview_gic.c between versions 1.1.1.2 and 1.1.1.3

version 1.1.1.2, 2018/04/24 16:52:42 version 1.1.1.3, 2018/04/24 17:23:46
Line 7 Line 7
  * This code is licenced under the GPL.   * This code is licenced under the GPL.
  */   */
   
 #include "hw.h"  #include "sysbus.h"
 #include "primecell.h"  
   
 #define GIC_NIRQ 96  #define GIC_NIRQ 96
 #define NCPU 1  #define NCPU 1
Line 22  gic_get_current_cpu(void) Line 21  gic_get_current_cpu(void)
   
 #include "arm_gic.c"  #include "arm_gic.c"
   
   typedef struct {
       gic_state gic;
       int iomemtype;
   } RealViewGICState;
   
 static uint32_t realview_gic_cpu_read(void *opaque, target_phys_addr_t offset)  static uint32_t realview_gic_cpu_read(void *opaque, target_phys_addr_t offset)
 {  {
     gic_state *s = (gic_state *)opaque;      gic_state *s = (gic_state *)opaque;
Line 47  static CPUWriteMemoryFunc *realview_gic_ Line 51  static CPUWriteMemoryFunc *realview_gic_
    realview_gic_cpu_write     realview_gic_cpu_write
 };  };
   
 qemu_irq *realview_gic_init(uint32_t base, qemu_irq parent_irq)  static void realview_gic_map(SysBusDevice *dev, target_phys_addr_t base)
 {  {
     gic_state *s;      RealViewGICState *s = FROM_SYSBUSGIC(RealViewGICState, dev);
     int iomemtype;      cpu_register_physical_memory(base, 0x1000, s->iomemtype);
       cpu_register_physical_memory(base + 0x1000, 0x1000, s->gic.iomemtype);
   }
   
   static void realview_gic_init(SysBusDevice *dev)
   {
       RealViewGICState *s = FROM_SYSBUSGIC(RealViewGICState, dev);
   
     s = gic_init(base + 0x1000, &parent_irq);      gic_init(&s->gic);
     if (!s)      s->iomemtype = cpu_register_io_memory(realview_gic_cpu_readfn,
         return NULL;                                            realview_gic_cpu_writefn, s);
     iomemtype = cpu_register_io_memory(0, realview_gic_cpu_readfn,      sysbus_init_mmio_cb(dev, 0x2000, realview_gic_map);
                                        realview_gic_cpu_writefn, s);  
     cpu_register_physical_memory(base, 0x00001000, iomemtype);  
     return s->in;  
 }  }
   
   static void realview_gic_register_devices(void)
   {
       sysbus_register_dev("realview_gic", sizeof(RealViewGICState),
                           realview_gic_init);
   }
   
   device_init(realview_gic_register_devices)

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


unix.superglobalmegacorp.com