]>
Commit | Line | Data |
---|---|---|
2a6a4076 MA |
1 | #ifndef OPENPIC_H |
2 | #define OPENPIC_H | |
b7169916 | 3 | |
8935a442 | 4 | #include "qemu-common.h" |
741da0d3 | 5 | #include "hw/qdev-core.h" |
7d0c99a9 | 6 | #include "qom/cpu.h" |
8935a442 | 7 | |
e1766344 AF |
8 | #define TYPE_OPENPIC "openpic" |
9 | ||
b7169916 AJ |
10 | /* OpenPIC have 5 outputs per CPU connected and one IRQ out single output */ |
11 | enum { | |
12 | OPENPIC_OUTPUT_INT = 0, /* IRQ */ | |
13 | OPENPIC_OUTPUT_CINT, /* critical IRQ */ | |
14 | OPENPIC_OUTPUT_MCK, /* Machine check event */ | |
15 | OPENPIC_OUTPUT_DEBUG, /* Inconditional debug event */ | |
16 | OPENPIC_OUTPUT_RESET, /* Core reset event */ | |
17 | OPENPIC_OUTPUT_NB, | |
18 | }; | |
19 | ||
d0b72631 AG |
20 | #define OPENPIC_MODEL_RAVEN 0 |
21 | #define OPENPIC_MODEL_FSL_MPIC_20 1 | |
e0dfe5b1 | 22 | #define OPENPIC_MODEL_FSL_MPIC_42 2 |
5861a338 | 23 | |
8935a442 SW |
24 | #define OPENPIC_MAX_SRC 256 |
25 | #define OPENPIC_MAX_TMR 4 | |
26 | #define OPENPIC_MAX_IPI 4 | |
27 | #define OPENPIC_MAX_IRQ (OPENPIC_MAX_SRC + OPENPIC_MAX_IPI + \ | |
28 | OPENPIC_MAX_TMR) | |
29 | ||
dd49c038 | 30 | #define TYPE_KVM_OPENPIC "kvm-openpic" |
d85937e6 | 31 | int kvm_openpic_connect_vcpu(DeviceState *d, CPUState *cs); |
8935a442 | 32 | |
2a6a4076 | 33 | #endif /* OPENPIC_H */ |