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)
Thu, May 8, 2:43 AM
Unknown Object (File)
Apr 10 2025, 5:36 PM
Unknown Object (File)
Mar 16 2025, 4:28 AM
Unknown Object (File)
Mar 6 2025, 8:15 PM
Unknown Object (File)
Mar 5 2025, 6:56 AM
Unknown Object (File)
Mar 3 2025, 10:01 PM
Unknown Object (File)
Mar 3 2025, 8:18 PM
Unknown Object (File)
Mar 3 2025, 6:27 PM
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