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;