46 #include "debug/GIC.hh" 57 redistributor(nullptr),
90 if (hcr.tge && hcr.e2h) {
104 if (hcr.tge && hcr.e2h) {
106 }
else if (hcr.tge) {
178 ICH_VMCR_EL2 ich_vmcr_el2 =
180 value = ich_vmcr_el2.VENG0;
196 ICH_VMCR_EL2 ich_vmcr_el2 =
198 value = ich_vmcr_el2.VENG1;
205 ICC_IGRPEN1_EL3 igrp_el3 = 0;
220 (hcr_imo || hcr_fmo)) {
230 if ((rprio & 0x80) == 0) {
234 }
else if (rprio != 0xff) {
238 rprio = (rprio << 1) & 0xff;
269 ICH_LR_EL2 ich_lr_el2 =
275 value = ich_lr_el2.vINTID;
299 ICH_LR_EL2 ich_lr_el2 =
305 value = ich_lr_el2.vINTID;
332 ICH_VMCR_EL2 ich_vmcr_el2 =
335 value = ich_vmcr_el2.VBPR0;
341 ICH_VMCR_EL2 ich_vmcr_el2 =
344 if (ich_vmcr_el2.VCBPR) {
346 value = ich_vmcr_el2.VBPR0 + 1;
347 value = value < 7 ? value : 7;
349 value = ich_vmcr_el2.VBPR1;
366 if ((value & 0x80) == 0) {
370 }
else if (value != 0xff) {
374 value = (value << 1) & 0xff;
381 ICH_VMCR_EL2 ich_vmcr_el2 =
384 value = ich_vmcr_el2.VPMR;
419 ICH_LR_EL2 ich_lr_el2 =
423 int_id = ich_lr_el2.vINTID;
432 ich_lr_el2.State = ICH_LR_EL2_STATE_INVALID;
475 ICH_LR_EL2 ich_lr_el2 =
479 int_id = ich_lr_el2.vINTID;
488 ich_lr_el2.State = ICH_LR_EL2_STATE_INVALID;
508 ICC_SRE_EL1 icc_sre_el1 = 0;
526 ICC_SRE_EL2 icc_sre_el2 = 0;
530 icc_sre_el2.Enable = 1;
547 ICC_SRE_EL3 icc_sre_el3 = 0;
551 icc_sre_el3.Enable = 1;
572 ICC_CTLR_EL1 icc_ctlr_el1 = value;
573 icc_ctlr_el1.ExtRange = 0;
574 icc_ctlr_el1.RSS = 1;
575 icc_ctlr_el1.A3V = 1;
576 icc_ctlr_el1.SEIS = 0;
577 icc_ctlr_el1.IDbits = 1;
578 icc_ctlr_el1.PRIbits = PRIORITY_BITS - 1;
579 value = icc_ctlr_el1;
585 ICV_CTLR_EL1 icv_ctlr_el1 = value;
586 icv_ctlr_el1.RSS = 0;
587 icv_ctlr_el1.A3V = 1;
588 icv_ctlr_el1.SEIS = 0;
589 icv_ctlr_el1.IDbits = 1;
590 icv_ctlr_el1.PRIbits = 7;
591 value = icv_ctlr_el1;
607 ICC_CTLR_EL3 icc_ctlr_el3 = value;
608 icc_ctlr_el3.ExtRange = 0;
609 icc_ctlr_el3.RSS = 1;
610 icc_ctlr_el3.nDS = 0;
611 icc_ctlr_el3.A3V = 1;
612 icc_ctlr_el3.SEIS = 0;
613 icc_ctlr_el3.IDbits = 0;
614 icc_ctlr_el3.PRIbits = PRIORITY_BITS - 1;
615 value = icc_ctlr_el3;
667 ICH_VTR_EL2 ich_vtr_el2 = value;
671 ich_vtr_el2.IDbits = 1;
691 ICH_LR_EL2 ich_lr_el2 =
694 if ((ich_lr_el2.State == ICH_LR_EL2_STATE_INVALID) &&
695 (ich_lr_el2.HW || !ich_lr_el2.EOI)) {
696 value |= (1 << lr_idx);
711 value = value & 0xffffffff;
724 panic(
"Gicv3CPUInterface::readMiscReg(): unknown register %d (%s)",
728 DPRINTF(GIC,
"Gicv3CPUInterface::readMiscReg(): register %s value %#x\n",
736 bool do_virtual_update =
false;
737 DPRINTF(GIC,
"Gicv3CPUInterface::setMiscReg(): register %s value %#x\n",
795 int int_id = val & 0xffffff;
820 int int_id = val & 0xffffff;
830 if (drop_prio == 0xff) {
840 ICH_LR_EL2 ich_lr_el2 =
844 uint8_t lr_group_prio = ich_lr_el2.Priority & 0xf8;
846 if (lr_group ==
Gicv3::G0S && lr_group_prio == drop_prio) {
865 int int_id = val & 0xffffff;
899 int int_id = val & 0xffffff;
909 if (drop_prio == 0xff) {
919 ICH_LR_EL2 ich_lr_el2 =
923 uint8_t lr_group_prio = ich_lr_el2.Priority & 0xf8;
925 if (lr_group ==
Gicv3::G1NS && lr_group_prio == drop_prio) {
940 (hcr_imo || hcr_fmo)) {
944 int int_id = val & 0xffffff;
964 bool irq_is_secure = !single_sec_state && (group !=
Gicv3::G1NS);
966 bool route_fiq_to_el3 = scr_el3.fiq;
967 bool route_irq_to_el3 = scr_el3.irq;
968 bool route_fiq_to_el2 = hcr_fmo;
969 bool route_irq_to_el2 = hcr_imo;
976 if (single_sec_state && irq_is_grp0 && !route_fiq_to_el3) {
980 if (!irq_is_secure && !irq_is_grp0 && !route_irq_to_el3) {
988 if (single_sec_state && irq_is_grp0 &&
989 !route_fiq_to_el3 && !route_fiq_to_el2) {
993 if (!irq_is_secure && !irq_is_grp0 &&
994 !route_irq_to_el3 && !route_irq_to_el2) {
998 if (irq_is_grp0 && !route_fiq_to_el3) {
1003 (!irq_is_secure || !single_sec_state) &&
1004 !route_irq_to_el3) {
1021 int int_id = val & 0xffffff;
1065 ICC_CTLR_EL1 icc_ctlr_el1_s =
1077 ICC_CTLR_EL1 icc_ctlr_el1_ns =
1098 ICH_VMCR_EL2 ich_vmcr_el2 =
1101 if ((group ==
Gicv3::G1NS) && ich_vmcr_el2.VCBPR) {
1112 if (val < min_VPBR) {
1117 ich_vmcr_el2.VBPR0 =
val;
1119 ich_vmcr_el2.VBPR1 =
val;
1123 do_virtual_update =
true;
1142 ICC_CTLR_EL1 requested_icc_ctlr_el1 =
val;
1143 ICC_CTLR_EL1 icc_ctlr_el1 =
1146 ICC_CTLR_EL3 icc_ctlr_el3 =
1160 icc_ctlr_el1.PMHE = requested_icc_ctlr_el1.PMHE;
1161 icc_ctlr_el3.PMHE = icc_ctlr_el1.PMHE;
1165 icc_ctlr_el1.PMHE = requested_icc_ctlr_el1.PMHE;
1169 icc_ctlr_el1.EOImode = requested_icc_ctlr_el1.EOImode;
1173 icc_ctlr_el3.EOImode_EL1S = icc_ctlr_el1.EOImode;
1176 icc_ctlr_el3.EOImode_EL1NS = icc_ctlr_el1.EOImode;
1187 icc_ctlr_el1.CBPR = requested_icc_ctlr_el1.CBPR;
1190 icc_ctlr_el3.CBPR_EL1S = icc_ctlr_el1.CBPR;
1192 icc_ctlr_el3.CBPR_EL1NS = icc_ctlr_el1.CBPR;
1197 icc_ctlr_el1.CBPR = requested_icc_ctlr_el1.CBPR;
1208 ICV_CTLR_EL1 requested_icv_ctlr_el1 =
val;
1209 ICV_CTLR_EL1 icv_ctlr_el1 =
1211 icv_ctlr_el1.EOImode = requested_icv_ctlr_el1.EOImode;
1212 icv_ctlr_el1.CBPR = requested_icv_ctlr_el1.CBPR;
1218 ICH_VMCR_EL2 ich_vmcr_el2 =
1220 ich_vmcr_el2.VCBPR = icv_ctlr_el1.CBPR;
1221 ich_vmcr_el2.VEOIM = icv_ctlr_el1.EOImode;
1239 ICC_CTLR_EL3 requested_icc_ctlr_el3 =
val;
1244 ICC_CTLR_EL1 icc_ctlr_el1_s =
1246 ICC_CTLR_EL1 icc_ctlr_el1_ns =
1251 icc_ctlr_el1_ns.EOImode = requested_icc_ctlr_el3.EOImode_EL1NS;
1254 icc_ctlr_el1_s.EOImode = requested_icc_ctlr_el3.EOImode_EL1S;
1256 icc_ctlr_el1_ns.CBPR = requested_icc_ctlr_el3.CBPR_EL1NS;
1258 icc_ctlr_el1_s.CBPR = requested_icc_ctlr_el3.CBPR_EL1S;
1265 ICC_CTLR_EL3 icc_ctlr_el3 =
1268 icc_ctlr_el3.RM = requested_icc_ctlr_el3.RM;
1269 icc_ctlr_el3.EOImode_EL1NS = requested_icc_ctlr_el3.EOImode_EL1NS;
1270 icc_ctlr_el3.EOImode_EL1S = requested_icc_ctlr_el3.EOImode_EL1S;
1271 icc_ctlr_el3.EOImode_EL3 = requested_icc_ctlr_el3.EOImode_EL3;
1272 icc_ctlr_el3.CBPR_EL1NS = requested_icc_ctlr_el3.CBPR_EL1NS;
1273 icc_ctlr_el3.CBPR_EL1S = requested_icc_ctlr_el3.CBPR_EL1S;
1295 if (!(old_icc_pmr_el1 & 0x80)) {
1306 val = (val >> 1) | 0x80;
1309 val &= ~0
U << (8 - PRIORITY_BITS);
1314 ICH_VMCR_EL2 ich_vmcr_el2 =
1316 ich_vmcr_el2.VPMR = val & 0xff;
1338 ICH_VMCR_EL2 ich_vmcr_el2 =
1340 ich_vmcr_el2.VENG0 =
enable;
1361 ICH_VMCR_EL2 ich_vmcr_el2 =
1363 ich_vmcr_el2.VENG1 =
enable;
1372 ICC_IGRPEN1_EL3 icc_igrpen1_el3 =
val;
1421 ICH_HCR_EL2 requested_ich_hcr_el2 =
val;
1422 ICH_HCR_EL2 ich_hcr_el2 =
1425 if (requested_ich_hcr_el2.EOIcount >= ich_hcr_el2.EOIcount)
1430 ich_hcr_el2.EOIcount = requested_ich_hcr_el2.EOIcount;
1433 ich_hcr_el2.TDIR = requested_ich_hcr_el2.TDIR;
1434 ich_hcr_el2.TSEI = requested_ich_hcr_el2.TSEI;
1435 ich_hcr_el2.TALL1 = requested_ich_hcr_el2.TALL1;;
1436 ich_hcr_el2.TALL0 = requested_ich_hcr_el2.TALL0;;
1437 ich_hcr_el2.TC = requested_ich_hcr_el2.TC;
1438 ich_hcr_el2.VGrp1DIE = requested_ich_hcr_el2.VGrp1DIE;
1439 ich_hcr_el2.VGrp1EIE = requested_ich_hcr_el2.VGrp1EIE;
1440 ich_hcr_el2.VGrp0DIE = requested_ich_hcr_el2.VGrp0DIE;
1441 ich_hcr_el2.VGrp0EIE = requested_ich_hcr_el2.VGrp0EIE;
1442 ich_hcr_el2.NPIE = requested_ich_hcr_el2.NPIE;
1443 ich_hcr_el2.LRENPIE = requested_ich_hcr_el2.LRENPIE;
1444 ich_hcr_el2.UIE = requested_ich_hcr_el2.UIE;
1445 ich_hcr_el2.En = requested_ich_hcr_el2.En;
1447 do_virtual_update =
true;
1454 ICH_LRC requested_ich_lrc =
val;
1457 ich_lrc.State = requested_ich_lrc.State;
1458 ich_lrc.HW = requested_ich_lrc.HW;
1459 ich_lrc.Group = requested_ich_lrc.Group;
1465 ich_lrc.Priority = (requested_ich_lrc.Priority & 0xf8) |
1466 (ich_lrc.Priority & 0x07);
1477 if (requested_ich_lrc.HW == 0) {
1478 ich_lrc.EOI = requested_ich_lrc.EOI;
1480 ich_lrc.pINTID = requested_ich_lrc.pINTID;
1484 do_virtual_update =
true;
1492 val = (old_val & 0xffffffff00000000) | (val & 0xffffffff);
1493 do_virtual_update =
true;
1499 ICH_LR_EL2 requested_ich_lr_el2 =
val;
1502 ich_lr_el2.State = requested_ich_lr_el2.State;
1503 ich_lr_el2.HW = requested_ich_lr_el2.HW;
1504 ich_lr_el2.Group = requested_ich_lr_el2.Group;
1510 ich_lr_el2.Priority = (requested_ich_lr_el2.Priority & 0xf8) |
1511 (ich_lr_el2.Priority & 0x07);
1522 if (requested_ich_lr_el2.HW == 0) {
1523 ich_lr_el2.EOI = requested_ich_lr_el2.EOI;
1525 ich_lr_el2.pINTID = requested_ich_lr_el2.pINTID;
1532 ich_lr_el2.vINTID = requested_ich_lr_el2.vINTID;
1535 do_virtual_update =
true;
1542 ICH_VMCR_EL2 requested_ich_vmcr_el2 =
val;
1543 ICH_VMCR_EL2 ich_vmcr_el2 =
1545 ich_vmcr_el2.VPMR = requested_ich_vmcr_el2.VPMR;
1548 if (requested_ich_vmcr_el2.VBPR0 < min_vpr0) {
1549 ich_vmcr_el2.VBPR0 = min_vpr0;
1551 ich_vmcr_el2.VBPR0 = requested_ich_vmcr_el2.VBPR0;
1554 uint8_t min_vpr1 = min_vpr0 + 1;
1556 if (requested_ich_vmcr_el2.VBPR1 < min_vpr1) {
1557 ich_vmcr_el2.VBPR1 = min_vpr1;
1559 ich_vmcr_el2.VBPR1 = requested_ich_vmcr_el2.VBPR1;
1562 ich_vmcr_el2.VEOIM = requested_ich_vmcr_el2.VEOIM;
1563 ich_vmcr_el2.VCBPR = requested_ich_vmcr_el2.VCBPR;
1564 ich_vmcr_el2.VENG1 = requested_ich_vmcr_el2.VENG1;
1565 ich_vmcr_el2.VENG0 = requested_ich_vmcr_el2.VENG0;
1605 panic(
"Gicv3CPUInterface::setMiscReg(): unknown register %d (%s)",
1611 if (do_virtual_update) {
1634 ICH_LR_EL2 ich_lr_el2 =
1639 (ich_lr_el2.vINTID == int_id)) {
1681 if ((
currEL() ==
EL3) && icc_ctlr_el3.RM) {
1695 if (irq_is_secure) {
1711 int apr_misc_reg = 0;
1724 panic(
"Invalid Gicv3::GroupId");
1742 for (
int i = 0;
i < apr_max;
i++) {
1746 if (!vapr0 && !vapr1) {
1750 int vapr0_count =
ctz32(vapr0);
1751 int vapr1_count =
ctz32(vapr1);
1753 if (vapr0_count <= vapr1_count) {
1770 uint8_t aff3 =
bits(val, 55, 48);
1771 uint8_t aff2 =
bits(val, 39, 32);
1772 uint8_t aff1 =
bits(val, 23, 16);;
1773 uint16_t target_list =
bits(val, 15, 0);
1774 uint32_t int_id =
bits(val, 27, 24);
1775 bool irm =
bits(val, 40, 40);
1776 uint8_t
rs =
bits(val, 47, 44);
1783 uint32_t affinity_i = redistributor_i->
getAffinity();
1794 if ((affinity_i >> 8) !=
1795 ((aff3 << 16) | (aff2 << 8) | (aff1 << 0))) {
1799 uint8_t aff0_i =
bits(affinity_i, 7, 0);
1801 if (!(aff0_i >= rs * 16 && aff0_i < (rs + 1) * 16 &&
1802 ((0x1 << (aff0_i - rs * 16)) & target_list))) {
1807 redistributor_i->
sendSGI(int_id, group, ns);
1812 Gicv3CPUInterface::activateIRQ(uint32_t int_id,
Gicv3::GroupId group)
1816 int apr_bit = prio >> (8 - PRIORITY_BITS);
1817 int reg_bit = apr_bit % 32;
1831 panic(
"Invalid Gicv3::GroupId");
1835 apr |= (1 << reg_bit);
1864 uint8_t prio = ich_lr_el.Priority & 0xf8;
1866 int reg_no = apr_bit / 32;
1867 int reg_bit = apr_bit % 32;
1871 apr |= (1 << reg_bit);
1898 if (ich_lr_el2.HW) {
1920 ICC_CTLR_EL1 icc_ctlr_el1_s =
1922 ICC_CTLR_EL1 icc_ctlr_el1_ns =
1925 if ((group ==
Gicv3::G1S && icc_ctlr_el1_s.CBPR) ||
1945 return ~0
U << (bpr + 1);
1951 ICH_VMCR_EL2 ich_vmcr_el2 =
1954 if ((group ==
Gicv3::G1NS) && ich_vmcr_el2.VCBPR) {
1961 bpr = ich_vmcr_el2.VBPR0;
1963 bpr = ich_vmcr_el2.VBPR1;
1971 return ~0
U << (bpr + 1);
1978 ICC_CTLR_EL3 icc_ctlr_el3 =
1980 return icc_ctlr_el3.EOImode_EL3;
1982 ICC_CTLR_EL1 icc_ctlr_el1 = 0;
1987 return icc_ctlr_el1.EOImode;
1995 return ich_vmcr_el2.VEOIM;
2005 if (g1nz_ctz < g0_ctz && g1nz_ctz < gq_ctz) {
2009 if (gq_ctz < g0_ctz) {
2029 bool signal_IRQ =
false;
2030 bool signal_FIQ =
false;
2042 DPRINTF(GIC,
"Gicv3CPUInterface::update(): " 2043 "posting int as %d!\n", int_type);
2063 bool signal_IRQ =
false;
2064 bool signal_FIQ =
false;
2068 ICH_LR_EL2 ich_lr_el2 =
2072 if (ich_lr_el2.Group) {
2082 if (ich_hcr_el2.En) {
2089 DPRINTF(GIC,
"Gicv3CPUInterface::virtualUpdate(): " 2097 DPRINTF(GIC,
"Gicv3CPUInterface::virtualUpdate(): " 2112 if (!ich_vmcr_el2.VENG0 && !ich_vmcr_el2.VENG1) {
2117 uint8_t highest_prio = 0xff;
2119 for (
int i = 0;
i < 16;
i++) {
2120 ICH_LR_EL2 ich_lr_el2 =
2127 if (ich_lr_el2.Group) {
2129 if (!ich_vmcr_el2.VENG1) {
2134 if (!ich_vmcr_el2.VENG0) {
2139 uint8_t prio = ich_lr_el2.Priority;
2141 if (prio < highest_prio) {
2142 highest_prio = prio;
2154 if (!ich_hcr_el2.En) {
2159 ICH_LR_EL2 ich_lr_el2 =
2161 uint8_t prio = ich_lr_el2.Priority;
2172 if (rprio == 0xff) {
2179 if ((prio & prio_mask) < (rprio & prio_mask)) {
2191 for (
int i = 0;
i < num_aprs;
i++) {
2212 uint32_t EOI_cout =
bits(ich_hcr_el2, 31, 27);
2214 ich_hcr_el2 =
insertBits(ich_hcr_el2, 31, 27, EOI_cout);
2222 bool is_fiq =
false;
2239 panic(
"Gicv3CPUInterface::intSignalType(): invalid group!");
2269 if (rprio == 0xff) {
2275 if ((
hppi.
prio & prio_mask) < (rprio & prio_mask)) {
2302 ICC_IGRPEN0_EL1 icc_igrpen0_el1 =
2308 ICC_IGRPEN1_EL1 icc_igrpen1_el1_s =
2314 ICC_IGRPEN1_EL1 icc_igrpen1_el1_ns =
2320 panic(
"Gicv3CPUInterface::groupEnable(): invalid group!\n");
2340 bool is_64 = opModeIs64((
OperatingMode)(uint8_t) cpsr.mode);
2345 switch (cpsr.mode) {
2376 warn(
"Unimplemented Exception Level\n");
2400 bool is_64 = opModeIs64((
OperatingMode)(uint8_t) cpsr.mode);
2402 if (is_64 && (cpsr.el ==
EL3)) {
2404 }
else if (!is_64 && (cpsr.mode ==
MODE_MON)) {
2434 ICH_LR_EL2 ich_lr_el2 =
2437 if ((ich_lr_el2.State == ICH_LR_EL2_STATE_INVALID) &&
2438 !ich_lr_el2.HW && ich_lr_el2.EOI) {
2439 value |= (1 << lr_idx);
2446 Gicv3CPUInterface::ICH_MISR_EL2
2450 ICH_MISR_EL2 ich_misr_el2 = 0;
2451 ICH_HCR_EL2 ich_hcr_el2 =
2453 ICH_VMCR_EL2 ich_vmcr_el2 =
2461 ich_misr_el2.EOI = 1;
2469 uint32_t num_valid_interrupts = 0;
2470 uint32_t num_pending_interrupts = 0;
2473 ICH_LR_EL2 ich_lr_el2 =
2476 if (ich_lr_el2.State != ICH_LR_EL2_STATE_INVALID) {
2477 num_valid_interrupts++;
2481 num_pending_interrupts++;
2485 if (ich_hcr_el2.UIE && (num_valid_interrupts < 2)) {
2492 if (ich_hcr_el2.LRENPIE && ich_hcr_el2.EOIcount) {
2493 ich_misr_el2.LRENP = 1;
2499 if (ich_hcr_el2.NPIE && (num_pending_interrupts == 0)) {
2500 ich_misr_el2.NP = 1;
2506 if (ich_hcr_el2.VGrp0EIE && ich_vmcr_el2.VENG0) {
2507 ich_misr_el2.VGrp0E = 1;
2513 if (ich_hcr_el2.VGrp0DIE && !ich_vmcr_el2.VENG0) {
2514 ich_misr_el2.VGrp0D = 1;
2520 if (ich_hcr_el2.VGrp1EIE && ich_vmcr_el2.VENG1) {
2521 ich_misr_el2.VGrp1E = 1;
2527 if (ich_hcr_el2.VGrp1DIE && !ich_vmcr_el2.VENG1) {
2528 ich_misr_el2.VGrp1D = 1;
2531 return ich_misr_el2;
2545 ICC_CTLR_EL1 icc_ctlr_el1_s =
2555 ICC_CTLR_EL1 icc_ctlr_el1_ns =
2563 bpr = bpr < 7 ? bpr : 7;
2569 panic(
"Should be used with G1S and G1NS only\n");
#define panic(...)
This implements a cprintf based panic() function.
void deactivateIRQ(uint32_t int_id)
bool isSecureBelowEL3() const
int ctz32(uint32_t value)
Count trailing zeros in a 32-bit value.
static const uint64_t ICH_LR_EL2_STATE_ACTIVE
void setThreadContext(ThreadContext *tc) override
void virtualActivateIRQ(uint32_t lrIdx)
static const uint8_t GIC_MIN_BPR_NS
bool haveSecurity() const
Returns true if this system implements the Security Extensions.
uint8_t virtualDropPriority()
RegVal bpr1(Gicv3::GroupId group)
static const uint64_t ICH_LR_EL2_STATE_PENDING
RegVal readMiscRegNoEffect(int misc_reg) const
const Params * params() const
void setMiscReg(int misc_reg, RegVal val) override
Write to a system register belonging to this device.
RegVal readMiscReg(int misc_reg) override
Read a system register belonging to this device.
Base class for devices that use the MiscReg interfaces.
void deactivateIRQ(uint32_t intid, Gicv3::GroupId group)
const char *const miscRegName[]
void unserialize(CheckpointIn &cp) override
Unserialize an object.
uint32_t virtualGroupPriorityMask(Gicv3::GroupId group) const
void resetHppi(uint32_t intid)
bool getHCREL2IMO() const
static const int INTID_NONSECURE
ThreadContext is the external interface to all thread state for anything outside of the CPU...
uint64_t eoiMaintenanceInterruptStatus() const
int highestActiveGroup() const
void setMiscRegNoEffect(int misc_reg, RegVal val)
uint32_t groupPriorityMask(Gicv3::GroupId group)
void deassertInt(uint32_t cpu, ArmISA::InterruptTypes int_type)
static const uint8_t VIRTUAL_NUM_LIST_REGS
#define UNSERIALIZE_SCALAR(scalar)
uint8_t virtualHighestActivePriority() const
int snsBankedIndex64(MiscRegIndex reg, bool ns) const
bool getHCREL2FMO() const
bool inSecureState() const
uint32_t getHPPIR1() const
Gicv3Distributor * distributor
void serialize(CheckpointOut &cp) const override
Serialize an object.
static const uint8_t GIC_MIN_VBPR
uint8_t highestActivePriority() const
void virtualIncrementEOICount()
void activateIRQ(uint32_t int_id)
static const uint8_t VIRTUAL_PREEMPTION_BITS
static const uint8_t VIRTUAL_PRIORITY_BITS
void setClrLPI(uint64_t data, bool set)
unsigned numContexts() const
void activateIRQ(uint32_t int_id)
T insertBits(T val, int first, int last, B bit_val)
Returns val with bits first to last set to the LSBs of bit_val.
static const int INTID_SPURIOUS
Gicv3Redistributor * getRedistributor(ContextID context_id) const
bool haveVirtualization() const
Returns true if this system implements the virtualization Extensions.
Gicv3Distributor * distributor
static const uint8_t GIC_MIN_BPR
#define SERIALIZE_SCALAR(scalar)
RegVal readBankedMiscReg(MiscRegIndex misc_reg) const
#define UNSERIALIZE_ENUM(scalar)
static const uint32_t SMALLEST_LPI_ID
bool groupEnabled(Gicv3::GroupId group) const
Gicv3::GroupId getIntGroup(int int_id) const
int virtualFindActive(uint32_t intid) const
virtual void raise()=0
Signal an interrupt.
std::ostream CheckpointOut
bool virtualIsEOISplitMode() const
Gicv3CPUInterface(Gicv3 *gic, uint32_t cpu_id)
void postInt(uint32_t cpu, ArmISA::InterruptTypes int_type)
ArmISA::InterruptTypes intSignalType(Gicv3::GroupId group) const
void dropPriority(Gicv3::GroupId group)
bool hppviCanPreempt(int lrIdx) const
bool haveEL(ArmISA::ExceptionLevel el) const
ICH_MISR_EL2 maintenanceInterruptStatus() const
ArmInterruptPin * maintenanceInterrupt
EndBitUnion(ICV_CTLR_EL1) protected void generateSGI(RegVal val, Gicv3::GroupId group)
uint32_t getAffinity() const
Gicv3::GroupId getIntGroup(int int_id) const
void setBankedMiscReg(MiscRegIndex misc_reg, RegVal val) const
bool inSecureState(ThreadContext *tc)
uint32_t getHPPIR0() const
T bits(T val, int first, int last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it...
ArmSystem * getSystem() const
static const uint64_t ICH_LR_EL2_STATE_ACTIVE_PENDING
#define SERIALIZE_ENUM(scalar)
void virtualDeactivateIRQ(int lrIdx)
Gicv3Redistributor * redistributor
void sendSGI(uint32_t int_id, Gicv3::GroupId group, bool ns)
bool isEOISplitMode() const
void deactivateIRQ(uint32_t int_id)
static const int INTID_SECURE
Gicv3Distributor * getDistributor() const