Jump to content

Getting ACPI tables


TennisGeek
 Share

15 posts in this topic

Recommended Posts

There are two python scripts, one for Mac's ioreg, one for Linux (Ubuntu Live CD works).

There is a acpi dump script for Linux floating around, written in perl, but A - it does not work with later version of Ubuntu (like Karmic, Lucid), B - 64bit version. Mine is written in Python, and should work with any version/flavor of Ubuntu Live CD. (If not, please let me know.)

 

Get ACPI from Mac's ioreg command.

Attached as "get_acpi_tables.py.zip". MacOS comes with Python, generally speaking.

 

ioreg command, when dumped in full contains the hex printed ACPI tables. They are, I think, what Mac is seeing. If you want to know your patched ACPI tables are loaded or not, that's where you'd look.

 

Just run it, and it creates ACPI tables (.aml files) such as DSDT.aml, SSDT.aml, etc.

It's handy when you want to know what your hack is seeing.

 

Start a terminal.

The command creates multiple .aml files in the current directory. So, create a directory.

 

$ mkdir tables

$ cd tables

$ <path-to-the-script>/get_acpi_tables.py

./get_acpi_tables.py:3: DeprecationWarning: The popen2 module is deprecated. Use the subprocess module.

import os, sys, popen2, re, binascii

5554 lines

acpi tables found.

"SSDT"=

"SSDT-1

"RSDT"=

"APIC"=

"DSDT"=

"MCFG"=

"FACS"=

"FACP"=

$ ls

APIC.aml FACP.aml MCFG.aml SSDT-1.aml

DSDT.aml FACS.aml RSDT.aml SSDT.aml

 

 

Ignore the warning now.

 

Get ACPI from Ubuntu

 

Ubuntu Live CD always contains Python.

Attached as "dump_acpi.py.zip". (I wish I could upload non-zipped file.)

This one works with pretty much any flavor of Ubuntu Live CD. I tried it with Ubuntu Kalmic (9.10) AMD64.

 

Run the script, and it should create a ZIPed archive (like perl one does).

If your Ubuntu does not have acpidump or zip, it'll ask you to install. So, if you are using a Live CD, be sure to have a net connection since you need to install acpidump and zip packages.

 

Once the command successfully runs, you'll get a zipped archive with timestamp in your current directory.

 

UPDATE on 2010-Nov-05:

I used the script on my Zotac with Ubuntu 9.04 32bit, and did not run too well, so I worked out some kinks, and added some features as well.

I updated script to do followings

a - If it's Ubuntu, update /etc/apt/sources.list to include universe

b - run apt-get update

c - install acpidump

so that you don't have to.

(I am writing this on Ubuntu 9.04 live CD.)

 

If the script has any problem, please let me know.

 

-- TG

get_acpi_tables.py.zip

acpi_dump.py.zip

  • Like 3
Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...
  • 2 years later...

There's no reason to do that on a real Mac.

 

The reason why we extract ACPI tables on PCs that run OS X is so that we can make modifications to them, to improve compatibility. The bootloader then loads the modified tables, overriding the tables already present on the system - the ones you've just extracted with the perl script.

 

It's pointless to keep unmodified DSDT.aml and SSDT.aml in /Extra, even more so on a real Mac, because on a real Mac there are no compatibility issues to fix.

And, if you have not modified the tables in any way, you now have Chimera loading the same data that the system was already seeing. Therefore what you just did is completely pointless, and only serves to delay your boot process.

Link to comment
Share on other sites

  • 5 months later...
  • 1 year later...

hey , The "acpi_dump.py" didn't work in linux(Ubuntu 14.10 live CD) . It will create a empty file and a empty ZIPed archive .

All of the ACPI tables in Ubuntu should be in /sys/firmware/acpi/tables. Try this: http://alexhungdmz.blogspot.com/2012/05/how-to-dump-acpi-tables-in-ubuntu.html The example used in that link is for DSDT, but you can use it for any ACPI table.

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 year later...

But not the dynamically loaded tables ;)

Note: What I mean by "not the dynamic...tables" is that dynamic tables should not be placed in ACPI/patched. They are loaded dynamically with ACPI Load opcode (conditional logic within DSDT or static SSDTs).

 

Clover F4 extract marks dynamic tables with 'x'.

Link to comment
Share on other sites

  • 3 months later...
 Share

×
×
  • Create New...