What kind of informations may ACPI provide?

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
Tomaka17
Member
Member
Posts: 67
Joined: Thu Oct 02, 2008 8:20 am

What kind of informations may ACPI provide?

Post 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
Last edited by Tomaka17 on Tue Apr 21, 2009 8:06 am, edited 1 time in total.
MysteriOS
Currently working on: TCP/IP
johnsa
Member
Member
Posts: 296
Joined: Mon Oct 15, 2007 3:04 pm

Re: What kind of informations may ACPI provide?

Post 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.
User avatar
Tomaka17
Member
Member
Posts: 67
Joined: Thu Oct 02, 2008 8:20 am

Re: What kind of informations may ACPI provide?

Post 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?
MysteriOS
Currently working on: TCP/IP
johnsa
Member
Member
Posts: 296
Joined: Mon Oct 15, 2007 3:04 pm

Re: What kind of informations may ACPI provide?

Post 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.
Post Reply