diff options
Diffstat (limited to 'src/arch')
-rw-r--r-- | src/arch/arm64/include/armv8/arch/io.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/arch/arm64/include/armv8/arch/io.h b/src/arch/arm64/include/armv8/arch/io.h index f60e1f4d64..31615f736f 100644 --- a/src/arch/arm64/include/armv8/arch/io.h +++ b/src/arch/arm64/include/armv8/arch/io.h @@ -51,6 +51,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(); @@ -72,4 +78,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 /* __ARCH_IO_H */ |