Page 1 of 1
Where are the acpi tables?
Posted: Sun May 30, 2010 12:47 am
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.
Re: Where are the acpi tables?
Posted: Sun May 30, 2010 5:22 am
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)
Re: Where are the acpi tables?
Posted: Sun May 30, 2010 6:17 am
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.
Re: Where are the acpi tables?
Posted: Sun May 30, 2010 9:15 am
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)
Re: Where are the acpi tables?
Posted: Mon May 31, 2010 8:50 am
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.
Re: Where are the acpi tables?
Posted: Wed Jun 02, 2010 4:17 am
by jal
Or, y'all learn how to use the
Wiki.
JAL
Re: Where are the acpi tables?
Posted: Wed Jun 02, 2010 4:43 am
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.
Re: Where are the acpi tables?
Posted: Wed Jun 02, 2010 6:55 am
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
Re: Where are the acpi tables?
Posted: Wed Jun 02, 2010 7:29 am
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