Page 1 of 1

What kind of informations may ACPI provide?

Posted: Tue Apr 21, 2009 7:27 am
by Tomaka17
Hello,

My question is not about implementing ACPI, but what type of informations will I get about the hardware if I implement ACPI?

Sleeping some hardware in order to save energy is not really my priority in osdev for the moment :P
So the main reason why I would implement ACPI is to scan the hardware

But I took a look at the specifications and it seems really complex, I've got no idea about the type of informations it can provide

That's why I wanted to know if there is there any advantage in using ACPI rather than PCI configuration space for example?


EDIT : typo

Re: What kind of informations may ACPI provide?

Posted: Tue Apr 21, 2009 7:36 am
by johnsa
Im no expert on ACPI, but you will need to scan the ACPI tables to obtain information about SMP/multi-core setup, APICs and to get the MM-IO space for PCI device setup.
The traditional two ports available for PCI config are considered legacy and don't provide access to the extended PCI config space, in fact they won't work at all for PCIe as far as I know.

Re: What kind of informations may ACPI provide?

Posted: Tue Apr 21, 2009 8:13 am
by Tomaka17
Thanks

But does ACPI detect all the devices (including PCI ones) or just the PCI configuration space which you must use to detect PCI devices (which then you must use to detect USB devices)?

The implicit question is: is it worth implementing?

Re: What kind of informations may ACPI provide?

Posted: Tue Apr 21, 2009 8:24 am
by johnsa
For myself I'm about to journey down the same path and from what I understand of ACPI it's absolutely essential to implement at least the config part. The power management and device management parts
may be avoidable initially (and they're after all the most complex part in terms of ASL and it's own sort of microcode).

It doesn't return PCI device lists etc, it will give you access to the info to be able to scan the PCI bus and enumerate them yourself... this of course though assumes you have the PCI specification documents from PCI-SIG as the ACPI specification doesn't detail what those tables look like... you can have a look at the linux kernel / pci and acpi code to see what the format of the tables are.

I'm busy trying to get my PS/2 controller driver 100% first, then I'll be working on the ACPI table scanning, from that I should have enough info to enumerate the PCI/e bus fully. Then it'll be finding USB host controllers, then installing the respective driver code for them and once again enumerating the attached USB devices.