Feature #476
openAdd option to convert coreboot-inited linear frame buffer to efifb directly
70%
Description
Currently, the linear frame buffer that coreboot initializes should be handled by Linux kernel with dedicated driver "simplefb", but most installer of GNU/Linux distributions only enables "efifb" support, which causes a GNU/Linux installer kexec-ed from a Linux payload running atop simplefb unable to output graphics.
Currently, Grub payload could turn coreboot-initialized simplefb to efifb, which can be easily examined from the dmesg log of GNU/Linux booted from Grub payload running atop coreboot-inited linear frame buffer (simplefb). Chainloading a Linux payload with a minimal Grub payload only containing module "linux" and "cbfs" could make the Linux payload running atop efifb, of which GNU/Linux installers can make use, but the related code could be ported to coreboot to make things easier.
Updated by Bill XIE over 1 year ago
"Grub payload could turn coreboot-initialized simplefb to efifb" turns out that grub payload can read video mode info from the coreboot table and fill them into a struct linux_kernel_params
in include/grub/i386/linux.h
(corresponding to struct linux_params
of util/cbfstool/linux.h
and struct screen_info
in include/uapi/linux/screen_info.h
of Linux kernel) to boot the Linux kernel, and set the member have_vga
(corresponding to orig_video_isVGA
of struct linux_params
and struct screen_info
) to GRUB_VIDEO_LINUX_TYPE_SIMPLE
(0x70, corresponding to VIDEO_TYPE_EFI
in Linux kernel), allowing the driver efifb
to take over the framebuffer.
To copy this behavior in coreboot, features to identify a linux payload at runtime and to modify the linux_params at runtime may have to be added.
Updated by Paul Menzel about 1 year ago
- Related links updated (diff)
persmule proposes lib: Hook the FB setting function for Linux to payload loading routine.
One comment from #coreboot@irc.libera.chat: AFAICS, we have avoided payload-specific code in coreboot so far
Updated by Bill XIE about 1 year ago
- Related links updated (diff)
Updated by Patrick Rudolph 5 months ago
Might be related: https://github.com/torvalds/linux/commit/dff054e691dae