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

Rui Paulo rpaulo at me.com
Sat Apr 4 08:47:44 UTC 2015


On Apr 4, 2015, at 00:27, Bruce Evans <brde at optusnet.com.au> wrote:
> 
> 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.

In my case, the "buffer" was a Lenovo logo.  In other cases it might include POST messages, but like you said vt already clears it.

> 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.

This is very specific to EFI.  FreeBSD has always strived to give you text messages during boot and, while it would be easy to have the FreeBSD logo all the way to Xorg like Ubuntu does, I don't see that happening any time soon.

Speaking of mode switching, they are pretty fast on this system.

> 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.

In my system, these EFI calls (reset + clear) don't take long.  I can't tell any difference between the old boot time and the new boot time.

--
Rui Paulo





More information about the svn-src-head mailing list