Closed phil-opp closed 3 years ago
Generally, my policy with ACPI is that we have to do whatever is required to support real implementations, since it's such a mess.
That being said, I don't understand why firmware would bother to keep two different RSDP structures in memory, since they are backwards compatible. If you get given a v2 RSDP, the first part of the structure contains a v1 one (see §5.2.5.3 of the spec), so a legacy ACPI implementation can still read a RSDT out of it. My reading of the spec also infers that there should really only be one (in contrast, it is completely fine to have a separate RSDT and XSDT, both pointed to at different addresses by the same RSDP).
Therefore, I'd like to first confirm that we really are seeing two different RSDPs, at two different addresses, and that they have differing contents (e.g. different revisions) (cc @gifnksm).
Thanks @gifnksm and @phil-opp for reporting!
Agreed in rust-osdev/bootloader#172 that no changes are needed on the BIOS side, unless someone encounters specific hardware that requires this.
It seems like there are sometimes both ACPI v1 and v2 RSDPs in memory: https://github.com/rust-osdev/bootloader/issues/172 . Since we want to prioritize the v2 RSDP it would be great if the
RSDP::search_for_on_bios
function was able to return all available RSDPs, not just the first. This could be for example implemented by returning anIterator
from the function or by adding astart_offset
parameter (perhaps in a separate function). Would you be open to a PR that implements something like this?