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.