4 #include <asm/aa64_gic.h>
6 #include "gic-common.h"
8 #define PAGE_64K (1 << 16)
9 #define GIC_FRAME_SIZE PAGE_64K
13 FIELD_AT(u32_t, ctlr, 0x0000);
14 FIELD_AT(u32_t, iidr, 0x0004);
15 FIELD_AT(u64_t, typer, 0x0008);
18 FIELD_AT(u64_t, setlpir, 0x0040);
19 FIELD_AT(u64_t, clrlpir, 0x0048);
21 FIELD_AT(u64_t, propbaser, 0x0070);
22 FIELD_AT(u64_t, pendbaser, 0x0078);
23 FIELD_AT(u64_t, invlpir, 0x00a0);
24 FIELD_AT(u64_t, invllr, 0x00b0);
25 FIELD_AT(u64_t, syncr, 0x00c0);
30 FIELD_AT(u32_t, igroupr0, 0x0080);
31 ARRAY_AT(u32_t, igroupr_e, 0x0084, 0x0088);
33 FIELD_AT(u32_t, isenabler0, 0x0100);
34 ARRAY_AT(u32_t, isenabler_e, 0x0104, 0x0108);
36 FIELD_AT(u32_t, icenabler0, 0x0180);
37 ARRAY_AT(u32_t, icenabler_e, 0x0184, 0x0188);
39 FIELD_AT(u32_t, ispendr0, 0x0200);
40 ARRAY_AT(u32_t, ispendr_e, 0x0204, 0x0208);
42 FIELD_AT(u32_t, icpendr0, 0x280);
43 ARRAY_AT(u32_t, icpendr_e, 0x284, 0x0288);
45 FIELD_AT(u32_t, isactiver0, 0x300);
46 ARRAY_AT(u32_t, isactiver_e, 0x304, 0x0308);
48 FIELD_AT(u32_t, icactiver0, 0x380);
49 ARRAY_AT(u32_t, icactiver_e, 0x384, 0x0388);
51 ARRAY_AT(u32_t, ipriorityr, 0x0400, 0x041c);
52 ARRAY_AT(u32_t, ipriorityr_e, 0x0420, 0x045c);
54 FIELD_AT(u32_t, icfgr0, 0x0c00);
55 FIELD_AT(u32_t, icfgr1, 0x0c04);
56 ARRAY_AT(u32_t, icfgr_e, 0x0c08, 0x0c14);
58 FIELD_AT(u32_t, igrpmodr, 0x0d00);
59 ARRAY_AT(u32_t, igrpmodr_e, 0x0d04, 0x0d08);
61 FIELD_AT(u32_t, inmir, 0x0f80);
62 ARRAY_AT(u32_t, inmir_e, 0x0f84, 0x0ffc);
67 FIELD_AT(u32_t, ctlr, 0x0000 );
68 FIELD_AT(u32_t, typer, 0x0004 );
69 FIELD_AT(u32_t, iidr, 0x0008 );
71 FIELD_AT(u32_t, setspi_nsr, 0x0040 );
72 FIELD_AT(u32_t, clrspi_nsr, 0x0048 );
73 FIELD_AT(u32_t, setspi_sr, 0x0050 );
74 FIELD_AT(u32_t, clrspi_sr, 0x0058 );
77 ARRAY_AT(u32_t, igroupr, 0x0084, 0x00fc);
78 ARRAY_AT(u32_t, isenabler, 0x0100, 0x017c);
79 ARRAY_AT(u32_t, icenabler, 0x0180, 0x01fc);
80 ARRAY_AT(u32_t, ispendr, 0x0200, 0x027c);
81 ARRAY_AT(u32_t, icpendr, 0x0280, 0x02fc);
82 ARRAY_AT(u32_t, isactiver, 0x0300, 0x037c);
83 ARRAY_AT(u32_t, icactiver, 0x0380, 0x03fc);
84 ARRAY_AT(u32_t, ipriorityr, 0x0400, 0x07f8);
85 ARRAY_AT(u32_t, itargetsr, 0x0800, 0x0bf8);
86 ARRAY_AT(u32_t, icfgr, 0x0c00, 0x0cfc);
87 ARRAY_AT(u32_t, igrpmodr, 0x0d00, 0x0d7c);
88 ARRAY_AT(u32_t, inmir, 0x0f80, 0x0ffc);
91 ARRAY_AT(u32_t, igroupr_e, 0x1000, 0x107c);
92 ARRAY_AT(u32_t, isenabler_e, 0x1200, 0x127c);
93 ARRAY_AT(u32_t, icenabler_e, 0x1400, 0x147c);
94 ARRAY_AT(u32_t, ispendr_e, 0x1600, 0x167c);
95 ARRAY_AT(u32_t, icpendr_e, 0x1800, 0x187c);
96 ARRAY_AT(u32_t, isactiver_e, 0x1a00, 0x1a7c);
97 ARRAY_AT(u32_t, icactiver_e, 0x1c00, 0x1c7c);
98 ARRAY_AT(u32_t, ipriorityr_e, 0x2000, 0x23fc);
99 ARRAY_AT(u32_t, icfgr_e, 0x3000, 0x30fc);
100 ARRAY_AT(u32_t, igrpmodr_e, 0x3400, 0x347c);
101 ARRAY_AT(u32_t, inmir_e, 0x3b00, 0x3b7c);
103 ARRAY_AT(u64_t, irouter, 0x6100, 0x7fd8);
104 ARRAY_AT(u64_t, irouter_e, 0x8000, 0x9ffc);
109 FIELD_AT(u32_t, ctlr, 0x0000 );
110 FIELD_AT(u32_t, pmr, 0x0004 );
111 FIELD_AT(u32_t, bpr, 0x0008 );
112 FIELD_AT(u32_t, iar, 0x000c );
113 FIELD_AT(u32_t, eoir, 0x0010 );
114 FIELD_AT(u32_t, ppr, 0x0014 );
116 FIELD_AT(u32_t, iidr, 0x00fc );
117 FIELD_AT(u32_t, dir, 0x1000 );
122 FIELD_AT(u32_t, ctlr, 0x0000 );
123 FIELD_AT(u32_t, iidr, 0x0004 );
124 FIELD_AT(u32_t, typer, 0x0008 );
125 FIELD_AT(u64_t, cbaser, 0x0080 );
126 FIELD_AT(u64_t, cwriter, 0x0088 );
127 FIELD_AT(u64_t, creadr, 0x0090 );
128 ARRAY_AT(u64_t, basern, 0x0100, 0x0138);
131 union v3_its_translation
133 FIELD_AT(u32_t, translater, 0x0040 );
139 union v3_rdbase_map* red;
140 union v3_sgibase_map* red_sgi;
141 union v3_gicd_map* distr;
142 union v3_gicc_map* icc;
151 union v3_rdbase_map* gicr;
156 union v3_rdbase_map* gicr_sgi;
177 u8_t free_map[PAGE_SIZE / 256 / 8];
197 union v3_its_regs* gits;
202 union v3_its_translation* gtrn;
205 struct v3_itt_alloc itt_alloc;
208 struct v3_its_cmd *cmdq;
218 union v3_gicd_map* gicd;
224 #define v3distr(gic) ((struct v3_distr*)(gic)->impl)
225 #define v3pe(pe) ((struct v3_pe*)(pe)->impl)
227 #define v3distr_class(class) v3distr(gic_global_context_of(class))
228 #define v3pe_class(local_class) v3distr(gic_local_context_of(local_class))
230 #endif /* __LUNAIX_V3_H */