Page 1 of 1
acpi dsdt dump utility
Posted: Wed Jul 29, 2020 7:14 pm
by BenLunt
A fellow coder grabbed my bootable image, wrote it to a USB thumb drive, and booted it on a laptop. It made it to the point where I parse the ACPI/AML data and froze.
I asked if they would dump the DSDT table(s) for me and send them my way. Come to find out, this user does not have any OS currently installed on that laptop so all bootups must be from a USB thumb drive.
Intel currently has
freely available utilities for both Windows and *nix platforms that will extract the DSDT tables. However, the disadvantage in this case is that the user doesn't have either platform installed.
I could easily write a DOS app that would find the DSDT and dump it to a file, place it on a FreeDOS formatted thumb drive (image) and ask this user to go that route.
However, I am sure that there is someone here that has already done this. Therefore, I am asking if someone has and is willing to share it. All it needs to do is find the DSDT and of course the AML that follows it and write it to a file.
With this in mind, I went debugging and testing my current implementation of my AML parser and went looking for available DSDT.DAT files, courtesy of
the utilities mentioned above.
In case someone else is looking for the same, I found a few rather large/complex ones:
https://kevinlocke.name/misc/t430-acpi/
https://github.com/Lekensteyn/acpi-stuf ... levo_B7130
If anyone knows of others, will you please let me know so that I can add them to this list as well as test my code?
Thanks,
Ben
Re: acpi dsdt dump utility
Posted: Wed Jul 29, 2020 11:06 pm
by Korona
We (= active developers of LAI) just use Intel's acpidump. It's available from all Linux distros and ACPICA's website hosts Windows binaries. I would expect users to be more inclined towards using a tools from their distro's repository than an obscure tool that you need to run on FreeDOS (does FreeDOS even boot on UEFI?). You're just reinventing the wheel here.
We also make heavy use of iasl -l which gives you a AML disassembly annotated with instruction offsets. LAI has a tracing mode that outputs instruction offsets, so it's very easy to see where things break. iasl is also used to assemble the tests that our CI runs.
Regarding DSDT files: I have a collection but I don't think that we're allowed to publish it - that is IP of the BIOS vendor.
Re: acpi dsdt dump utility
Posted: Thu Jul 30, 2020 8:50 pm
by BenLunt
Hi Korona,
I agree and use Intel's distribution as well. However, as stated before, this particular user does not have anything installed on this particular laptop, so they cannot simply download and use said utilities.
This user is the only one as of yet to have a problem with my AML parser code. I am looking for a way to get the AML code from this laptop without much effort on his/her part.
Therefore, I was just asking if anyone had written a small utility that ran in DOS or was bootable from a USB drive that would retrieve it for me. Yes, one could write a small *nix distro to the USB, but this would involve a hefty download on their part, which I don't think they are willing to do, just to get the AML code.
If I feel it to be worth the trouble, I may just put one together on a bootable FreeDOS image and ask them to go that route.
Thanks,
Ben
Re: acpi dsdt dump utility
Posted: Fri Jul 31, 2020 12:02 am
by nullplan
BenLunt wrote:I agree and use Intel's distribution as well. However, as stated before, this particular user does not have anything installed on this particular laptop, so they cannot simply download and use said utilities.
Linux Live distributions exist. You can download stuff onto a USB stick and boot from it, and you get a running Linux. Enough to run acpidump.
Re: acpi dsdt dump utility
Posted: Sat Aug 01, 2020 7:21 pm
by BenLunt
BenLunt wrote:I could easily write a DOS app that would find the DSDT and dump it to a file, place it on a FreeDOS formatted thumb drive (image) and ask this user to go that route.
I must be losing my mind. In updating some code and files, I came across this
exact utility I had written so many years ago that does exactly what I asked for. (
Anyone seen my Marbles?)
Anyway, it is for Legacy BIOS only, not UEFI. It should work for the current circumstances.
Sorry for the bother....
Ben
Re: acpi dsdt dump utility
Posted: Sat Aug 08, 2020 1:43 pm
by BenLunt
Just for your interest, if someone else is working on their AML parser code and needs some example DSDT files, I found 40+ files at
https://groups.google.com/forum/#!topic ... GLBaYUIw3Y. Yes they are for android tablets, but AML is AML. :-)
Ben
Re: acpi dsdt dump utility
Posted: Sat Aug 08, 2020 3:11 pm
by BenLunt
Korona wrote:We (= active developers of LAI) just use Intel's acpidump. It's available from all Linux distros and ACPICA's website hosts Windows binaries. I would expect users to be more inclined towards using a tools from their distro's repository than an obscure tool that you need to run on FreeDOS (does FreeDOS even boot on UEFI?). You're just reinventing the wheel here.
We also make heavy use of iasl -l which gives you a AML disassembly annotated with instruction offsets. LAI has a tracing mode that outputs instruction offsets, so it's very easy to see where things break. iasl is also used to assemble the tests that our CI runs.
Regarding DSDT files: I have a collection but I don't think that we're allowed to publish it - that is IP of the BIOS vendor.
Korona,
Just a small observation, I think you might have a bug in the code at line 138
https://github.com/qword-os/lai/blob/ma ... xec.c#L138
You place the two operands in the same variable.
Code: Select all
lai_exec_get_integer(state, &operands[1], &offset);
lai_exec_get_integer(state, &operands[2], &offset);
Should it be the following instead?
Code: Select all
lai_exec_get_integer(state, &operands[1], &offset);
lai_exec_get_integer(state, &operands[2], &size);
Just checking. I don't know your code that well to be sure.
Ben
Re: acpi dsdt dump utility
Posted: Tue Aug 11, 2020 1:22 pm
by Korona
Thanks indeed a bug. Good catch! Thank you for pointing this out.