diff options
Diffstat (limited to 'src/arch/amd64/mboot.c')
-rw-r--r-- | src/arch/amd64/mboot.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/arch/amd64/mboot.c b/src/arch/amd64/mboot.c index 315747e..34424a0 100644 --- a/src/arch/amd64/mboot.c +++ b/src/arch/amd64/mboot.c @@ -9,6 +9,7 @@ #define MBOOT_CMDLINE 1 #define MBOOT_MEMORY_MAP 6 +#define MBOOT_FRAMEBUFFER 8 #define MBOOT_ELF_SYMBOLS 9 #define MBOOT_OLD_RSDP 14 #define MBOOT_NEW_RSDP 15 @@ -82,6 +83,18 @@ struct mboot_tag_cmdline { uint8_t cmdline[]; }; +struct mboot_tag_framebuffer { + uint32_t type; + uint32_t size; + uint64_t framebuffer_addr; + uint32_t framebuffer_pitch; + uint32_t framebuffer_width; + uint32_t framebuffer_height; + uint8_t framebuffer_bpp; + uint8_t framebuffer_type; + uint16_t reserved; +}; + static void read_symbols( struct boot_info *shim_info, struct mboot_tag_elf_sections *sections @@ -133,6 +146,17 @@ static void read_cmdline( shim_info->cmdline[size] = '\0'; } +static void read_framebuffer( + struct boot_info *shim_info, + struct mboot_tag_framebuffer *framebuffer +) { + shim_info->fb.addr = framebuffer->framebuffer_addr; + shim_info->fb.width = framebuffer->framebuffer_width; + shim_info->fb.height = framebuffer->framebuffer_height; + shim_info->fb.pitch = framebuffer->framebuffer_pitch; + shim_info->fb.bit_depth = framebuffer->framebuffer_bpp; +} + static const char *segment_type[] = { "Reserved", "Free", @@ -217,6 +241,12 @@ void mboot_load_info( (struct mboot_tag_cmdline *) tag ); break; + case MBOOT_FRAMEBUFFER: + read_framebuffer( + shim_info, + (struct mboot_tag_framebuffer *) tag + ); + break; case MBOOT_MEMORY_MAP: read_memory_map( shim_info, |