summaryrefslogtreecommitdiff
path: root/kernel/efi
diff options
context:
space:
mode:
authorGalen Sagarin <gps5307@rit.edu>2025-05-06 15:05:22 -0400
committerGalen Sagarin <gps5307@rit.edu>2025-05-06 15:05:22 -0400
commite4324f180c31ebf06206be6dff5f3863d6ec2675 (patch)
tree73f197fe28c8cc9efdb113b9702790d0085caaff /kernel/efi
parenttar.c documentation (diff)
parentstart docs (diff)
downloadcomus-e4324f180c31ebf06206be6dff5f3863d6ec2675.tar.gz
comus-e4324f180c31ebf06206be6dff5f3863d6ec2675.tar.bz2
comus-e4324f180c31ebf06206be6dff5f3863d6ec2675.zip
Merge branch 'main' of https://github.com/kenshineto/kern
Should have fixed
Diffstat (limited to '')
-rw-r--r--kernel/efi/gop.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/efi/gop.c b/kernel/efi/gop.c
index 899bbee..5495980 100644
--- a/kernel/efi/gop.c
+++ b/kernel/efi/gop.c
@@ -4,6 +4,8 @@
static EFI_GRAPHICS_OUTPUT_PROTOCOL *gop = NULL;
+#define MAX_H_RES 1920
+
EFI_STATUS efi_load_gop(EFI_SYSTEM_TABLE *ST)
{
EFI_STATUS status = EFI_SUCCESS;
@@ -33,6 +35,8 @@ EFI_STATUS efi_load_gop(EFI_SYSTEM_TABLE *ST)
if (info->PixelFormat != PixelBlueGreenRedReserved8BitPerColor &&
info->PixelFormat != PixelRedGreenBlueReserved8BitPerColor)
continue;
+ if (info->HorizontalResolution > MAX_H_RES)
+ continue;
if (info->HorizontalResolution > width) {
width = info->HorizontalResolution;
best = i;