diff --git a/sys/arm64/arm64/gicv3_its.c b/sys/arm64/arm64/gicv3_its.c --- a/sys/arm64/arm64/gicv3_its.c +++ b/sys/arm64/arm64/gicv3_its.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -827,8 +828,18 @@ /* Make sure the GIC has seen everything */ dsb(sy); + } else { + KASSERT(sc->sc_pend_base[cpuid] == 0, + ("PREALLOC too soon cpuid %d", cpuid)); + tmp = gic_r_read_8(gicv3, GICR_PENDBASER); + tmp &= GICR_PENDBASER_PA_MASK; + if (!physmem_excluded(tmp, LPI_PENDTAB_SIZE)) + panic("gicv3 PENDBASER on cpu %d needs to reuse 0x%#lx, but not reserved\n", + cpuid, tmp); + sc->sc_pend_base[cpuid] = PHYS_TO_DMAP(tmp); } + if (bootverbose) device_printf(gicv3, "using %sPENDBASE of %#lx on cpu %d\n", (sc->sc_its_flags & ITS_FLAGS_LPI_PREALLOC) ? "pre-existing " : "",