Page MenuHomeFreeBSD

loader: narrow the scope of gfx frame buffer wrt tg supported kernels
ClosedPublic

Authored by imp on Dec 14 2021, 5:16 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 26, 1:21 AM
Unknown Object (File)
Nov 7 2025, 11:55 PM
Unknown Object (File)
Nov 4 2025, 7:00 AM
Unknown Object (File)
Nov 3 2025, 10:27 PM
Unknown Object (File)
Nov 3 2025, 12:36 PM
Unknown Object (File)
Nov 2 2025, 1:41 AM
Unknown Object (File)
Oct 29 2025, 3:10 AM
Unknown Object (File)
Oct 29 2025, 1:32 AM
Subscribers

Details

Summary

Store whether or not we found a vbefb module (eg, a tg supported kernel)
in the preloaded_file structure. This automatically resets on reload and
eliminates load_elf knowing about any gfx_* interface. Restrict this to
i386, which is the only place it's used. Update libi386 to check in the
preloaded_file struct. Eliminate this from the teken_gfx
structure. Rewrite the parsing code to be more inline. Check this from
the same place we check for a relocatable amd64 kernel.

Sponsored by: Netflix

Test Plan

I think we just need to test the old BIOS-loaded /boot/loader on i386 and amd64 machines.
Also, how long do we need to keep this around? Was this a transition thing for the cut-over or
will we need it forever?

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 43330
Build 40218: arc lint + arc unit

Event Timeline

imp requested review of this revision.Dec 14 2021, 5:16 AM
imp added reviewers: Loader, kevans, tsoome.

That looks ok but do we really only support vbe for i386 ?
Doesn't some amd64 hardware that doesn't have EFI (or booted without EFI support) could use vbe ?

In D33427#755741, @manu wrote:

That looks ok but do we really only support vbe for i386 ?
Doesn't some amd64 hardware that doesn't have EFI (or booted without EFI support) could use vbe ?

Yes. However, i386 is used to boot both amd64 and i386 kernels, so we only need vbe on i386.

This revision is now accepted and ready to land.Dec 14 2021, 8:37 PM