HomeFreeBSD

gic_v3: Correctly handle GICC GIGR Base Address case

Description

gic_v3: Correctly handle GICC GIGR Base Address case

When using the GICR Base Address field from each GICC structure instead
of GICR structures, the field gives the address of a single
redistributor page. However, that does not mean that they are not
contiguous, and so GICR_TYPER.Last could be clear on them. Thus we must
ignore GICR_TYPER.Last in this case and always treat each region as
having a single page. Normally we'd do that as a result of checking
against the rman's size (though that's a rather roundabout and iffy way
of achieving it), but for whatever reason this is bigger on the Qualcomm
Snapdragon X Elite (I assume the MADT reports GICv4 but TYPER doesn't
report VLPIS and so there is a mismatch between the rman size and the
stride used) and we end up walking off the region's mapping.

Reviewed by: andrew, phk
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D47560

Details

Provenance
jrtc27Authored on Dec 9 2024, 9:55 PM
Reviewer
andrew
Differential Revision
D47560: gic_v3: Correctly handle GICC GIGR Base Address case
Parents
rGc3f8900e6969: uniq: Fix off-by-one bug in -cD case.
Branches
Unknown
Tags
Unknown