Page MenuHomeFreeBSD

gicv3: If the LPI is already allocated, remember it
ClosedPublic

Authored by imp on Feb 23 2024, 4:47 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jun 24, 9:34 PM
Unknown Object (File)
Mon, Jun 24, 6:02 PM
Unknown Object (File)
May 22 2024, 12:01 PM
Unknown Object (File)
May 22 2024, 5:02 AM
Unknown Object (File)
May 22 2024, 4:55 AM
Unknown Object (File)
May 22 2024, 3:31 AM
Unknown Object (File)
May 21 2024, 7:20 PM
Unknown Object (File)
May 19 2024, 2:31 PM
Subscribers

Details

Summary

If the LPI has been pre-allocated by the boot loader, then we have to
remember PROPBASER and use it rather than allocating memory for it
ourselves. Linux provides us with a reserved table that contains all the
gicv3 allocates, so make sure what we read from PROPBASER matches
something in that table. Normally, the boot loader would leave the gic
in a reset state. However, Linux brings it up fully so it can do I/O to
boot the next kernel (us in this case). Since the gicv3 can't be
restarted due to undefined behavior, we have to use the mapping we
discover.

With this commit, the workaround is complete. Details are at
https://lkml.iu.edu/hypermail/linux/kernel/1809.2/06246.html
and pointers in the thread.

Sponsored by: Netflix

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Better panic message
Fix GICV3_ITS_MASK usage and definition

With this, I can now boot on all the same hardware that the old, hacky version did.

andrew added inline comments.
sys/arm64/arm64/gicv3_its.c
726–727

Should this be behind bootverbose?

This revision is now accepted and ready to land.Feb 27 2024, 10:19 AM
This revision now requires review to proceed.Feb 27 2024, 4:31 PM

Toss this message behind a bootverbose.

This revision is now accepted and ready to land.Feb 28 2024, 10:20 AM