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
acpi dsdt dump utility
Re: acpi dsdt dump utility
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.
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.
managarm: Microkernel-based OS capable of running a Wayland desktop (Discord: https://discord.gg/7WB6Ur3). My OS-dev projects: [mlibc: Portable C library for managarm, qword, Linux, Sigma, ...] [LAI: AML interpreter] [xbstrap: Build system for OS distributions].
Re: acpi dsdt dump utility
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
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
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.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.
Carpe diem!
Re: acpi dsdt dump utility
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?)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.
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
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
Ben
Re: acpi dsdt dump utility
Korona,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.
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);
Code: Select all
lai_exec_get_integer(state, &operands[1], &offset);
lai_exec_get_integer(state, &operands[2], &size);
Ben
Re: acpi dsdt dump utility
Thanks indeed a bug. Good catch! Thank you for pointing this out.
managarm: Microkernel-based OS capable of running a Wayland desktop (Discord: https://discord.gg/7WB6Ur3). My OS-dev projects: [mlibc: Portable C library for managarm, qword, Linux, Sigma, ...] [LAI: AML interpreter] [xbstrap: Build system for OS distributions].