fix(rsdp): fix rsdp revision and rsdp checksum to fit linux kernel impl#319
Closed
donjuanplatinum wants to merge 2 commits into
Closed
fix(rsdp): fix rsdp revision and rsdp checksum to fit linux kernel impl#319donjuanplatinum wants to merge 2 commits into
donjuanplatinum wants to merge 2 commits into
Conversation
Signed-off-by: Donjuanplatinum <donplat@barrensea.org>
IsaacWoods
added a commit
to IsaacWoods/acpi
that referenced
this pull request
Jul 16, 2026
…haviour Closes rust-osdev#319 This fixes a misinterpretation of the RSDP revision and whether the address of the XSDT or RSDT should be used, which the spec defines fairly poorly. It cleans up downstream interpretation of which table is being used by defining the actual entry size rather than relying on interpretation of the RSDP revision. It also introduces an `AcpiQuirks` structure, with a first quirk to override this behaviour and use the RSDT regardless of RSDP revision. This does introduce breaking changes to public API, and will require a major version bump.
Member
|
Thanks for the report! This is a good point (and another place the spec falls short). I hope you don't mind, but I wanted to approach this in a slightly different way than your PR, so I've made a couple of commits to These do technically break public API, so will need a major version bump. We've got some more changes with the same requirement coming soon, so I won't do this quite yet. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
drivers/acpi/acpica/tbutils.cline 242-259 shows that: whenrevision> 1, use XSDT. andrevision= 0 or 1 use RSDT.in
acpi-rsinacpi/src/lib.rsline 233-248 shows that: onlyrevision ==0use RSDT, other use XSDT.so , when revision = 1, linux will regard it as RSDT, but acpi-rs see it as a XSDT.
2. the checksum len in acpi 2.0 condition.
in linux source
drivers/acpi/acpica/tbxfroot.cline 59-89.the acpi2.0 checksum len is a constant
ACPI_RSDP_XCHECKSUM_LENGTHvalued 36 and its defined ininclude/acpi/acconfig.hin line 173:but in acpi-rs in
acpi/src/rsdp.rsline 119-127 it useself.lengthso when the length of
RSDPin memory is not 36 and use ACPI2.0, linux will also see it as 36,but acpi-rs not.and if firmware write the
lenght> 36, acpi-rs will read over the range and go into UB.