-
-
Notifications
You must be signed in to change notification settings - Fork 65
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
AcpiTables<H>::from_rsdp() panics if rsdp address is not 64-bit aligned with nightly compiler "1.70.0-nightly (23ee2af2f 2023-04-07)" #176
Comments
On legacy BIOS systems, the RSDP is 16-byte aligned, but you are right that ACPI does not appear to make other such guarantees. However, I think the library accounts for this due to the What line is panicking? I checked line 191 in |
I am not certain about the code you have in main compared to the crate I used (4.1.1). But, this line was panicking for me: https://docs.rs/acpi/4.1.1/src/acpi/lib.rs.html#191 and, I changed u64 to u32 on this line: https://docs.rs/acpi/4.1.1/src/acpi/lib.rs.html#188 And that fixed things in my case (qemu). I was thinking about submitting a pull request but I just started playing around with Rust so I am not confident the fix is the right thing to do. And since the code in main is different, maybe that's fixed already? |
Ah, I was looking at result.process_sdt(unsafe { tables_base.add(i).read_unaligned() } as usize)?; Nevertheless, it'd be great if the accumulated bugfixes could all be released (although it would unfortunately be backwards incompatible because of API changes). @IsaacWoods, will this happen soon, or are there other things that must be done first? |
FWIW, I switched to using |
Yeah, I get that this is less than ideal. The plan was to have a new major version out a few months ago, but I've been very busy outside of open-source stuff and a few big bugs have slipped through the net from trying to get reviews done quickly, so I've been looking for some time to sit down and go through things properly before releasing. So, as a sort of roadmap:
If you'd like to help get things released and have some time, PRs for numbers 2 and 4 are very welcome :) |
qemu-system-x86_64 provides a 32-bit aligned (not 64-bit aligned) address. After updating to the latest nightly (1.70.0 2023-04-07), lib.rs: 191 panics if the address is not aligned.
I don't believe 64-bit alignment is an ACPI requirement, that means explicit handling of address alignment is necessary.
The text was updated successfully, but these errors were encountered: