Page MenuHomeFreeBSD

acpidump: Add -T TBLN to print a specific ACPI fixed table
ClosedPublic

Authored by imp on Oct 11 2024, 9:54 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 18, 9:08 PM
Unknown Object (File)
Wed, Dec 18, 10:49 AM
Unknown Object (File)
Sat, Dec 7, 8:17 PM
Unknown Object (File)
Sat, Dec 7, 7:57 PM
Unknown Object (File)
Nov 25 2024, 3:35 PM
Unknown Object (File)
Nov 24 2024, 5:32 AM
Unknown Object (File)
Nov 24 2024, 5:32 AM
Unknown Object (File)
Nov 24 2024, 5:32 AM
Subscribers
None

Details

Summary

Add the ability to dump a specific ACPI table rather than all of them.

Sponsored by: Netflix

Diff Detail

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

Event Timeline

imp requested review of this revision.Oct 11 2024, 9:54 PM
imp created this revision.
usr.sbin/acpi/acpidump/acpi.c
2552

I wonder if I would put that check into the caller. Here at first I thought it's an error but in fact it's just "not that one, skip".
While having an explicit continue in the caller makes that more obvious.
(personal feeling; feel free to ignore)

usr.sbin/acpi/acpidump/acpi.c
2552

I think it's fine like this.
There's bigger structural problems with this code, like the series of ugly if statements that should just be a loop. And the fact this should be more like a callback than this this current structure. I plan on adding this functionality to the boot loader to help diagnose more issues there, and will revisit the structural issues at that time so I come up with a better structure that can be shared between both of them.

usr.sbin/acpi/acpidump/acpi.c
2552

Can we use sizeof(sdp->Signature) or ACPI_NAMESEG_SIZE rather than 4?

2603

And here

usr.sbin/acpi/acpidump/acpi.c
2552

I'll do a quick followup commit for this.

update with andy's suggestions (I reworked things differently than I thought
I would in earlier comments).

imp marked 3 inline comments as done.Oct 14 2024, 4:37 PM
This revision is now accepted and ready to land.Oct 15 2024, 8:12 AM