Parsing ACPI tables
-
- Member
- Posts: 76
- Joined: Sun Dec 14, 2008 1:53 pm
Parsing ACPI tables
I've been fairly busy on my OS over the past few days, and have got to the point where I want to parse the ACPI tables. I've been reading the ACPI specifications, and on page 108, section 5.2, it implies that the description tables are sequential in memory. Is this correct? Can I get a pointer to the System Description Table Header by getting the RSDP's address in memory and adding sizeof(RSDP), and so on?
Re: Parsing ACPI tables
Hi,
i worked in this module in my kernel but
i gave up ,because there is things more important in my opinion such memory manager, GUI, etc...
but you can take look in this URL,maybe useful for you
http://sourceforge.net/projects/acpi/
CheerS,
a.T.d
i worked in this module in my kernel but
i gave up ,because there is things more important in my opinion such memory manager, GUI, etc...
but you can take look in this URL,maybe useful for you
http://sourceforge.net/projects/acpi/
CheerS,
a.T.d
Distance doesn't make you any smaller,
but it does make you part of a larger picture.
but it does make you part of a larger picture.
-
- Member
- Posts: 76
- Joined: Sun Dec 14, 2008 1:53 pm
Re: Parsing ACPI tables
Thanks for that link, I've been looking through it for a little while now. It'll be very good further reading tomorrow morning, when I can put a fresh pair of eyes over it. From what I can see, the tables do indeed to appear consecutively in memory; this seems to be right, but I could do with a more authoritative voice on this
Re: Parsing ACPI tables
Did you check out Intel's reference implementation (ACPICA)?computafreak wrote:From what I can see, the tables do indeed to appear consecutively in memory; this seems to be right, but I could do with a more authoritative voice on this
JAL
Re: Parsing ACPI tables
Where does it imply the tables are sequential in memory? In section 5.2.4 it says (emphasis mine):
The OS locates that Root System Description Table by following the pointer in the Root
System Description Pointer structure. The Root System Description Table, shown in Table 5-
4, starts with the signature ‘RSDT,’ followed by an array of physical pointers to other System
Description Tables that provide various information on other standards defined on the current
system.
It gives you the physical address of the tables, you should should use this information to find the tables and you shouldn't make any assumptions about where they are located in memory. Even if right now the tables are sequential, unless this is explicitly stated you shouldn't depend on it.
The OS locates that Root System Description Table by following the pointer in the Root
System Description Pointer structure. The Root System Description Table, shown in Table 5-
4, starts with the signature ‘RSDT,’ followed by an array of physical pointers to other System
Description Tables that provide various information on other standards defined on the current
system.
It gives you the physical address of the tables, you should should use this information to find the tables and you shouldn't make any assumptions about where they are located in memory. Even if right now the tables are sequential, unless this is explicitly stated you shouldn't depend on it.
-
- Member
- Posts: 76
- Joined: Sun Dec 14, 2008 1:53 pm
Re: Parsing ACPI tables
jal: No, I've not looked at that yet, I'll download it in a few minutes
thooot: I made the mistake of skim-reading it. I saw the list of tables and assumed that they would be sequential in memory. Having looked at the source code from the first link I was given, rereading the specification thoroughly, and a little bit of experimentation, I worked out that they point to one another (i.e FACP points to DSDT and FACS). I've got the MADT completely parsed now, and I'm working on the other tables. Thanks for the definitive answer though
thooot: I made the mistake of skim-reading it. I saw the list of tables and assumed that they would be sequential in memory. Having looked at the source code from the first link I was given, rereading the specification thoroughly, and a little bit of experimentation, I worked out that they point to one another (i.e FACP points to DSDT and FACS). I've got the MADT completely parsed now, and I'm working on the other tables. Thanks for the definitive answer though
Re: Parsing ACPI tables
It's worth looking at. Even if you are making your own parser and interpreter, it's good to have a reference implementation when you're stuck or run into weird things the specs don't tell you.computafreak wrote:jal: No, I've not looked at that yet, I'll download it in a few minutes
JAL