Lines Matching refs:grp
107 static int read_vbpr(GICv3CPUState *cs, int grp) in read_vbpr() argument
112 if (grp == GICV3_G0) { in read_vbpr()
121 static void write_vbpr(GICv3CPUState *cs, int grp, int value) in write_vbpr() argument
128 if (grp != GICV3_G0) { in write_vbpr()
134 if (grp == GICV3_G0) { in write_vbpr()
243 if (cs->hppvlpi.grp == GICV3_G0) { in hppvi_index()
300 int grp; in icv_hppi_can_preempt() local
329 grp = (lr & ICH_LR_EL2_GROUP) ? GICV3_G1NS : GICV3_G0; in icv_hppi_can_preempt()
331 mask = icv_gprio_mask(cs, grp); in icv_hppi_can_preempt()
376 mask = icv_gprio_mask(cs, cs->hppvlpi.grp); in icv_hppvlpi_can_preempt()
488 cs->hppvlpi.irq, cs->hppvlpi.grp, in gicv3_cpuif_virt_irq_fiq_update()
492 if (cs->hppvlpi.grp == GICV3_G0) { in gicv3_cpuif_virt_irq_fiq_update()
563 int grp = (ri->crm & 1) ? GICV3_G1NS : GICV3_G0; in icv_ap_read() local
564 uint64_t value = cs->ich_apr[grp][regno]; in icv_ap_read()
575 int grp = (ri->crm & 1) ? GICV3_G1NS : GICV3_G0; in icv_ap_write() local
580 cs->ich_apr[grp][regno] = value & (0xFFFFFFFFU | ICV_AP1R_EL1_NMI); in icv_ap_write()
582 cs->ich_apr[grp][regno] = value & 0xFFFFFFFFU; in icv_ap_write()
592 int grp = (ri->crm == 8) ? GICV3_G0 : GICV3_G1NS; in icv_bpr_read() local
596 if (grp == GICV3_G1NS && (cs->ich_vmcr_el2 & ICH_VMCR_EL2_VCBPR)) { in icv_bpr_read()
598 grp = GICV3_G0; in icv_bpr_read()
602 bpr = read_vbpr(cs, grp); in icv_bpr_read()
618 int grp = (ri->crm == 8) ? GICV3_G0 : GICV3_G1NS; in icv_bpr_write() local
623 if (grp == GICV3_G1NS && (cs->ich_vmcr_el2 & ICH_VMCR_EL2_VCBPR)) { in icv_bpr_write()
628 write_vbpr(cs, grp, value); in icv_bpr_write()
743 int grp = ri->crm == 8 ? GICV3_G0 : GICV3_G1NS; in icv_hppir_read() local
748 if (cs->hppvlpi.grp == grp) { in icv_hppir_read()
755 if (grp == thisgrp) { in icv_hppir_read()
765 static void icv_activate_irq(GICv3CPUState *cs, int idx, int grp) in icv_activate_irq() argument
771 uint32_t mask = icv_gprio_mask(cs, grp); in icv_activate_irq()
782 cs->ich_apr[grp][regno] |= ICV_AP1R_EL1_NMI; in icv_activate_irq()
784 cs->ich_apr[grp][regno] |= (1U << regbit); in icv_activate_irq()
790 uint32_t mask = icv_gprio_mask(cs, cs->hppvlpi.grp); in icv_activate_vlpi()
796 cs->ich_apr[cs->hppvlpi.grp][regno] |= (1U << regbit); in icv_activate_vlpi()
803 int grp = ri->crm == 8 ? GICV3_G0 : GICV3_G1NS; in icv_iar_read() local
809 if (cs->hppvlpi.grp == grp && icv_hppvlpi_can_preempt(cs)) { in icv_iar_read()
818 if (thisgrp == grp && icv_hppi_can_preempt(cs, lr)) { in icv_iar_read()
822 icv_activate_irq(cs, idx, grp); in icv_iar_read()
990 return cs->hppi.prio == 0xff || (cs->icc_igrpen[cs->hppi.grp] == 0); in icc_no_enabled_hppi()
1009 cs->hppi.grp == GICV3_G1NS) { in icc_hppi_can_preempt()
1028 mask = icc_gprio_mask(cs, cs->hppi.grp); in icc_hppi_can_preempt()
1038 if (!(cs->icc_apr[cs->hppi.grp][0] & ICC_AP1R_EL1_NMI)) { in icc_hppi_can_preempt()
1058 cs->hppi.grp, cs->hppi.prio); in gicv3_cpuif_update()
1060 if (cs->hppi.grp == GICV3_G1 && !arm_feature(env, ARM_FEATURE_EL3)) { in gicv3_cpuif_update()
1064 cs->hppi.grp = GICV3_G0; in gicv3_cpuif_update()
1073 switch (cs->hppi.grp) { in gicv3_cpuif_update()
1163 uint32_t mask = icc_gprio_mask(cs, cs->hppi.grp); in icc_activate_irq()
1171 cs->icc_apr[cs->hppi.grp][regno] |= ICC_AP1R_EL1_NMI; in icc_activate_irq()
1173 cs->icc_apr[cs->hppi.grp][regno] |= (1U << regbit); in icc_activate_irq()
1206 (cs->hppi.grp != GICV3_G1NS)); in icc_hppir0_value()
1208 if (cs->hppi.grp != GICV3_G0 && !arm_is_el3_or_mon(env)) { in icc_hppir0_value()
1216 if (cs->hppi.grp != GICV3_G0) { in icc_hppir0_value()
1243 (cs->hppi.grp != GICV3_G1NS)); in icc_hppir1_value()
1245 if (cs->hppi.grp == GICV3_G0) { in icc_hppir1_value()
1340 static void icc_drop_prio(GICv3CPUState *cs, int grp) in icc_drop_prio() argument
1361 uint64_t *papr = &cs->icc_apr[grp][i]; in icc_drop_prio()
1590 int grp = ri->crm == 8 ? GICV3_G0 : GICV3_G1NS; in icv_eoir_write() local
1627 int lr_gprio = ich_lr_prio(lr) & icv_gprio_mask(cs, grp); in icv_eoir_write()
1630 if (thisgrp == grp && (lr_gprio == dropprio || (thisnmi & nmi))) { in icv_eoir_write()
1651 int grp; in icc_eoir_write() local
1675 grp = icc_highest_active_group(cs); in icc_eoir_write()
1676 switch (grp) { in icc_eoir_write()
1708 icc_drop_prio(cs, grp); in icc_eoir_write()
1747 int grp = (ri->crm == 8) ? GICV3_G0 : GICV3_G1; in icc_bpr_read() local
1751 if (icv_access(env, grp == GICV3_G0 ? HCR_FMO : HCR_IMO)) { in icc_bpr_read()
1755 if (grp == GICV3_G1 && gicv3_use_ns_bank(env)) { in icc_bpr_read()
1756 grp = GICV3_G1NS; in icc_bpr_read()
1759 if (grp == GICV3_G1 && !arm_is_el3_or_mon(env) && in icc_bpr_read()
1764 grp = GICV3_G0; in icc_bpr_read()
1767 if (grp == GICV3_G1NS && arm_current_el(env) < 3 && in icc_bpr_read()
1770 grp = GICV3_G0; in icc_bpr_read()
1774 bpr = cs->icc_bpr[grp]; in icc_bpr_read()
1789 int grp = (ri->crm == 8) ? GICV3_G0 : GICV3_G1; in icc_bpr_write() local
1792 if (icv_access(env, grp == GICV3_G0 ? HCR_FMO : HCR_IMO)) { in icc_bpr_write()
1800 if (grp == GICV3_G1 && gicv3_use_ns_bank(env)) { in icc_bpr_write()
1801 grp = GICV3_G1NS; in icc_bpr_write()
1804 if (grp == GICV3_G1 && !arm_is_el3_or_mon(env) && in icc_bpr_write()
1809 grp = GICV3_G0; in icc_bpr_write()
1812 if (grp == GICV3_G1NS && arm_current_el(env) < 3 && in icc_bpr_write()
1818 minval = (grp == GICV3_G1NS) ? icc_min_bpr_ns(cs) : icc_min_bpr(cs); in icc_bpr_write()
1823 cs->icc_bpr[grp] = value & 7; in icc_bpr_write()
1833 int grp = (ri->crm & 1) ? GICV3_G1 : GICV3_G0; in icc_ap_read() local
1835 if (icv_access(env, grp == GICV3_G0 ? HCR_FMO : HCR_IMO)) { in icc_ap_read()
1839 if (grp == GICV3_G1 && gicv3_use_ns_bank(env)) { in icc_ap_read()
1840 grp = GICV3_G1NS; in icc_ap_read()
1843 value = cs->icc_apr[grp][regno]; in icc_ap_read()
1855 int grp = (ri->crm & 1) ? GICV3_G1 : GICV3_G0; in icc_ap_write() local
1857 if (icv_access(env, grp == GICV3_G0 ? HCR_FMO : HCR_IMO)) { in icc_ap_write()
1864 if (grp == GICV3_G1 && gicv3_use_ns_bank(env)) { in icc_ap_write()
1865 grp = GICV3_G1NS; in icc_ap_write()
1873 if (grp == GICV3_G1NS && regno < 2 && arm_feature(env, ARM_FEATURE_EL3)) { in icc_ap_write()
1878 cs->icc_apr[grp][regno] = value & (0xFFFFFFFFU | ICC_AP1R_EL1_NMI); in icc_ap_write()
1880 cs->icc_apr[grp][regno] = value & 0xFFFFFFFFU; in icc_ap_write()
1910 int grp = gicv3_irq_group(cs->gic, cs, irq); in icc_dir_write() local
1913 irq_is_secure = !single_sec_state && (grp != GICV3_G1NS); in icc_dir_write()
1914 irq_is_grp0 = grp == GICV3_G0; in icc_dir_write()
2012 uint64_t value, int grp, bool ns) in icc_generate_sgi() argument
2025 if (grp == GICV3_G1 && s->gicd_ctlr & GICD_CTLR_DS) { in icc_generate_sgi()
2030 grp = GICV3_G0; in icc_generate_sgi()
2060 gicv3_redist_send_sgi(ocs, grp, irq, ns); in icc_generate_sgi()
2079 int grp; in icc_sgi1r_write() local
2082 grp = ns ? GICV3_G1NS : GICV3_G1; in icc_sgi1r_write()
2083 icc_generate_sgi(env, cs, value, grp, ns); in icc_sgi1r_write()
2093 int grp; in icc_asgi1r_write() local
2096 grp = ns ? GICV3_G1 : GICV3_G1NS; in icc_asgi1r_write()
2097 icc_generate_sgi(env, cs, value, grp, ns); in icc_asgi1r_write()
2103 int grp = ri->opc2 & 1 ? GICV3_G1 : GICV3_G0; in icc_igrpen_read() local
2106 if (icv_access(env, grp == GICV3_G0 ? HCR_FMO : HCR_IMO)) { in icc_igrpen_read()
2110 if (grp == GICV3_G1 && gicv3_use_ns_bank(env)) { in icc_igrpen_read()
2111 grp = GICV3_G1NS; in icc_igrpen_read()
2114 value = cs->icc_igrpen[grp]; in icc_igrpen_read()
2124 int grp = ri->opc2 & 1 ? GICV3_G1 : GICV3_G0; in icc_igrpen_write() local
2126 if (icv_access(env, grp == GICV3_G0 ? HCR_FMO : HCR_IMO)) { in icc_igrpen_write()
2134 if (grp == GICV3_G1 && gicv3_use_ns_bank(env)) { in icc_igrpen_write()
2135 grp = GICV3_G1NS; in icc_igrpen_write()
2138 cs->icc_igrpen[grp] = value & ICC_IGRPEN_ENABLE; in icc_igrpen_write()
2699 int grp = (ri->crm & 1) ? GICV3_G1NS : GICV3_G0; in ich_ap_read() local
2702 value = cs->ich_apr[grp][regno]; in ich_ap_read()
2712 int grp = (ri->crm & 1) ? GICV3_G1NS : GICV3_G0; in ich_ap_write() local
2717 cs->ich_apr[grp][regno] = value & (0xFFFFFFFFU | ICV_AP1R_EL1_NMI); in ich_ap_write()
2719 cs->ich_apr[grp][regno] = value & 0xFFFFFFFFU; in ich_ap_write()