Page MenuHomeFreeBSD

dev/uart: Use a linker set to find uart classes
ClosedPublic

Authored by andrew on Jan 8 2024, 5:26 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, May 12, 6:41 PM
Unknown Object (File)
Sat, May 11, 1:24 AM
Unknown Object (File)
Fri, May 10, 5:15 AM
Unknown Object (File)
Thu, May 9, 10:38 PM
Unknown Object (File)
Mon, May 6, 12:12 AM
Unknown Object (File)
Tue, Apr 30, 12:29 AM
Unknown Object (File)
Apr 6 2024, 2:29 PM
Unknown Object (File)
Mar 25 2024, 10:36 PM
Subscribers

Details

Summary

When the uart is configured via the environment we need to find the
uart class with a specified name. Currently to do this with an
incomplete list of uarts. As we may not have included all uarts in the
kernel each class is defined as weak.

Switch to a linker set so the list is always up to date based on what
is included in the kernel, and the class can be static.

Sponsored by: Arm Ltd

Diff Detail

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

Event Timeline

andrew requested review of this revision.Jan 8 2024, 5:26 PM
andrew created this revision.

I've stumbled over this in the past when I've not had the time to fix. Thanks!

This revision is now accepted and ready to land.Jan 8 2024, 6:15 PM
bz added subscribers: jhb, bz.

I've head a slightly more elaborate version of this from @jhb since 2019.
I'l add @jhb to Cc:
Also I'll try to upload the diff as an attachment so you can have a look.

side effect: this removes weak symbols showing up in backtraces of panic if going through 0.{F74534184}