Page 1 of 1
How to use ACPI
Posted: Thu Mar 27, 2008 1:03 pm
by AlfaOmega08
Where can I found some complete ACPI tutorial?
I've downloaded the Specification on
www.acpi.info but it's too much long!!!
Somewhere I've read I've to look for the "RDS PTR" signature in the BIOS Area but in the Specification there is nothing about it.
Posted: Thu Mar 27, 2008 1:32 pm
by cyr1x
A complete ACPI tutorial are you kidding, aren't you ?? Neither Microsoft(OK, they can, but there are some compatibility issues) nor the Linux developer's can get it right and you want a "complete" tutorial? Maybe you just want to detect the CPU's ? Brendan has good code for this in BCOS.
Posted: Thu Mar 27, 2008 1:40 pm
by xyzzy
There isn't a tutorial for everything. Sometimes the spec is the only way, even if it is "too long"
Posted: Thu Mar 27, 2008 1:42 pm
by AlfaOmega08
Ok. I understand there isn't a tutorial for everythings...
But for example in the SMBIOS Specification I found all the Structure Tables, how to find them and how to use them. There isn't something like this for ACPI?
Posted: Thu Mar 27, 2008 1:54 pm
by bewing
First, you have to learn The Curse of a Thousand Curse Words, and then you have to tie your APM Fairy to a stake ....
Posted: Thu Mar 27, 2008 2:00 pm
by cyr1x
Somewhere I've read I've to look for the "RDS PTR" signature in the BIOS Area but in the Specification there is nothing about it.
I looked a bit through the spec and found it after 2 minutes. It is on site 107 respective 89.
Posted: Fri Mar 28, 2008 9:58 am
by AlfaOmega08
Somewhere I've read I've to look for the "RDS PTR" signature in the BIOS Area but in the Specification there is nothing about it.
I looked a bit through the spec and found it after 2 minutes. It is on site 107 respective 89.
I've looked for "RDS PTR" while it is "RSD PTR". Excuse me...
Posted: Fri Mar 28, 2008 11:04 am
by Masterkiller
First your find and read (also check for errors) RSD PTR. Then you use 32-bit address (I have switched to unreal mode to gain access to higher memory areas) and read RSDT. The table entries are pointer to another tables, but only few of them has valuable information. Scan the RSDT and find FACP. The FACP contains physical addresses in memory and values from which you could control the power I suppose (I've never read all the FACP specification). The FACP has a pointer to DSDT. DSDT table has a header and the rest of the table is ACPI Machine Language. It is describing language which gives you information about the system and you should write code, that decodes and uses ACPI Machine Language. The good news is that language is not difficult to learn and all the values are in AML code itself. According to specification, all names in the AML should be unique (for example "BEEP" OpRegion that points to I/O port 61h). Anyway for the boot process you may be only interested in names starting with _ they are reserved. For example scanning \_PR_ namespace you can find all the processors in the system, their CPUID and CPU blocks in memory (I don't know what information they contains).
Even the specification is long I suggest you to read first part 18 for AML and then part 5, 6, 7 and so on describing the configuration with ACPI.