@samitouri / QOSamiQemu / commits / 2f36257492

target/arm: GICv5 cpuif: Implement PPI enable register

Implement the GICv5 register which holds the enable state of PPIs: ICC_PPI_ENABLER<n>_EL1. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com> Message-id: 20260327111700.795099-40-peter.maydell@linaro.org

Peter Maydell committed Mar 27, 2026 at 11:16 UTC 2f36257492dcd66438f2f00560b37fd9044ef00a
2 files changed +19
target/arm/cpu.h
+1
@@ -606,6 +606,7 @@ typedef struct CPUArchState {
606 uint64_t ppi_active[GICV5_NUM_PPIS / 64];
607 uint64_t ppi_hm[GICV5_NUM_PPIS / 64];
608 uint64_t ppi_pend[GICV5_NUM_PPIS / 64];
609 + uint64_t ppi_enable[GICV5_NUM_PPIS / 64];
610 } gicv5_cpuif;
611
612 struct {
target/arm/tcg/gicv5-cpuif.c
+18
@@ -219,6 +219,12 @@ static void gic_ppi_spend_write(CPUARMState *env, const ARMCPRegInfo *ri,
219 raw_write(env, ri, old | value);
220 }
221
222 +static void gic_ppi_enable_write(CPUARMState *env, const ARMCPRegInfo *ri,
223 + uint64_t value)
224 +{
225 + raw_write(env, ri, value);
226 +}
227 +
228 static const ARMCPRegInfo gicv5_cpuif_reginfo[] = {
229 /*
230 * Barrier: wait until the effects of a cpuif system register
@@ -334,6 +340,18 @@ static const ARMCPRegInfo gicv5_cpuif_reginfo[] = {
340 .fieldoffset = offsetof(CPUARMState, gicv5_cpuif.ppi_hm[1]),
341 .resetvalue = PPI_HMR1_RESET,
342 },
343 + { .name = "ICC_PPI_ENABLER0_EL1", .state = ARM_CP_STATE_AA64,
344 + .opc0 = 3, .opc1 = 0, .crn = 12, .crm = 10, .opc2 = 6,
345 + .access = PL1_RW, .type = ARM_CP_IO | ARM_CP_NO_RAW,
346 + .fieldoffset = offsetof(CPUARMState, gicv5_cpuif.ppi_enable[0]),
347 + .writefn = gic_ppi_enable_write,
348 + },
349 + { .name = "ICC_PPI_ENABLER1_EL1", .state = ARM_CP_STATE_AA64,
350 + .opc0 = 3, .opc1 = 0, .crn = 12, .crm = 10, .opc2 = 7,
351 + .access = PL1_RW, .type = ARM_CP_IO | ARM_CP_NO_RAW,
352 + .fieldoffset = offsetof(CPUARMState, gicv5_cpuif.ppi_enable[1]),
353 + .writefn = gic_ppi_enable_write,
354 + },
355 { .name = "ICC_PPI_CPENDR0_EL1", .state = ARM_CP_STATE_AA64,
356 .opc0 = 3, .opc1 = 0, .crn = 12, .crm = 13, .opc2 = 4,
357 .access = PL1_RW, .type = ARM_CP_ALIAS | ARM_CP_IO | ARM_CP_NO_RAW,