Skip to contentSkip to conversation

multiboot non-elf and framebuffer support for kexec-tools

PATCH [email protected] 1 participant 1 message Jul 28, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

theres a patch that provides support for non-elf multiboot kernels and passes framebuffer information to the kernel if requested in the multiboot header.

only rgb truecolor framebuffers are supported right now. if --reset-vga or --console-vga was specified, it assumes the framebuffer will be standard ega text mode.

also pass acpi nvs and acpi reclaim ranges in the multiboot memory map as such; instead of just reserved. this allowing to kernel to locate acpi tables on uefi systems.

i'm new on the list, so is there a prefered address to send patches like this to?

--
cinap

include/x86/mb_info.h +27 -0
index 317bdfa..fd1bb1d 100644
@@ -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.
kexec/arch/i386/kexec-multiboot-x86.c +137 -33

254 lines not on this page · raw message

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec