43 lines
1.3 KiB
Diff
43 lines
1.3 KiB
Diff
|
From 93c0852d8492376b62f8ff27b34cd2baab852eb5 Mon Sep 17 00:00:00 2001
|
||
|
From: Peter Jones <pjones@redhat.com>
|
||
|
Date: Tue, 14 Jan 2020 10:13:30 -0500
|
||
|
Subject: [PATCH 43/46] lfbgrid: Make pointer size testing not arch name
|
||
|
dependent.
|
||
|
|
||
|
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||
|
---
|
||
|
apps/lfbgrid.c | 8 ++++----
|
||
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
||
|
|
||
|
diff --git a/apps/lfbgrid.c b/apps/lfbgrid.c
|
||
|
index ac50f4eafa9..e9fef957d94 100644
|
||
|
--- a/apps/lfbgrid.c
|
||
|
+++ b/apps/lfbgrid.c
|
||
|
@@ -51,9 +51,9 @@ draw_boxes(EFI_GRAPHICS_OUTPUT_PROTOCOL *gop)
|
||
|
UINTN NumPixels;
|
||
|
UINT32 *PixelBuffer;
|
||
|
UINT32 CopySize, BufferSize;
|
||
|
-#if defined(__x86_64__) || defined(__aarch64__)
|
||
|
+#if __SIZEOF_POINTER__ == 8
|
||
|
UINT64 FrameBufferAddr;
|
||
|
-#elif defined(__i386__) || defined(__arm__)
|
||
|
+#elif __SIZEOF_POINTER__ == 4
|
||
|
UINT32 FrameBufferAddr;
|
||
|
#else
|
||
|
#error YOUR ARCH HERE
|
||
|
@@ -115,9 +115,9 @@ draw_boxes(EFI_GRAPHICS_OUTPUT_PROTOCOL *gop)
|
||
|
Print(L"No linear framebuffer on this device.\n");
|
||
|
return;
|
||
|
}
|
||
|
-#if defined(__x86_64__) || defined(__aarch64__)
|
||
|
+#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
|
||
|
--
|
||
|
2.24.1
|
||
|
|