From 002b608f36693665f7e5326449bb646101713e81 Mon Sep 17 00:00:00 2001 From: Friedemann Gerold Date: Thu, 2 Aug 2018 16:05:30 +0200 Subject: multiboot-x86: pass framebuffer information when requested When the kernel requests video information, pass it the framebuffer information in the multiboot header from the linux framebuffer ioctl's. With the arch specific --reset-vga or --consolve-vga options, purgatory will reset the framebuffer so pass information for standard ega text mode. Signed-off-by: Friedemann Gerold Signed-off-by: Simon Horman --- include/x86/mb_info.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'include/x86') diff --git a/include/x86/mb_info.h b/include/x86/mb_info.h index 317bdfa..fd1bb1d 100644 --- a/include/x86/mb_info.h +++ b/include/x86/mb_info.h @@ -172,6 +172,28 @@ struct multiboot_info uint16_t vbe_interface_seg; uint16_t vbe_interface_off; uint16_t vbe_interface_len; + + uint64_t framebuffer_addr; + uint32_t framebuffer_pitch; + uint32_t framebuffer_width; + uint32_t framebuffer_height; + uint8_t framebuffer_bpp; + uint8_t framebuffer_type; + + union { + struct { + uint32_t framebuffer_palette_addr; + uint16_t framebuffer_palette_num_color; + }; + struct { + uint8_t framebuffer_red_field_position; + uint8_t framebuffer_red_mask_size; + uint8_t framebuffer_green_field_position; + uint8_t framebuffer_green_mask_size; + uint8_t framebuffer_blue_field_position; + uint8_t framebuffer_blue_mask_size; + }; + }; }; /* @@ -211,6 +233,11 @@ struct multiboot_info /* Is there video information? */ #define MB_INFO_VIDEO_INFO 0x00000800 +#define MB_INFO_FRAMEBUFFER_INFO 0x00001000 + +#define MB_FRAMEBUFFER_TYPE_INDEXED 0 +#define MB_FRAMEBUFFER_TYPE_RGB 1 +#define MB_FRAMEBUFFER_TYPE_EGA_TEXT 2 /* * The following value must be present in the EAX register. -- cgit