Project

General

Profile

Actions

Feature #500

closed

coreboot bootsplash only supports jpeg and does not support extended resolutions

Added by Thierry Laurion about 1 year ago. Updated 11 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
coreboot common code
Target version:
Start date:
07/13/2023
Due date:
% Done:

0%

Estimated time:
Affected versions:
Needs backport to:
Affected hardware:
All using coreboot display init + bootsplash
Affected OS:
n/a

Description

For those of you on matrix, the discussion happened at https://matrix.to/#/!BZxDFuoBnMKnzVZwEp:libera.chat/$pQoGnN9DnokZ875fTbHiAtTc0IEVgQDycUJmB7PLulE?via=libera.chat&via=matrix.org&via=matrix.zerodao.gg

Short version:

  • libgfxinit bootsplash through jpeg.c supports VESA old resolutions (1024x768)
  • libgfxinit bootsplash through jpeg.c doesn't support native resolutions (1366x768)
  • libgfxinit bootsplash image creation requires voodoo skills explained at https://puri.sm/posts/librem-13-coreboot-report-february-25th-2017
  • Basically, I do not think libgfxinit bootsplash is currently used otherwise there would be way more bug reports. Seabios is mostly used.
  • Seabios bootsplash code should be borrowed (lgplv3) which supports both BMP and JPEG and is not 13yo.
  • Coreboot should permit stiching of compressed bmp by default and deprecate old jpeg.c in tree
  • By doing so, more people could promote coreboot directly from coreboot raminit (Heads currently does that)

Longer version:

  • OSes are attacking legacy BIOS mode for a while now, and the next steps are to deprecate DRM drivers in initrd
    • To phase DRM out, simplefb and simpledrm are promoted instead where final OS will be in charge of deploying bigger unified kernels containing/initrd which will contain the accelerated DRM and fb drivers
    • Currently deploying DRM drivers inside of linuxboot (heads) on Intel iGPU requires to include i915drmfb, coreboot linux command lines hacks to have the FB address exposed (tainting the kernel) and kexec hacked to expose exposed fb address to next kernel (see https://github.com/osresearch/heads/pull/1378)
    • Doing currently adds more then 500kb of in-kernel drivers, which bloats the firmware. In case of measured boot, that bigger payload needs to be measured prior of being read and jumped into (8-10 seconds under 5.10 kernel compared to 4-6 seconds under 4.14)
    • To have legacy BIOS survive this ecosystem attack against legacy boot, coreboot needs to push for a more generic way to provide a framebuffer (GOP/Native unified approach)
    • With libgfxinit/GOP/native gfx init and the kernel config adapted, linux can efficiently be used as a bootloader and be enabled by simplefb (https://github.com/osresearch/heads/pull/1403/commits/659308eff53f39633ffad71597a2463fa30eedd3)
  • The part missing is having coreboot drive the framebuffer with a native size bootsplash as everyone else does so that the waiting time to boot in kernel/payload is not a scary moment, and that the bootsplash doesn't restrict the size of the framebuffer configured under coreboot nor limit the UX.

Actual state:

  • libgfxinit needs to have jpeg supported resolution to bootsplash (CONFIG_LINEAR_FRAMEBUFFER_MAX_HEIGHT=768 CONFIG_LINEAR_FRAMEBUFFER_MAX_WIDTH=1024)
  • libgfxinit bootsplash needs to have a 1024x768 voodoo crafted jpeg (https://github.com/osresearch/heads/blob/master/blobs/ThePlexus-bootsplash-1024x768.jpg)
  • Problem is that doing so, the whole console is limited to that resolution showing black borders on each side of the screen to compensate (1366 != 1024, so (1366-1024)/2 is the loss pixel width on each side of the screen for 1366x764, same applying to all other resolutions since needs to be 4x4 for jpeg.c to do its job.

Desired state:

  • flat bmp support in native format just like seabios support, where coreboot compressed them prior of adding it into CBFS.
  • support for all crazy resolutions we currently have, not being stuck in 2000.
  • Be able to promote coreboot from raminit code.

Files

signal-2023-07-13-164022.jpeg (269 KB) signal-2023-07-13-164022.jpeg Thierry Laurion, 07/13/2023 10:46 PM
signal-2023-07-13-164047.jpeg (416 KB) signal-2023-07-13-164047.jpeg Thierry Laurion, 07/13/2023 10:46 PM
VID_20230713_154446.mp4 (3.78 MB) VID_20230713_154446.mp4 UX being limited Thierry Laurion, 07/13/2023 10:48 PM
signal-2023-07-13-171757.jpeg (275 KB) signal-2023-07-13-171757.jpeg Thierry Laurion, 07/13/2023 11:18 PM
signal-2023-07-13-171801.jpeg (350 KB) signal-2023-07-13-171801.jpeg Thierry Laurion, 07/13/2023 11:18 PM
Actions

Also available in: Atom PDF