Page MenuHomeFreeBSD

Loader: Reset EFI framebuffer state before kernel transition
Needs ReviewPublic

Authored by kevans on Mar 20 2018, 2:46 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sep 16 2025, 7:11 AM
Unknown Object (File)
Sep 16 2025, 2:30 AM
Unknown Object (File)
Aug 9 2025, 12:53 PM
Unknown Object (File)
Jun 29 2025, 3:09 PM
Unknown Object (File)
Jun 29 2025, 3:09 PM
Unknown Object (File)
Jun 27 2025, 4:50 AM
Unknown Object (File)
Jun 26 2025, 12:33 AM
Unknown Object (File)
Jun 15 2025, 1:32 AM
Subscribers

Details

Reviewers
imp
mizhka
Summary

Anything before this point can set the console into whatever mode/resolution it feels like. Lacking a better way to determine what the current geometry of the screen looks like, try and reset the screen using GOP to a good mode before we transition into the kernel. This puts the screen into a consistent state so that we can pass the correct framebuffer information into the kernel.

UGA reset is currently a nop.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 15661

Event Timeline

stand/efi/loader/bootinfo.c
282

Isn't this true also of armv7 and i386?

stand/efi/loader/framebuffer.c
444

There are complaints about it always picking the highest pixel count, since some are large and the font is tiny on them.

stand/efi/loader/bootinfo.c
285

We should check the return status here and avoid calling efi_find_framebuffer()

kevans added inline comments.
stand/efi/loader/bootinfo.c
282

I'd have to double-check- that might now be true of all arch's that will compile EFI bits by default. I think @manu had recently stubbed out the struct efi_fb for armv7 at least.

stand/efi/loader/bootinfo.c
282

Yeah armv7 and arm64 have the efi_fb in metadata.h (even if efifb still doesn't work).