Where are the acpi tables?

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
gerryg400
Member
Member
Posts: 1801
Joined: Thu Mar 25, 2010 11:26 pm
Location: Melbourne, Australia

Where are the acpi tables?

Post by gerryg400 »

Are the ACPI tables always in a part of memory that is marked as reserved in the Grub memory tables ? If I zero all available memory will I overwrite the tables ?

Thanks in advance.
If a trainstation is where trains stop, what is a workstation ?
Selenic
Member
Member
Posts: 123
Joined: Sat Jan 23, 2010 2:56 pm

Re: Where are the acpi tables?

Post by Selenic »

Considering that:
a) The method which GRUB uses to get the memory map is part of the ACPI spec
b) The memory types include "ACPI reserved"

I'd guess that the ACPI table itself will be in an ACPI area. Either that or a 'reserved' section (eg, if it's in the BIOS ROM area, which I think is the case on at least Bochs)
gerryg400
Member
Member
Posts: 1801
Joined: Thu Mar 25, 2010 11:26 pm
Location: Melbourne, Australia

Re: Where are the acpi tables?

Post by gerryg400 »

Thanks Selenic. I think you're right so I'll go with that. I guess I'll find the truth when I test on a few more machines.
If a trainstation is where trains stop, what is a workstation ?
Selenic
Member
Member
Posts: 123
Joined: Sat Jan 23, 2010 2:56 pm

Re: Where are the acpi tables?

Post by Selenic »

An extra note: even if you don't use the ACPI memory map, you can just mark the area containing the ACPI table as reserved anyway, because you need to find it if you're going to use it. Same goes for any other tables you need (including the GRUB ones, which won't be marked as reserved in the memory map, but which will usually be below 1M)
rdos
Member
Member
Posts: 3311
Joined: Wed Oct 01, 2008 1:55 pm

Re: Where are the acpi tables?

Post by rdos »

I think I learned this the hard way. When I booted my OS with grub, the ACPI tables were ok (grubs memory-maps are ACPI friendly). However, when I booted with my own hd-loader, which didn't ask BIOS about memory maps, I thrashed the ACPI-tables because my kernel was loaded at top of physical memory. This was solved by using BIOS service int 15, E820 to get the memory map, and only using the memory BIOS reports as free.

On the machines I've tested on, the ACPI tables were on top of physical memory.
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Re: Where are the acpi tables?

Post by jal »

Or, y'all learn how to use the Wiki.


JAL
gerryg400
Member
Member
Posts: 1801
Joined: Thu Mar 25, 2010 11:26 pm
Location: Melbourne, Australia

Re: Where are the acpi tables?

Post by gerryg400 »

But where is the bit that answers the original question. I know what ACPI is and how to parse the ACPI data.

I want to know that Grub will absolutely always tell me that every single piece of ACPI data is within a peice of memory that it marks as reserved.
If a trainstation is where trains stop, what is a workstation ?
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Re: Where are the acpi tables?

Post by jal »

gerryg400 wrote:I want to know that Grub will absolutely always tell me that every single piece of ACPI data is within a piece of memory that it marks as reserved.
GRUB uses BIOS calls (especially 0xE820), and passes the litteral data from those calls to you. An ACPI BIOS will "absolutely always" tell you that the ACPI memory is reserved. See also the Wiki (section "Detecting upper memory").


JAL
gerryg400
Member
Member
Posts: 1801
Joined: Thu Mar 25, 2010 11:26 pm
Location: Melbourne, Australia

Re: Where are the acpi tables?

Post by gerryg400 »

Now that really does answer my question!
Or, y'all learn how to use the Wiki.
Yeah, I'm still learning about wiki's and such and trying to tread carefully on this list. This is the first list I have joined and the 2nd wiki (after wikipedia) that I have used. I'm not really much of a computer person. That might seem odd coming from someone whose hobby is writing OS's but I'm not a software engineer. My hobby OS is the only software that I write. I'd never heard of ACPI until a few weeks ago.

- gerryg400
If a trainstation is where trains stop, what is a workstation ?
Post Reply