1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25#ifndef XLNX_SCU_GIC_H
26#define XLNX_SCU_GIC_H
27
28#include "arm_gic.h"
29
30#define TYPE_XLNX_SCU_GIC "xlnx,zynqmp-scugic"
31
32#define XLNX_SCU_GIC(obj) \
33 OBJECT_CHECK(XlnxSCUGICState, (obj), TYPE_XLNX_SCU_GIC)
34#define XLNX_SCU_GIC_CLASS(klass) \
35 OBJECT_CLASS_CHECK(XlnxSCUGICClass, (klass), TYPE_XLNX_SCU_GIC)
36#define XLNX_SCU_GIC_GET_CLASS(obj) \
37 OBJECT_GET_CLASS(XlnxSCUGICClass, (obj), TYPE_XLNX_SCU_GIC)
38
39#define XLNX_SCU_GIC_MAX_INJECTOR 2
40#define XLNX_SCU_GIC_IRQ_REG 5
41
42struct XlnxSCUGICState {
43
44 GICState parent;
45
46
47 uint32_t intr_inj[XLNX_SCU_GIC_MAX_INJECTOR][XLNX_SCU_GIC_IRQ_REG];
48 uint32_t ext_level[XLNX_SCU_GIC_IRQ_REG];
49};
50
51typedef struct XlnxSCUGICState XlnxSCUGICState;
52
53struct XlnxSCUGICClass {
54
55 ARMGICClass parent_class;
56
57
58 qemu_irq_handler parent_irq_handler;
59};
60
61typedef struct XlnxSCUGICClass XlnxSCUGICClass;
62
63void xlnx_scu_gic_set_intr(XlnxSCUGICState *s, unsigned int reg, uint32_t val,
64 uint8_t injector);
65
66#endif
67