Add the beginning of support for kernel graphics to bootloader.

* Load a font file off disk to pass to kernel
* Expose a framebuffer to the kernel
* Currently the kernel just paints the screen red
This commit is contained in:
Justin C. Miller
2018-04-01 22:48:46 -07:00
parent 23365b39c7
commit 4577c2d10c
10 changed files with 338 additions and 104 deletions

View File

@@ -1,14 +1,16 @@
#include "console.h"
#include <efi.h>
#include <efilib.h>
#include <stddef.h>
#define UNUSED __attribute__((unused))
size_t wstrlen(const CHAR16 *s);
const CHAR16 *util_error_message(EFI_STATUS status);
#define CHECK_EFI_STATUS_OR_RETURN(s, msg, ...) \
if (EFI_ERROR((s))) { \
con_printf(L"EFI_ERROR: " msg L": %s\n", ##__VA_ARGS__, util_error_message(s)); \
con_printf(L"ERROR: " msg L": %s\r\n", ##__VA_ARGS__, util_error_message(s)); \
return (s); \
}