commit 23bdb4c066eba2c9a1465713b009615bd2ce2359
parent 261bb7c373f6c1b38130f6d30211654470bca313
Author: Matsuda Kenji <info@mtkn.jp>
Date: Fri, 29 Mar 2024 15:41:12 +0900
draw write screen
Diffstat:
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/loader.c b/loader.c
@@ -45,7 +45,10 @@ EfiMain(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *systab)
efi_printf("open_gop: %d\n", stat);
return stat;
}
- efi_printf("gop open\n");
+ UINT8 *frame_buffer = (UINT8 *)gop->Mode->FrameBufferBase;
+ for (UINTN i = 0; i < gop->Mode->FrameBufferSize; i++) {
+ frame_buffer[i] = 0xFF;
+ }
EFI_FILE_PROTOCOL *root, *kernel;
stat = open_root(ImageHandle, &root);
diff --git a/uefi.h b/uefi.h
@@ -115,6 +115,15 @@ typedef struct {
typedef struct _EFI_GRAPHICS_OUTPUT_PROTOCOL EFI_GRAPHICS_OUTPUT_PROTOCOL;
typedef struct {
+} EFI_GRAPHICS_OUTPUT_MODE_INFORMATION;
+
+typedef struct {
+ UINT32 MaxMode;
+ UINT32 Mode;
+ EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info;
+ UINTN SizeOfInfo;
+ EFI_PHYSICAL_ADDRESS FrameBufferBase;
+ UINTN FrameBufferSize;
} EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE;
typedef