svn commit: r281059 - head/sys/boot/efi/boot1

Bruce Evans brde at optusnet.com.au
Sat Apr 4 07:27:23 UTC 2015


On Sat, 4 Apr 2015, Rui Paulo wrote:

> Log:
>  boot1 EFI: reset the screen and select the best mode.
>
>  It's necessary to reset the screen to make sure any vendor pixels are
>  gone when we start boot1.  In the Lenovo X1 (3rd gen), this is the
>  only way to clear the screen.  Previously, the Lenovo logo would only
>  disappear after the kernel started scrolling the display.
>
>  After resetting the screen, EFI could put us in the worst LCD mode
>  (oversized characters), so we now find the largest mode we can use and
>  hope it's the most appropriate one (it's not trivial to tell what's
>  the correct LCD resolution at this point).  It's worth noting that the
>  final stage loader has a 'mode' command that can be used to switch
>  text modes.

:-(.

I just complained about the bug that vt (on non-EFI) clears the screen
where sc carefully preserves the screen in its history buffer.

For graphics mode, determining the resolution is the trivial part :-).
You also need OCR or something to translate the pixels into the format
of your history buffer.  Don't forget to fetch Lenevo's history buffer
and translate it into your format :-).

I don't have problems with boot logos except when the battery dies,
since I turn them off until the CMOS forgets, but lose boot messages
in another way from newer monitors blanking the screen after mode
switches for much longer than older monitors.  I expected newer systems
to "fix" this by using the same graphics mode for the whole boot.

Resetting the screen is even worse than clearing.  Whole boots should
take a second or 2.  I don't get close to that.  More like 20.  But with
the monitor blanking the screen for 5+ seconds afer every mode switch,
even a 20-second boot gives almost no time for reading its messages.
Saving the messages in history buffers or booting with -p becomes more
important.

Bruce


More information about the svn-src-head mailing list