Page MenuHomeFreeBSD

Add AML dump option without concatinating SSDT's memory image
AcceptedPublic

Authored by takawata on Tue, Sep 24, 10:05 AM.
Tags
None
Referenced Files
F98344155: D46769.diff
Thu, Oct 3, 2:34 AM
Unknown Object (File)
Mon, Sep 30, 6:23 AM
Unknown Object (File)
Fri, Sep 27, 11:43 PM
Unknown Object (File)
Fri, Sep 27, 4:26 AM
Unknown Object (File)
Wed, Sep 25, 11:59 PM
Subscribers

Details

Reviewers
kib
andrew
mav
jhb
Summary

In some machine, like my ThinkPad X16, concatenate byte code will cause error in AML dump with iasl due to symbol duplicate. It is resolved by invoking iasl separately for each DSDT and SSDT's.

This patch add -s option to dump AML byte code without concatinating DSDT and SSDT's. Instead, It will concatenate output of iasl for each DSDT and SSDT's.

Test Plan

compile and invoke with

acpidump -s under

appropriate permission.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

I suspect that this 'separate' mode is how it is supposed to be evaluated and disassembled. Should we change to it, and flag to indicate to use concatenation?

Please upload the full context diff for the next version of the patch.

usr.sbin/acpi/acpidump/acpi.c
2652

if (rsdt != NULL) {
etc please follow style

With this patch , the -s option will produce multiple DefinitionBlock() for each SSDT 's in addtion to for DSDT,
on the contrary the -d option will produce a single DefinitionBlock() for DSDT.

-s output may not use DSDT override base, but with -d option will produce following output in my machine.

% acpidump -dv
will generate
acpidump: disassembling DSDT, iasl messages follow
File appears to be binary: found 158575 non-ASCII characters, disassembling
Binary file appears to be a valid ACPI table, disassembling
Input file /tmp/acpidump.VN8pr7/acpdump.din, Length 0x7E5C1 (517569) bytes
ACPI: DSDT 0x0000000000000000 07E5C1 (v02 LENOVO ICL 00000002 01000013)
Pass 1 parse of [DSDT]
ACPI Error: AE_ALREADY_EXISTS, During name lookup/catalog (20230628/psobject-372)
iasl exit status = 65280
acpidump: iasl processing complete

Ok. Please fix the style issues.

takawata edited the summary of this revision. (Show Details)
takawata edited the test plan for this revision. (Show Details)

style nits.

Please fix these remaining style issues before committing.

The man page should describe the new option (can be a follow-up change).

usr.sbin/acpi/acpidump/acpi.c
2655
usr.sbin/acpi/acpidump/acpidump.c
142
This revision is now accepted and ready to land.Sat, Sep 28, 9:36 PM

Update manual page for that.

This revision now requires review to proceed.Tue, Oct 1, 9:50 AM
usr.sbin/acpi/acpidump/acpidump.8
146 โ†—(On Diff #144079)

New sentence should start with a new line

149 โ†—(On Diff #144079)
usr.sbin/acpi/acpidump/acpidump.c
142

still not done

fix forgotten style fix and manual wording.

This revision is now accepted and ready to land.Wed, Oct 2, 5:53 AM