2. It doesn't do the right thing for devices that don't
have a display at all...

Thanks for elaborating. Hidden feature that is easy to miss,
indeed. CONFIG_LINEAR_FRAMEBUFFER should be the right thing.
Just one question, is it `VB2_CONTEXT_DISPLAY_INIT` that
is passed on or `VBOOT_WD_FLAG_DISPLAY_INIT`?

VB2_CONTEXT_DISPLAY_INIT is an in+out flag to vb2api_fw_phase1() (the code on the other side is here: https://review.coreboot.org/cgit/vboot.git/tree/firmware/2lib/2api.c#n92). If coreboot already sets it, it will definitely be on. If coreboot doesn't set it, vboot may still independently decide to set it anyway. The final value is then memorized by coreboot as VBOOT_WD_FLAG_DISPLAY_INIT and decides whether to actually initialize the display later in ramstage. (It is also memorized internally in vboot and later used in the payload to tell whether display is available or we need another reboot to turn it on.)

Note that we're planning to get rid of the VBOOT_WD_FLAGs again and instead just persist the vb2_context structure across stages. But that shouldn't make a difference for this. All you need to do is to make sure VB2_CONTEXT_DISPLAY_INIT is set before phase1() on all platforms that either always initialize their display unconditionally, or don't have a display to begin with.

View Change

2 comments:

To view, visit change 34622. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I52288b0d5f33cd11d84e609e039dc4ea16ff7bdf
Gerrit-Change-Number: 34622
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Aamir Bohra <aamir.bohra@intel.com>
Gerrit-Reviewer: Aaron Durbin <adurbin@chromium.org>
Gerrit-Reviewer: Amol N Sukerkar <amol.n.sukerkar@intel.com>
Gerrit-Reviewer: Boon Tiong Teo <boon.tiong.teo@intel.com>
Gerrit-Reviewer: Damien Zammit
Gerrit-Reviewer: Julius Werner <jwerner@chromium.org>
Gerrit-Reviewer: Maulik V Vaghela <maulik.v.vaghela@intel.com>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Patrick Rudolph <siro@das-labor.org>
Gerrit-Reviewer: Ronak Kanabar <ronak.kanabar@intel.com>
Gerrit-Reviewer: Subrata Banik <subrata.banik@intel.com>
Gerrit-Reviewer: Varshit B Pandya <varshit.b.pandya@intel.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Joel Kitching <kitching@google.com>
Gerrit-CC: Lean Sheng Tan <lean.sheng.tan@intel.com>
Gerrit-CC: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-Comment-Date: Wed, 31 Jul 2019 20:35:06 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Julius Werner <jwerner@chromium.org>
Comment-In-Reply-To: Nico Huber <nico.h@gmx.de>
Gerrit-MessageType: comment