1. 09 9月, 2015 2 次提交
    • P
      hw/intc/arm_gic: Fix handling of GICC_APR<n>, GICC_NSAPR<n> registers · 51fd06e0
      Peter Maydell 提交于
      A GICv2 has both GICC_APR<n> and GICC_NSAPR<n> registers, with
      the latter holding the active priority bits for Group 1 interrupts
      (usually Nonsecure interrupts), and the Nonsecure view of the
      GICC_APR<n> is the second half of the GICC_NSAPR<n> registers.
      Turn our half-hearted implementation of APR<n> into a proper
      implementation of both APR<n> and NSAPR<n>:
      
       * Add the underlying state for NSAPR<n>
       * Make sure APR<n> aren't visible for pre-GICv2
       * Implement reading of NSAPR<n>
       * Make non-secure reads of APR<n> behave correctly
       * Implement writing to APR<n> and NSAPR<n>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1438089748-5528-4-git-send-email-peter.maydell@linaro.org
      51fd06e0
    • P
      hw/intc/arm_gic: Running priority is group priority, not full priority · df92cfa6
      Peter Maydell 提交于
      Priority values for the GIC are divided into a "group priority"
      and a "subpriority" (with the division being determined by the
      binary point register). The running priority is only determined
      by the group priority of the active interrupts, not the
      subpriority. In particular, this means that there can't be more
      than one active interrupt at any particular group priority.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1438089748-5528-3-git-send-email-peter.maydell@linaro.org
      df92cfa6
  2. 13 8月, 2015 1 次提交
  3. 16 6月, 2015 1 次提交
  4. 12 5月, 2015 13 次提交
  5. 19 3月, 2015 1 次提交
    • S
      Fix remaining warnings from Sparse (void return) · e7ae771f
      Stefan Weil 提交于
      Sparse report:
      
      hw/display/vga.c:2000:5: warning: returning void-valued expression
      hw/intc/arm_gic.c:707:9: warning: returning void-valued expression
      hw/intc/etraxfs_pic.c:138:9: warning: returning void-valued expression
      hw/nvram/fw_cfg.c:475:5: warning: returning void-valued expression
      hw/timer/a9gtimer.c:124:5: warning: returning void-valued expression
      hw/tpm/tpm_tis.c:794:5: warning: returning void-valued expression
      hw/usb/hcd-musb.c:558:9: warning: returning void-valued expression
      hw/usb/hcd-musb.c:776:13: warning: returning void-valued expression
      hw/usb/hcd-musb.c:867:5: warning: returning void-valued expression
      hw/usb/hcd-musb.c:932:5: warning: returning void-valued expression
      include/qom/cpu.h:584:5: warning: returning void-valued expression
      monitor.c:4686:13: warning: returning void-valued expression
      monitor.c:4690:13: warning: returning void-valued expression
      
      Cc: Edgar E. Iglesias <edgar.iglesias@gmail.com>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Cc: Andreas Färber <afaerber@suse.de>
      Cc: Luiz Capitulino <lcapitulino@redhat.com>
      Signed-off-by: NStefan Weil <sw@weilnetz.de>
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      e7ae771f
  6. 24 10月, 2014 1 次提交
  7. 29 8月, 2014 4 次提交
  8. 06 5月, 2014 1 次提交
  9. 20 2月, 2014 1 次提交
  10. 08 2月, 2014 4 次提交
    • C
      arm_gic: Add GICC_APRn state to the GICState · a9d477c4
      Christoffer Dall 提交于
      The GICC_APRn registers are not currently supported by the ARM GIC v2.0
      emulation.  This patch adds the missing state.
      
      Note that we also change the number of APRs to use a define GIC_NR_APRS
      based on the maximum number of preemption levels.  This patch also adds
      RAZ/WI accessors for the four registers on the emulated CPU interface.
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NChristoffer Dall <christoffer.dall@linaro.org>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      a9d477c4
    • C
      arm_gic: Support setting/getting binary point reg · aa7d461a
      Christoffer Dall 提交于
      Add a binary_point field to the gic emulation structure and support
      setting/getting this register now when we have it.  We don't actually
      support interrupt grouping yet, oh well.
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NChristoffer Dall <christoffer.dall@linaro.org>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      aa7d461a
    • C
      arm_gic: Keep track of SGI sources · 40d22500
      Christoffer Dall 提交于
      Right now the arm gic emulation doesn't keep track of the source of an
      SGI (which apparently Linux guests don't use, or they're fine with
      assuming CPU 0 always).
      
      Add the necessary matrix on the GICState structure and maintain the data
      when setting and clearing the pending state of an IRQ and make the state
      visible to the guest.
      
      Note that we always choose to present the source as the lowest-numbered
      CPU in case multiple cores have signalled the same SGI number to a core
      on the system.
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NChristoffer Dall <christoffer.dall@linaro.org>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      40d22500
    • C
      arm_gic: Fix GIC pending behavior · 8d999995
      Christoffer Dall 提交于
      The existing implementation of the pending behavior in gic_set_irq,
      gic_complete_irq, and the distributor pending set/clear registers does
      not follow the semantics of the GICv2.0 specs, but may implement the
      11MPCore support.  Therefore, maintain the existing semantics for
      11MPCore and v7M NVIC and change the behavior to be in accordance with
      the GICv2.0 specs for "generic implementations" (s->revision == 1 ||
      s->revision == 2).
      
      Generic implementations distinguish between setting a level-triggered
      interrupt pending through writes to the GICD_ISPENDR and when hardware
      raises the interrupt line.  Writing to the GICD_ICPENDR will not cause
      the interrupt to become non-pending if the line is still active, and
      conversely, if the line is deactivated but the interrupt is marked as
      pending through a write to GICD_ISPENDR, the interrupt remains pending.
      Handle this situation in the GIC_TEST_PENDING (which now becomes a
      static inline named gic_test_pending) and let the 'pending' field
      correspond only to the latched state of the D-flip flop in the GICv2.0
      specs Figure 4-10.
      
      The following changes are added:
      
      gic_test_pending:
      Make this a static inline and split out the 11MPCore from the generic
      behavior.  For the generic behavior, consider interrupts pending if:
          ((s->irq_state[irq].pending & (cm) != 0) ||
             (!GIC_TEST_EDGE_TRIGGER(irq) && GIC_TEST_LEVEL(irq, cm))
      
      gic_set_irq:
      Split out the 11MPCore from the generic behavior.  For the generic
      behavior, always GIC_SET_LEVEL() on positive level, but only
      GIC_SET_PENDING for edge-triggered interrupts and always simply
      GIC_CLEAR_LEVEL() on negative level.
      
      gic_complete_irq:
      Only resample the line for line-triggered interrupts on an 11MPCore.
      Generic implementations will sample the line directly in
      gic_test_pending().
      Signed-off-by: NChristoffer Dall <christoffer.dall@linaro.org>
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      8d999995
  11. 31 1月, 2014 2 次提交
  12. 09 1月, 2014 2 次提交
  13. 08 1月, 2014 2 次提交
  14. 23 12月, 2013 2 次提交
    • M
      sysbus: Set cannot_instantiate_with_device_add_yet · 837d3716
      Markus Armbruster 提交于
      device_add plugs devices into suitable bus.  For "real" buses, that
      actually connects the device.  For sysbus, the connections need to be
      made separately, and device_add can't do that.  The device would be
      left unconnected, and could not possibly work.
      
      Quite a few, but not all sysbus devices already set
      cannot_instantiate_with_device_add_yet in their class init function.
      
      Set it in their abstract base's class init function
      sysbus_device_class_init(), and remove the now redundant assignments
      from device class init functions.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NMarcel Apfelbaum <marcel.a@redhat.com>
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      837d3716
    • M
      qdev: Replace no_user by cannot_instantiate_with_device_add_yet · efec3dd6
      Markus Armbruster 提交于
      In an ideal world, machines can be built by wiring devices together
      with configuration, not code.  Unfortunately, that's not the world we
      live in right now.  We still have quite a few devices that need to be
      wired up by code.  If you try to device_add such a device, it'll fail
      in sometimes mysterious ways.  If you're lucky, you get an
      unmysterious immediate crash.
      
      To protect users from such badness, DeviceClass member no_user used to
      make device models unavailable with -device / device_add, but that
      regressed in commit 18b6dade.  The device model is still omitted from
      help, but is available anyway.
      
      Attempts to fix the regression have been rejected with the argument
      that the purpose of no_user isn't clear, and it's prone to misuse.
      
      This commit clarifies no_user's purpose.  Anthony suggested to rename
      it cannot_instantiate_with_device_add_yet_due_to_internal_bugs, which
      I shorten somewhat to keep checkpatch happy.  While there, make it
      bool.
      
      Every use of cannot_instantiate_with_device_add_yet gets a FIXME
      comment asking for rationale.  The next few commits will clean them
      all up, either by providing a rationale, or by getting rid of the use.
      
      With that done, the regression fix is hopefully acceptable.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NMarcel Apfelbaum <marcel.a@redhat.com>
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      efec3dd6
  15. 30 7月, 2013 1 次提交
  16. 10 7月, 2013 2 次提交