[SeaBIOS] [PATCH 1/4] x86: add readq()
marcandre.lureau at redhat.com
marcandre.lureau at redhat.com
Fri Oct 6 16:33:24 CEST 2017
From: Marc-André Lureau <marcandre.lureau at redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
---
src/x86.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/x86.h b/src/x86.h
index 4aea65c..c7bb60d 100644
--- a/src/x86.h
+++ b/src/x86.h
@@ -211,6 +211,11 @@ static inline void writeb(void *addr, u8 val) {
barrier();
*(volatile u8 *)addr = val;
}
+static inline u64 readq(const void *addr) {
+ u64 val = *(volatile const u64 *)addr;
+ barrier();
+ return val;
+}
static inline u32 readl(const void *addr) {
u32 val = *(volatile const u32 *)addr;
barrier();
--
2.14.1.146.gd35faa819
More information about the SeaBIOS
mailing list