// creates VIC 
sysbus_create_varargs("pl190", 0x10140000, ARM_CPU_IRQ, ARM_CPU_FIQ)
  qdev_create
    pl190_init
      // input GPIO, 32 inputs, set input handler
      qdev_init_gpio_in(..,pl190_set_irq,32)
      // output GPIO, 2 outputs
      sysbus_init_irq(... &s->irq)
      sysbus_init_irq(... &s->frq)
    // connect pl190 GPIO out to CPU GPIO in
    sysbus_connect_irq(n, IRQ or FIO)
      
pl190_set_irq will be called if any input GPIO were raised. 
// PL190's interrupt handler
pl190_set_irq, 
  pl190_update
    // raise the GPIO output, which connects to CPU's GPIO input
    qemu_set_irq(s->irq, ...)
    qemu_set_irq(s->frq, ...)
// CPU's interrupt handler
arm_cpu_set_irq
  cpu_interrupt
    tcg_handle_interrupt
2015/04/27
Qemu Interrupt Simulation
This is an example.
Subscribe to:
Post Comments (Atom)
Post Code on Blogger
Simplest way to post code to blogger for me: <pre style="background: #f0f0f0; border: 1px dashed #CCCCCC; color: black;overflow-x:...
- 
Explain There is not interrupt PIN for PCIe interrupt. When device wants to raise an interrupt, an interrupt message is sent to host via ...
 - 
Configure Space Addressing One of the major improvements the PCI Local Bus had over other I/O architectures was its configuration mechanism...
 - 
What is LMA and VMA Every loadable or allocatable output section has two addresses. The first is the VMA, or virtual memory address. This ...
 
No comments:
Post a Comment