lfbgrid: Make pointer size testing not arch name dependent

This commit is contained in:
Peter Jones 2023-03-28 12:21:08 +01:00 committed by Nigel Croxon
parent 5e2444d115
commit 3d82853ffe

View File

@ -51,11 +51,9 @@ draw_boxes(EFI_GRAPHICS_OUTPUT_PROTOCOL *gop)
UINTN NumPixels;
UINT32 *PixelBuffer;
UINT32 CopySize, BufferSize;
#if defined(__x86_64__) || defined(__aarch64__) || \
(defined (__riscv) && __riscv_xlen == 64) || \
defined(__loongarch64)
#if __SIZEOF_POINTER__ == 8
UINT64 FrameBufferAddr;
#elif defined(__i386__) || defined(__arm__)
#elif __SIZEOF_POINTER__ == 4
UINT32 FrameBufferAddr;
#else
#error YOUR ARCH HERE
@ -116,11 +114,9 @@ draw_boxes(EFI_GRAPHICS_OUTPUT_PROTOCOL *gop)
Print(L"No linear framebuffer on this device.\n");
return;
}
#if defined(__x86_64__) || defined(__aarch64__) || \
(defined (__riscv) && __riscv_xlen == 64) || \
defined(__loongarch64)
#if __SIZEOF_POINTER__ == 8
FrameBufferAddr = (UINT64)gop->Mode->FrameBufferBase;
#elif defined(__i386__) || defined(__arm__)
#elif __SIZEOF_POINTER__ == 4
FrameBufferAddr = (UINT32)(UINT64)gop->Mode->FrameBufferBase;
#else
#error YOUR ARCH HERE