From: Marc-André Lureau Date: Mon, 26 Feb 2018 14:12:11 +0000 (-0500) Subject: x86: add readq() X-Git-Tag: rel-1.12.0~34 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=8694c3bc847c12857edfb7dbb4e24e97b1e1861b;p=seabios.git x86: add readq() Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Berger Tested-by: Stefan Berger --- 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();