[SeaBIOS] [PATCH 1/4] x86: add readq()
Philippe Mathieu-Daudé
f4bug at amsat.org
Mon Oct 23 18:47:42 CEST 2017
On 10/06/2017 11:33 AM, marcandre.lureau at redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau at redhat.com>
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug at amsat.org>
> ---
> 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();
>
More information about the SeaBIOS
mailing list