diff options
Diffstat (limited to 'payloads/libpayload/include/arm64/arch')
-rw-r--r-- | payloads/libpayload/include/arm64/arch/io.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/payloads/libpayload/include/arm64/arch/io.h b/payloads/libpayload/include/arm64/arch/io.h index 00c75c4395..092198842f 100644 --- a/payloads/libpayload/include/arm64/arch/io.h +++ b/payloads/libpayload/include/arm64/arch/io.h @@ -99,6 +99,12 @@ static inline uint32_t read32(const void *addr) return *(volatile uint32_t *)addr; } +static inline uint64_t read64(const void *addr) +{ + dmb(); + return *(volatile uint64_t *)addr; +} + static inline void write8(void *addr, uint8_t val) { dmb(); @@ -120,4 +126,11 @@ static inline void write32(void *addr, uint32_t val) dmb(); } +static inline void write64(void *addr, uint64_t val) +{ + dmb(); + *(volatile uint64_t *)addr = val; + dmb(); +} + #endif |