Feature Overview
Per rust-embedded/wg#791 and related files, accessing MMIO via references can lead to UB because LLVM is allowed to read from references whenever it chooses, which can change HW state in MMIO regions.
Solution Overview
Create a safe abstraction for Patina developers to use to access MMIO through raw pointers. This may look like a struct wrapping an UnsafeCell, for instance.
Alternatives Considered
No response
Urgency
Medium
Are you going to implement the feature request?
Someone else needs to implement the feature
Do you need maintainer feedback?
No maintainer feedback needed
Anything else?
No response
Feature Overview
Per rust-embedded/wg#791 and related files, accessing MMIO via references can lead to UB because LLVM is allowed to read from references whenever it chooses, which can change HW state in MMIO regions.
Solution Overview
Create a safe abstraction for Patina developers to use to access MMIO through raw pointers. This may look like a struct wrapping an UnsafeCell, for instance.
Alternatives Considered
No response
Urgency
Medium
Are you going to implement the feature request?
Someone else needs to implement the feature
Do you need maintainer feedback?
No maintainer feedback needed
Anything else?
No response