1 #if !defined(__OPENPIC_H__) 2 #define __OPENPIC_H__ 3 4 #include "qemu-common.h" 5 #include "hw/qdev.h" 6 7 /* OpenPIC have 5 outputs per CPU connected and one IRQ out single output */ 8 enum { 9 OPENPIC_OUTPUT_INT = 0, /* IRQ */ 10 OPENPIC_OUTPUT_CINT, /* critical IRQ */ 11 OPENPIC_OUTPUT_MCK, /* Machine check event */ 12 OPENPIC_OUTPUT_DEBUG, /* Inconditional debug event */ 13 OPENPIC_OUTPUT_RESET, /* Core reset event */ 14 OPENPIC_OUTPUT_NB, 15 }; 16 17 #define OPENPIC_MODEL_RAVEN 0 18 #define OPENPIC_MODEL_FSL_MPIC_20 1 19 #define OPENPIC_MODEL_FSL_MPIC_42 2 20 21 #define OPENPIC_MAX_SRC 256 22 #define OPENPIC_MAX_TMR 4 23 #define OPENPIC_MAX_IPI 4 24 #define OPENPIC_MAX_IRQ (OPENPIC_MAX_SRC + OPENPIC_MAX_IPI + \ 25 OPENPIC_MAX_TMR) 26 27 DeviceState *kvm_openpic_create(BusState *bus, int model); 28 29 #endif /* __OPENPIC_H__ */ 30