goldfish_pic.h 594 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * SPDX-License-Identifier: GPL-2.0-or-later
  3. *
  4. * Goldfish PIC
  5. *
  6. * (c) 2020 Laurent Vivier <laurent@vivier.eu>
  7. *
  8. */
  9. #ifndef HW_INTC_GOLDFISH_PIC_H
  10. #define HW_INTC_GOLDFISH_PIC_H
  11. #include "hw/sysbus.h"
  12. #define TYPE_GOLDFISH_PIC "goldfish_pic"
  13. OBJECT_DECLARE_SIMPLE_TYPE(GoldfishPICState, GOLDFISH_PIC)
  14. #define GOLDFISH_PIC_IRQ_NB 32
  15. struct GoldfishPICState {
  16. SysBusDevice parent_obj;
  17. MemoryRegion iomem;
  18. qemu_irq irq;
  19. uint32_t pending;
  20. uint32_t enabled;
  21. /* statistics */
  22. uint64_t stats_irq_count[32];
  23. /* for tracing */
  24. uint8_t idx;
  25. };
  26. #endif