How to use ACPI

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
AlfaOmega08
Member
Member
Posts: 226
Joined: Wed Nov 07, 2007 12:15 pm
Location: Italy

How to use ACPI

Post 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.
cyr1x
Member
Member
Posts: 207
Joined: Tue Aug 21, 2007 1:41 am
Location: Germany

Post 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.
xyzzy
Member
Member
Posts: 391
Joined: Wed Jul 25, 2007 8:45 am
Libera.chat IRC: aejsmith
Location: London, UK
Contact:

Post by xyzzy »

There isn't a tutorial for everything. Sometimes the spec is the only way, even if it is "too long"
User avatar
AlfaOmega08
Member
Member
Posts: 226
Joined: Wed Nov 07, 2007 12:15 pm
Location: Italy

Post 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?
User avatar
bewing
Member
Member
Posts: 1401
Joined: Wed Feb 07, 2007 1:45 pm
Location: Eugene, OR, US

Post 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 ....
cyr1x
Member
Member
Posts: 207
Joined: Tue Aug 21, 2007 1:41 am
Location: Germany

Post 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.
User avatar
AlfaOmega08
Member
Member
Posts: 226
Joined: Wed Nov 07, 2007 12:15 pm
Location: Italy

Post 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... :oops:
User avatar
Masterkiller
Member
Member
Posts: 153
Joined: Sat May 05, 2007 6:20 pm

Post 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.
ALCA OS: Project temporarity suspended!
Current state: real-mode kernel-FS reader...
Post Reply