Jump to content

Getting ACPI tables


  • Please log in to reply
5 replies to this topic

#1
TennisGeek

TennisGeek

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 127 posts
  • Gender:Male
  • Location:Boston 'burb, born in Japan
  • Interests:Tennis, Computer, Mac
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

Attached Files



#2
valv

valv

    InsanelyMac Architect

  • Members
  • PipPipPipPipPipPipPip
  • 910 posts
  • Gender:Male
  • Location:Unrevealed Area
  • Interests:Operating Systems<br />Networking<br />Security
Thank u for this! much appreciated.

#3
TennisGeek

TennisGeek

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 127 posts
  • Gender:Male
  • Location:Boston 'burb, born in Japan
  • Interests:Tennis, Computer, Mac
If you cannot install acpidump package in recent Ubuntu, you need to edit /etc/apt/sources to activate the "universe" repository.

-- TG

#4
dopeelf

dopeelf

    InsanelyMac Protégé

  • Members
  • Pip
  • 2 posts
How do I check if it's working? I am a total newbie who has a Mac Pro 2,1 which I use Chimera to boot Mountain Lion (EFI64 simulation). I booted up in Snow Leopard, ran the get_acpi_tables.py command and just copied the dsdt.aml and SSDT.aml files to my Extra folder. It seems to be working.

#5
Gringo Vermelho

Gringo Vermelho

    The Jan Bird fix

  • Supervisors
  • 6,045 posts
  • Gender:Male
  • Location:Brazil
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.

#6
Gringo Vermelho

Gringo Vermelho

    The Jan Bird fix

  • Supervisors
  • 6,045 posts
  • Gender:Male
  • Location:Brazil
Here's an easy way to get ACPI tables on Windows.

Install Lavalys Everest Corporate Edition (discontinued but the download is there if you scroll down, works fine in Windows 7)

Then do like this:
Attached File  Everest_right_click.png   303.74KB   57 downloads Attached File  Everest_ACPI_Dumper.png   334.06KB   59 downloads





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy