Lines Matching refs:value

121 static void write_vbpr(GICv3CPUState *cs, int grp, int value)  in write_vbpr()  argument
132 value = MAX(value, min); in write_vbpr()
136 ICH_VMCR_EL2_VBPR0_LENGTH, value); in write_vbpr()
139 ICH_VMCR_EL2_VBPR1_LENGTH, value); in write_vbpr()
399 uint32_t value = 0; in eoi_maintenance_interrupt_state() local
409 value |= (1 << i); in eoi_maintenance_interrupt_state()
426 if (value) { in eoi_maintenance_interrupt_state()
430 return value; in eoi_maintenance_interrupt_state()
438 uint32_t value = 0; in maintenance_interrupt_state() local
441 eoi_maintenance_interrupt_state(cs, &value); in maintenance_interrupt_state()
445 value |= ICH_MISR_EL2_LRENP; in maintenance_interrupt_state()
450 value |= ICH_MISR_EL2_VGRP0E; in maintenance_interrupt_state()
455 value |= ICH_MISR_EL2_VGRP0D; in maintenance_interrupt_state()
459 value |= ICH_MISR_EL2_VGRP1E; in maintenance_interrupt_state()
464 value |= ICH_MISR_EL2_VGRP1D; in maintenance_interrupt_state()
467 return value; in maintenance_interrupt_state()
564 uint64_t value = cs->ich_apr[grp][regno]; in icv_ap_read() local
566 trace_gicv3_icv_ap_read(ri->crm & 1, regno, gicv3_redist_affid(cs), value); in icv_ap_read()
567 return value; in icv_ap_read()
571 uint64_t value) in icv_ap_write() argument
577 trace_gicv3_icv_ap_write(ri->crm & 1, regno, gicv3_redist_affid(cs), value); in icv_ap_write()
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()
615 uint64_t value) in icv_bpr_write() argument
621 gicv3_redist_affid(cs), value); in icv_bpr_write()
628 write_vbpr(cs, grp, value); in icv_bpr_write()
636 uint64_t value; in icv_pmr_read() local
638 value = extract64(cs->ich_vmcr_el2, ICH_VMCR_EL2_VPMR_SHIFT, in icv_pmr_read()
641 trace_gicv3_icv_pmr_read(gicv3_redist_affid(cs), value); in icv_pmr_read()
642 return value; in icv_pmr_read()
646 uint64_t value) in icv_pmr_write() argument
650 trace_gicv3_icv_pmr_write(gicv3_redist_affid(cs), value); in icv_pmr_write()
652 value &= icv_fullprio_mask(cs); in icv_pmr_write()
655 ICH_VMCR_EL2_VPMR_LENGTH, value); in icv_pmr_write()
664 uint64_t value; in icv_igrpen_read() local
667 value = extract64(cs->ich_vmcr_el2, enbit, 1); in icv_igrpen_read()
670 gicv3_redist_affid(cs), value); in icv_igrpen_read()
671 return value; in icv_igrpen_read()
675 uint64_t value) in icv_igrpen_write() argument
681 gicv3_redist_affid(cs), value); in icv_igrpen_write()
685 cs->ich_vmcr_el2 = deposit64(cs->ich_vmcr_el2, enbit, 1, value); in icv_igrpen_write()
692 uint64_t value; in icv_ctlr_read() local
697 value = ICC_CTLR_EL1_A3V | (1 << ICC_CTLR_EL1_IDBITS_SHIFT) | in icv_ctlr_read()
701 value |= ICC_CTLR_EL1_EOIMODE; in icv_ctlr_read()
705 value |= ICC_CTLR_EL1_CBPR; in icv_ctlr_read()
708 trace_gicv3_icv_ctlr_read(gicv3_redist_affid(cs), value); in icv_ctlr_read()
709 return value; in icv_ctlr_read()
713 uint64_t value) in icv_ctlr_write() argument
717 trace_gicv3_icv_ctlr_write(gicv3_redist_affid(cs), value); in icv_ctlr_write()
720 1, value & ICC_CTLR_EL1_CBPR ? 1 : 0); in icv_ctlr_write()
722 1, value & ICC_CTLR_EL1_EOIMODE ? 1 : 0); in icv_ctlr_write()
745 uint64_t value = INTID_SPURIOUS; in icv_hppir_read() local
749 value = cs->hppvlpi.irq; in icv_hppir_read()
756 value = ich_lr_vintid(lr); in icv_hppir_read()
761 gicv3_redist_affid(cs), value); in icv_hppir_read()
762 return value; in icv_hppir_read()
1107 uint32_t value = cs->icc_pmr_el1; in icc_pmr_read() local
1118 if ((value & 0x80) == 0) { in icc_pmr_read()
1120 value = 0; in icc_pmr_read()
1121 } else if (value != 0xff) { in icc_pmr_read()
1122 value = (value << 1) & 0xff; in icc_pmr_read()
1126 trace_gicv3_icc_pmr_read(gicv3_redist_affid(cs), value); in icc_pmr_read()
1128 return value; in icc_pmr_read()
1132 uint64_t value) in icc_pmr_write() argument
1137 return icv_pmr_write(env, ri, value); in icc_pmr_write()
1140 trace_gicv3_icc_pmr_write(gicv3_redist_affid(cs), value); in icc_pmr_write()
1151 value = (value >> 1) | 0x80; in icc_pmr_write()
1153 value &= icc_fullprio_mask(cs); in icc_pmr_write()
1154 cs->icc_pmr_el1 = value; in icc_pmr_write()
1552 uint64_t value) in icv_dir_write() argument
1557 int irq = value & 0xffffff; in icv_dir_write()
1559 trace_gicv3_icv_dir_write(gicv3_redist_affid(cs), value); in icv_dir_write()
1585 uint64_t value) in icv_eoir_write() argument
1589 int irq = value & 0xffffff; in icv_eoir_write()
1595 gicv3_redist_affid(cs), value); in icv_eoir_write()
1646 uint64_t value) in icc_eoir_write() argument
1650 int irq = value & 0xffffff; in icc_eoir_write()
1655 icv_eoir_write(env, ri, value); in icc_eoir_write()
1660 gicv3_redist_affid(cs), value); in icc_eoir_write()
1719 uint64_t value; in icc_hppir0_read() local
1725 value = icc_hppir0_value(cs, env); in icc_hppir0_read()
1726 trace_gicv3_icc_hppir0_read(gicv3_redist_affid(cs), value); in icc_hppir0_read()
1727 return value; in icc_hppir0_read()
1733 uint64_t value; in icc_hppir1_read() local
1739 value = icc_hppir1_value(cs, env); in icc_hppir1_read()
1740 trace_gicv3_icc_hppir1_read(gicv3_redist_affid(cs), value); in icc_hppir1_read()
1741 return value; in icc_hppir1_read()
1786 uint64_t value) in icc_bpr_write() argument
1793 icv_bpr_write(env, ri, value); in icc_bpr_write()
1798 gicv3_redist_affid(cs), value); in icc_bpr_write()
1819 if (value < minval) { in icc_bpr_write()
1820 value = minval; in icc_bpr_write()
1823 cs->icc_bpr[grp] = value & 7; in icc_bpr_write()
1830 uint64_t value; in icc_ap_read() local
1843 value = cs->icc_apr[grp][regno]; in icc_ap_read()
1845 trace_gicv3_icc_ap_read(ri->crm & 1, regno, gicv3_redist_affid(cs), value); in icc_ap_read()
1846 return value; in icc_ap_read()
1850 uint64_t value) in icc_ap_write() argument
1858 icv_ap_write(env, ri, value); in icc_ap_write()
1862 trace_gicv3_icc_ap_write(ri->crm & 1, regno, gicv3_redist_affid(cs), value); 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()
1886 uint64_t value) in icc_dir_write() argument
1890 int irq = value & 0xffffff; in icc_dir_write()
1895 icv_dir_write(env, ri, value); in icc_dir_write()
1899 trace_gicv3_icc_dir_write(gicv3_redist_affid(cs), value); in icc_dir_write()
2012 uint64_t value, int grp, bool ns) in icc_generate_sgi() argument
2017 uint64_t aff = extract64(value, 48, 8) << 16 | in icc_generate_sgi()
2018 extract64(value, 32, 8) << 8 | in icc_generate_sgi()
2019 extract64(value, 16, 8); in icc_generate_sgi()
2020 uint32_t targetlist = extract64(value, 0, 16); in icc_generate_sgi()
2021 uint32_t irq = extract64(value, 24, 4); in icc_generate_sgi()
2022 bool irm = extract64(value, 40, 1); in icc_generate_sgi()
2065 uint64_t value) in icc_sgi0r_write() argument
2071 icc_generate_sgi(env, cs, value, GICV3_G0, ns); in icc_sgi0r_write()
2075 uint64_t value) in icc_sgi1r_write() argument
2083 icc_generate_sgi(env, cs, value, grp, ns); in icc_sgi1r_write()
2087 uint64_t value) in icc_asgi1r_write() argument
2097 icc_generate_sgi(env, cs, value, grp, ns); in icc_asgi1r_write()
2104 uint64_t value; in icc_igrpen_read() local
2114 value = cs->icc_igrpen[grp]; in icc_igrpen_read()
2116 gicv3_redist_affid(cs), value); in icc_igrpen_read()
2117 return value; in icc_igrpen_read()
2121 uint64_t value) in icc_igrpen_write() argument
2127 icv_igrpen_write(env, ri, value); in icc_igrpen_write()
2132 gicv3_redist_affid(cs), value); in icc_igrpen_write()
2138 cs->icc_igrpen[grp] = value & ICC_IGRPEN_ENABLE; in icc_igrpen_write()
2145 uint64_t value; in icc_igrpen1_el3_read() local
2148 value = cs->icc_igrpen[GICV3_G1NS] | (cs->icc_igrpen[GICV3_G1] << 1); in icc_igrpen1_el3_read()
2149 trace_gicv3_icc_igrpen1_el3_read(gicv3_redist_affid(cs), value); in icc_igrpen1_el3_read()
2150 return value; in icc_igrpen1_el3_read()
2154 uint64_t value) in icc_igrpen1_el3_write() argument
2158 trace_gicv3_icc_igrpen1_el3_write(gicv3_redist_affid(cs), value); in icc_igrpen1_el3_write()
2161 cs->icc_igrpen[GICV3_G1NS] = extract32(value, 0, 1); in icc_igrpen1_el3_write()
2162 cs->icc_igrpen[GICV3_G1] = extract32(value, 1, 1); in icc_igrpen1_el3_write()
2170 uint64_t value; in icc_ctlr_el1_read() local
2176 value = cs->icc_ctlr_el1[bank]; in icc_ctlr_el1_read()
2177 trace_gicv3_icc_ctlr_read(gicv3_redist_affid(cs), value); in icc_ctlr_el1_read()
2178 return value; in icc_ctlr_el1_read()
2182 uint64_t value) in icc_ctlr_el1_write() argument
2189 icv_ctlr_write(env, ri, value); in icc_ctlr_el1_write()
2193 trace_gicv3_icc_ctlr_write(gicv3_redist_affid(cs), value); in icc_ctlr_el1_write()
2208 cs->icc_ctlr_el1[bank] |= (value & mask); in icc_ctlr_el1_write()
2216 uint64_t value; in icc_ctlr_el3_read() local
2218 value = cs->icc_ctlr_el3; in icc_ctlr_el3_read()
2220 value |= ICC_CTLR_EL3_EOIMODE_EL1NS; in icc_ctlr_el3_read()
2223 value |= ICC_CTLR_EL3_CBPR_EL1NS; in icc_ctlr_el3_read()
2226 value |= ICC_CTLR_EL3_EOIMODE_EL1S; in icc_ctlr_el3_read()
2229 value |= ICC_CTLR_EL3_CBPR_EL1S; in icc_ctlr_el3_read()
2232 trace_gicv3_icc_ctlr_el3_read(gicv3_redist_affid(cs), value); in icc_ctlr_el3_read()
2233 return value; in icc_ctlr_el3_read()
2237 uint64_t value) in icc_ctlr_el3_write() argument
2242 trace_gicv3_icc_ctlr_el3_write(gicv3_redist_affid(cs), value); in icc_ctlr_el3_write()
2246 if (value & ICC_CTLR_EL3_EOIMODE_EL1NS) { in icc_ctlr_el3_write()
2249 if (value & ICC_CTLR_EL3_CBPR_EL1NS) { in icc_ctlr_el3_write()
2254 if (value & ICC_CTLR_EL3_EOIMODE_EL1S) { in icc_ctlr_el3_write()
2257 if (value & ICC_CTLR_EL3_CBPR_EL1S) { in icc_ctlr_el3_write()
2265 cs->icc_ctlr_el3 |= (value & mask); in icc_ctlr_el3_write()
2691 uint64_t value; in ich_ap_read() local
2693 value = cs->ich_apr[grp][regno]; in ich_ap_read()
2694 trace_gicv3_ich_ap_read(ri->crm & 1, regno, gicv3_redist_affid(cs), value); in ich_ap_read()
2695 return value; in ich_ap_read()
2699 uint64_t value) in ich_ap_write() argument
2705 trace_gicv3_ich_ap_write(ri->crm & 1, regno, gicv3_redist_affid(cs), value); in ich_ap_write()
2708 cs->ich_apr[grp][regno] = value & (0xFFFFFFFFU | ICV_AP1R_EL1_NMI); in ich_ap_write()
2710 cs->ich_apr[grp][regno] = value & 0xFFFFFFFFU; in ich_ap_write()
2718 uint64_t value = cs->ich_hcr_el2; in ich_hcr_read() local
2720 trace_gicv3_ich_hcr_read(gicv3_redist_affid(cs), value); in ich_hcr_read()
2721 return value; in ich_hcr_read()
2725 uint64_t value) in ich_hcr_write() argument
2729 trace_gicv3_ich_hcr_write(gicv3_redist_affid(cs), value); in ich_hcr_write()
2731 value &= ICH_HCR_EL2_EN | ICH_HCR_EL2_UIE | ICH_HCR_EL2_LRENPIE | in ich_hcr_write()
2737 cs->ich_hcr_el2 = value; in ich_hcr_write()
2744 uint64_t value = cs->ich_vmcr_el2; in ich_vmcr_read() local
2746 trace_gicv3_ich_vmcr_read(gicv3_redist_affid(cs), value); in ich_vmcr_read()
2747 return value; in ich_vmcr_read()
2751 uint64_t value) in ich_vmcr_write() argument
2755 trace_gicv3_ich_vmcr_write(gicv3_redist_affid(cs), value); in ich_vmcr_write()
2757 value &= ICH_VMCR_EL2_VENG0 | ICH_VMCR_EL2_VENG1 | ICH_VMCR_EL2_VCBPR | in ich_vmcr_write()
2760 value |= ICH_VMCR_EL2_VFIQEN; in ich_vmcr_write()
2762 cs->ich_vmcr_el2 = value; in ich_vmcr_write()
2776 uint64_t value; in ich_lr_read() local
2785 value = extract64(cs->ich_lr_el2[regno], 32, 32); in ich_lr_read()
2786 trace_gicv3_ich_lrc_read(regno, gicv3_redist_affid(cs), value); in ich_lr_read()
2788 value = extract64(cs->ich_lr_el2[regno], 0, 32); in ich_lr_read()
2789 trace_gicv3_ich_lr32_read(regno, gicv3_redist_affid(cs), value); in ich_lr_read()
2792 value = cs->ich_lr_el2[regno]; in ich_lr_read()
2793 trace_gicv3_ich_lr_read(regno, gicv3_redist_affid(cs), value); in ich_lr_read()
2796 return value; in ich_lr_read()
2800 uint64_t value) in ich_lr_write() argument
2812 trace_gicv3_ich_lrc_write(regno, gicv3_redist_affid(cs), value); in ich_lr_write()
2813 value = deposit64(cs->ich_lr_el2[regno], 32, 32, value); in ich_lr_write()
2815 trace_gicv3_ich_lr32_write(regno, gicv3_redist_affid(cs), value); in ich_lr_write()
2816 value = deposit64(cs->ich_lr_el2[regno], 0, 32, value); in ich_lr_write()
2819 trace_gicv3_ich_lr_write(regno, gicv3_redist_affid(cs), value); in ich_lr_write()
2824 value = deposit64(value, ICH_LR_EL2_PRIORITY_SHIFT, in ich_lr_write()
2830 value &= ~ICH_LR_EL2_NMI; in ich_lr_write()
2833 cs->ich_lr_el2[regno] = value; in ich_lr_write()
2840 uint64_t value; in ich_vtr_read() local
2842 value = ((cs->num_list_regs - 1) << ICH_VTR_EL2_LISTREGS_SHIFT) in ich_vtr_read()
2849 value |= ICH_VTR_EL2_NV4; in ich_vtr_read()
2852 trace_gicv3_ich_vtr_read(gicv3_redist_affid(cs), value); in ich_vtr_read()
2853 return value; in ich_vtr_read()
2859 uint64_t value = maintenance_interrupt_state(cs); in ich_misr_read() local
2861 trace_gicv3_ich_misr_read(gicv3_redist_affid(cs), value); in ich_misr_read()
2862 return value; in ich_misr_read()
2868 uint64_t value = eoi_maintenance_interrupt_state(cs, NULL); in ich_eisr_read() local
2870 trace_gicv3_ich_eisr_read(gicv3_redist_affid(cs), value); in ich_eisr_read()
2871 return value; in ich_eisr_read()
2877 uint64_t value = 0; in ich_elrsr_read() local
2885 value |= (1 << i); in ich_elrsr_read()
2889 trace_gicv3_ich_elrsr_read(gicv3_redist_affid(cs), value); in ich_elrsr_read()
2890 return value; in ich_elrsr_read()