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)
Mon, Nov 4, 5:01 PM
Unknown Object (File)
Oct 9 2024, 7:33 PM
Unknown Object (File)
Oct 1 2024, 5:46 AM
Unknown Object (File)
Sep 27 2024, 9:18 AM
Unknown Object (File)
Sep 22 2024, 5:28 AM
Unknown Object (File)
Sep 22 2024, 12:10 AM
Unknown Object (File)
Sep 21 2024, 1:57 PM
Unknown Object (File)
Sep 18 2024, 2:12 AM
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 55292
Build 52181: arc lint + arc unit

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}