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

Use volatile memory access for memory-mapped I/O #199

Open
mkroening opened this issue May 28, 2021 · 1 comment
Open

Use volatile memory access for memory-mapped I/O #199

mkroening opened this issue May 28, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@mkroening
Copy link
Member

Currently, we access memory-mapped I/O in a non-volatile fashion, which results in the compiler optimizing the access away under certain circumstances. We should make access to memory-mapped I/O volatile.

Instead of using pointer::read_volatile and pointer::write_volatile we should use an abstraction like volatile::Volatile by rust-osdev to enforce volatile memory access via the type system.

@mkroening mkroening self-assigned this May 28, 2021
@mkroening
Copy link
Member Author

We'll want to wait for rust-osdev/volatile#22 making the Volatile abstraction correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants