Page MenuHomeFreeBSD

gic_v3: Correctly handle GICC GIGR Base Address case
AcceptedPublic

Authored by jrtc27 on Wed, Nov 13, 11:33 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 18, 4:13 PM
Unknown Object (File)
Mon, Nov 18, 3:10 PM
Unknown Object (File)
Fri, Nov 15, 10:18 PM
Unknown Object (File)
Fri, Nov 15, 11:36 AM
Unknown Object (File)
Thu, Nov 14, 5:54 PM
Unknown Object (File)
Thu, Nov 14, 4:45 PM
Unknown Object (File)
Thu, Nov 14, 12:55 PM
Unknown Object (File)
Thu, Nov 14, 10:06 AM
Subscribers

Details

Reviewers
andrew
manu
phk
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 60544
Build 57428: 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.Thu, Nov 14, 7:07 AM