Open mkroening opened 4 months ago
For MMIO the serial port is defined as:
pub struct MmioSerialPort { data: AtomicPtr<u8>, int_en: AtomicPtr<u8>, fifo_ctrl: AtomicPtr<u8>, line_ctrl: AtomicPtr<u8>, modem_ctrl: AtomicPtr<u8>, line_sts: AtomicPtr<u8>, }
with
Self { data: AtomicPtr::new(base_pointer), int_en: AtomicPtr::new(base_pointer.add(1)), fifo_ctrl: AtomicPtr::new(base_pointer.add(2)), line_ctrl: AtomicPtr::new(base_pointer.add(3)), modem_ctrl: AtomicPtr::new(base_pointer.add(4)), line_sts: AtomicPtr::new(base_pointer.add(5)), }
Instead, it should be only one pointer in size and using volatile operations instead of atomic ones via [#[derive(VolatileFieldAccess)](https://docs.rs/volatile/latest/volatile/derive.VolatileFieldAccess.html).
#[derive(VolatileFieldAccess)
I can take a look at this in the coming weeks.
For MMIO the serial port is defined as:
with
Instead, it should be only one pointer in size and using volatile operations instead of atomic ones via [
#[derive(VolatileFieldAccess)
](https://docs.rs/volatile/latest/volatile/derive.VolatileFieldAccess.html).I can take a look at this in the coming weeks.