uint64_t ppi_hm[GICV5_NUM_PPIS / 64];
uint64_t ppi_pend[GICV5_NUM_PPIS / 64];
uint64_t ppi_enable[GICV5_NUM_PPIS / 64];
+ /* The PRIO regs have 1 byte per PPI, so 8 PPIs to a register */
+ uint64_t ppi_priority[GICV5_NUM_PPIS / 8];
} gicv5_cpuif;
struct {
raw_write(env, ri, value);
}
+static void gic_ppi_priority_write(CPUARMState *env, const ARMCPRegInfo *ri,
+ uint64_t value)
+{
+ raw_write(env, ri, value);
+}
+
static const ARMCPRegInfo gicv5_cpuif_reginfo[] = {
/*
* Barrier: wait until the effects of a cpuif system register
{
if (cpu_isar_feature(aa64_gcie, cpu)) {
define_arm_cp_regs(cpu, gicv5_cpuif_reginfo);
+
+ /*
+ * There are 16 ICC_PPI_PRIORITYR<n>_EL1 regs, so define them
+ * programmatically rather than listing them all statically.
+ */
+ for (int i = 0; i < 16; i++) {
+ g_autofree char *name = g_strdup_printf("ICC_PPI_PRIORITYR%d_EL1", i);
+ ARMCPRegInfo ppi_prio = {
+ .name = name, .state = ARM_CP_STATE_AA64,
+ .opc0 = 3, .opc1 = 0, .crn = 12,
+ .crm = 14 + (i >> 3), .opc2 = i & 7,
+ .access = PL1_RW, .type = ARM_CP_IO,
+ .fieldoffset = offsetof(CPUARMState, gicv5_cpuif.ppi_priority[i]),
+ .writefn = gic_ppi_priority_write, .raw_writefn = raw_write,
+ };
+ define_one_arm_cp_reg(cpu, &ppi_prio);
+ }
}
}