Pass all calls to VBExLegacy() through a single function
It is important that we lock the TPM before calling this function. We have
several places where the function is called. Reduce the risk that the TPM
is no locked by running all calls through a single point. Drop the
vb2_exit_altfw() function as it is not needed now.
We rely on being able to call RollbackKernelLock() multiple times since it
ignores subsequent calls and does not attempt to lock the TPM twice.
With the menu UI this causes a small change in behaviour: when starting
legacy firmware fails the screen flashes AFTER the beep instead of before.
Hopefully this difference is not important.
Future work will unify the two UI more.
TEST=FEATURES=test emerge-grunt --nodeps vboot_reference
Signed-off-by: Simon Glass <email@example.com>
Reviewed-by: Julius Werner <firstname.lastname@example.org>
5 files changed