From 58124a7fea799f1ae37e8df28af4028d7dda1799 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Wed, 23 Jun 2021 22:49:12 +0200 Subject: [PATCH] apps: define FrameBufferAddr for riscv64 The size of FrameBufferAddr is architecture dependent. Add the missing definition for the riscv64 architecture. Signed-off-by: Heinrich Schuchardt --- apps/lfbgrid.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/lfbgrid.c b/apps/lfbgrid.c index 53a255a..c4a688c 100644 --- a/apps/lfbgrid.c +++ b/apps/lfbgrid.c @@ -51,7 +51,8 @@ draw_boxes(EFI_GRAPHICS_OUTPUT_PROTOCOL *gop) UINTN NumPixels; UINT32 *PixelBuffer; UINT32 CopySize, BufferSize; -#if defined(__x86_64__) || defined(__aarch64__) +#if defined(__x86_64__) || defined(__aarch64__) || \ + (defined (__riscv) && __riscv_xlen == 64) UINT64 FrameBufferAddr; #elif defined(__i386__) || defined(__arm__) UINT32 FrameBufferAddr; @@ -114,7 +115,8 @@ draw_boxes(EFI_GRAPHICS_OUTPUT_PROTOCOL *gop) Print(L"No linear framebuffer on this device.\n"); return; } -#if defined(__x86_64__) || defined(__aarch64__) +#if defined(__x86_64__) || defined(__aarch64__) || \ + (defined (__riscv) && __riscv_xlen == 64) FrameBufferAddr = (UINT64)gop->Mode->FrameBufferBase; #elif defined(__i386__) || defined(__arm__) FrameBufferAddr = (UINT32)(UINT64)gop->Mode->FrameBufferBase;