summaryrefslogtreecommitdiff
path: root/src/arch/arm64/include/armv8
diff options
context:
space:
mode:
authorDavid Hendricks <dhendricks@fb.com>2017-12-28 20:52:15 -0800
committerDavid Hendricks <david.hendricks@gmail.com>2018-02-12 23:05:08 +0000
commit3b63e0fb5a903adf5c9164b4810e6def9c754a7e (patch)
tree3d5ae2933a0390733691d84daf69219dc765fbe0 /src/arch/arm64/include/armv8
parentcc3b69bd14db6d975c35aebf93c3a3f1525c08fd (diff)
downloadcoreboot-3b63e0fb5a903adf5c9164b4810e6def9c754a7e.tar.xz
arm64: Add read64() and write64()
Change-Id: I89cf4b996405af616f54cf2d9fabd4e258352b03 Signed-off-by: David Hendricks <dhendricks@fb.com> Reviewed-on: https://review.coreboot.org/23036 Reviewed-by: Julius Werner <jwerner@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/arch/arm64/include/armv8')
-rw-r--r--src/arch/arm64/include/armv8/arch/io.h13
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 */