5 #ifndef OPENTITAN_SW_DEVICE_LIB_BASE_ABS_MMIO_H_
6 #define OPENTITAN_SW_DEVICE_LIB_BASE_ABS_MMIO_H_
30 #ifdef OT_PLATFORM_RV32
39 inline uint8_t abs_mmio_read8(uint32_t addr) {
40 return *((
volatile uint8_t *)addr);
49 inline void abs_mmio_write8(uint32_t addr, uint8_t value) {
50 *((
volatile uint8_t *)addr) = value;
60 inline void abs_mmio_write8_shadowed(uint32_t addr, uint8_t value) {
61 *((
volatile uint8_t *)addr) = value;
62 *((
volatile uint8_t *)addr) = value;
72 inline uint32_t abs_mmio_read32(uint32_t addr) {
73 return *((
volatile uint32_t *)addr);
82 inline void abs_mmio_write32(uint32_t addr, uint32_t value) {
83 *((
volatile uint32_t *)addr) = value;
93 inline void abs_mmio_write32_shadowed(uint32_t addr, uint32_t value) {
94 *((
volatile uint32_t *)addr) = value;
95 *((
volatile uint32_t *)addr) = value;
100 extern uint8_t abs_mmio_read8(uint32_t addr);
101 extern void abs_mmio_write8(uint32_t addr, uint8_t value);
102 extern void abs_mmio_write8_shadowed(uint32_t addr, uint8_t value);
103 extern uint32_t abs_mmio_read32(uint32_t addr);
104 extern void abs_mmio_write32(uint32_t addr, uint32_t value);
105 extern void abs_mmio_write32_shadowed(uint32_t addr, uint32_t value);