Page MenuHomeFreeBSD

gic_v3: Correctly handle GICC GIGR Base Address case
ClosedPublic

Authored by jrtc27 on Nov 13 2024, 11:33 PM.
Tags
None
Referenced Files
F106174378: D47560.diff
Thu, Dec 26, 3:04 PM
Unknown Object (File)
Mon, Dec 9, 11:58 PM
Unknown Object (File)
Mon, Dec 9, 5:53 PM
Unknown Object (File)
Nov 18 2024, 4:13 PM
Unknown Object (File)
Nov 18 2024, 3:10 PM
Unknown Object (File)
Nov 15 2024, 10:18 PM
Unknown Object (File)
Nov 15 2024, 11:36 AM
Unknown Object (File)
Nov 14 2024, 5:54 PM
Subscribers

Details

Summary

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.

MFC after: 1 week

Test Plan

Get phk to try it out (and wait for my local build to find any stupid syntax errors built locally without error first time, be afraid)

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 60540
Build 57424: arc lint + arc unit

Event Timeline

sys/arm64/arm64/gic_v3_var.h
61

Bool?

sys/arm64/arm64/gic_v3_var.h
61

Was to be consistent with line 80... but now I see line 44 uses bool

For reference: madt_data->dist->Version is 4

This works on my T14s G6 Snapdragon machine. (when used together with other necessary changes)

This revision is now accepted and ready to land.Nov 14 2024, 7:07 AM

Ping ?

This is a showstopper for Snapdragon Elite support.