Skip to content
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

Add hack to get aml compiling on 32-bit platforms #159

Merged
merged 1 commit into from
Mar 3, 2023

Conversation

IsaacWoods
Copy link
Member

This should hopefully allow aml to compile on 32-bit platforms for the mean time. In the future we need to sit down and understand how to solve this properly, or rip bitvec out and replace it with an implementation that doesn't have this limitation.

I have locally confirmed that this compiles on i686-unknown-linux-gnu, but don't have a 32-bit kernel setup to test this properly on. I wonder if lots of the these machines will expect a legacy AML implementation (one that models integers as 32-bit anyway), so a future direction could simply be to use u32 on those platforms (this is easier said than done though, I think).

cc @rw-vanc - could you give this a quick check-over for logic and see if it works for you? I'm not sure if you are using a fork or the crates.io version for Redox - do you need this to be published?

This is a, hopefully very temporary, hack to get `aml` to compile on 32-bit
platforms. The issue is with `bitvec`, which seems to be unable to operate
on 64-bit values on 32-bit systems, which I don't quite understand atm. In
the long term, we should sit down and understand how to use `bitvec`
properly, or replace it with a simple implementation without this limitation.
@IsaacWoods
Copy link
Member Author

cc #146 - this does not resolve the issue satisfactorily, but should be a hack to get around Redox's immediate problem

@rw-vanc
Copy link
Contributor

rw-vanc commented Mar 3, 2023

We are using crates.io. We have a temporary patch with aml excluded, but we will clone and build with the fix.

@IsaacWoods
Copy link
Member Author

IsaacWoods commented Mar 3, 2023

Sure - lmk if it works and I can merge & publish

@rw-vanc
Copy link
Contributor

rw-vanc commented Mar 3, 2023

It compiles on i686 and does not crash our acpi driver. I can't confirm that bitfields are working, but the compilation is fixed.

@IsaacWoods IsaacWoods merged commit d5def73 into rust-osdev:main Mar 3, 2023
@IsaacWoods IsaacWoods deleted the 32bit branch March 3, 2023 12:30
@IsaacWoods
Copy link
Member Author

🚀 Published as aml v0.16.3

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

Successfully merging this pull request may close these issues.

2 participants