Page MenuHomeFreeBSD

loader.efi: only use firmware provided Blt on GOP
ClosedPublic

Authored by vexeduxr on Wed, Dec 31, 4:32 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jan 20, 11:04 PM
Unknown Object (File)
Tue, Jan 20, 9:44 AM
Unknown Object (File)
Sat, Jan 17, 11:50 AM
Unknown Object (File)
Fri, Jan 16, 12:46 AM
Unknown Object (File)
Thu, Jan 15, 10:02 PM
Unknown Object (File)
Tue, Jan 13, 9:35 PM
Unknown Object (File)
Mon, Jan 12, 10:15 AM
Unknown Object (File)
Sat, Jan 10, 2:26 AM
Subscribers

Details

Summary

gfx_state.tg_private points to a EFI_GRAPHICS_OUTPUT_PROTOCOL only when
using GOP.

The firmware provided Blt functions on UGA platforms have been observed
to not work on old MacBooks, and are likley hit or miss anyways as UGA
has been deprecated since 2006.

MFC after: 1 week
PR: 291935

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

tsoome requested changes to this revision.Sat, Jan 3, 4:28 PM
tsoome added inline comments.
stand/common/gfx_fb.c
860

I think, Instead of adding another condition into if statement, the proper implementation would be to have conditional assignment for gop. As tg_private may now point to gop or uga, we should not blindly cast the pointer there.

if (gfx_state.tg_fb_type == FB_GOP)

gop = gfx_state.tg_private;

else

gop = NULL;

and the if statement will do its thing below...

This revision now requires changes to proceed.Sat, Jan 3, 4:28 PM
stand/common/gfx_fb.c
860

Agreed, gop shouldn't be unconditionally assigned like that.

I think we can replace gop != NULL with gfx_state.tg_fb_type == FB_GOP. Since gfx_state.tg_private should always be non-NULL in that case.

Only assign "gop" if the framebuffer type is FB_GOP.

This revision is now accepted and ready to land.Sat, Jan 3, 7:39 PM