Skip to content

BIOS RSDP search: Allow start offset parameter? #92

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
phil-opp opened this issue May 22, 2021 · 2 comments
Closed

BIOS RSDP search: Allow start offset parameter? #92

phil-opp opened this issue May 22, 2021 · 2 comments

Comments

@phil-opp
Copy link
Member

It seems like there are sometimes both ACPI v1 and v2 RSDPs in memory: rust-osdev/bootloader#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 an Iterator from the function or by adding a start_offset parameter (perhaps in a separate function). Would you be open to a PR that implements something like this?

@IsaacWoods
Copy link
Member

IsaacWoods commented May 22, 2021

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!

@IsaacWoods
Copy link
Member

Agreed in rust-osdev/bootloader#172 that no changes are needed on the BIOS side, unless someone encounters specific hardware that requires this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants