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 <xypron.glpk@gmx.de>
This commit is contained in:
Heinrich Schuchardt 2021-06-23 22:49:12 +02:00
parent df31239ac5
commit 58124a7fea

View File

@ -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;