Project

General

Profile

Actions

Feature #476

open

Add option to convert coreboot-inited linear frame buffer to efifb directly

Added by Bill XIE about 1 year ago. Updated about 1 month ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
coreboot common code
Target version:
Start date:
03/30/2023
Due date:
% Done:

70%

Estimated time:
Affected versions:
Needs backport to:
Affected hardware:
Affected OS:
GNU/Linux

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.

Actions #1

Updated by Bill XIE about 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.

Actions #2

Updated by Paul Menzel 11 months 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

Actions #4

Updated by Bill XIE 11 months ago

  • % Done changed from 0 to 70
Actions

Also available in: Atom PDF