lfbgrid: Make pointer size testing not arch name dependent
This commit is contained in:
parent
5e2444d115
commit
3d82853ffe
@ -51,11 +51,9 @@ draw_boxes(EFI_GRAPHICS_OUTPUT_PROTOCOL *gop)
|
|||||||
UINTN NumPixels;
|
UINTN NumPixels;
|
||||||
UINT32 *PixelBuffer;
|
UINT32 *PixelBuffer;
|
||||||
UINT32 CopySize, BufferSize;
|
UINT32 CopySize, BufferSize;
|
||||||
#if defined(__x86_64__) || defined(__aarch64__) || \
|
#if __SIZEOF_POINTER__ == 8
|
||||||
(defined (__riscv) && __riscv_xlen == 64) || \
|
|
||||||
defined(__loongarch64)
|
|
||||||
UINT64 FrameBufferAddr;
|
UINT64 FrameBufferAddr;
|
||||||
#elif defined(__i386__) || defined(__arm__)
|
#elif __SIZEOF_POINTER__ == 4
|
||||||
UINT32 FrameBufferAddr;
|
UINT32 FrameBufferAddr;
|
||||||
#else
|
#else
|
||||||
#error YOUR ARCH HERE
|
#error YOUR ARCH HERE
|
||||||
@ -116,11 +114,9 @@ draw_boxes(EFI_GRAPHICS_OUTPUT_PROTOCOL *gop)
|
|||||||
Print(L"No linear framebuffer on this device.\n");
|
Print(L"No linear framebuffer on this device.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#if defined(__x86_64__) || defined(__aarch64__) || \
|
#if __SIZEOF_POINTER__ == 8
|
||||||
(defined (__riscv) && __riscv_xlen == 64) || \
|
|
||||||
defined(__loongarch64)
|
|
||||||
FrameBufferAddr = (UINT64)gop->Mode->FrameBufferBase;
|
FrameBufferAddr = (UINT64)gop->Mode->FrameBufferBase;
|
||||||
#elif defined(__i386__) || defined(__arm__)
|
#elif __SIZEOF_POINTER__ == 4
|
||||||
FrameBufferAddr = (UINT32)(UINT64)gop->Mode->FrameBufferBase;
|
FrameBufferAddr = (UINT32)(UINT64)gop->Mode->FrameBufferBase;
|
||||||
#else
|
#else
|
||||||
#error YOUR ARCH HERE
|
#error YOUR ARCH HERE
|
||||||
|
Loading…
Reference in New Issue
Block a user