vboot: use out_flags to indicate dev mode
In order to make the proper decision on loading the
option rom or not the developer mode setting needs to be
known. Under early firmware selection it is possible to know
the state of developer mode by a flag in out flags. Use this
flag when early firmware selection is being employed to determine
if developer mode is enabled or not.
BUG=None
BRACNh=None
TEST=booted slippy w/ patch and option rom is loaded correctly when
virtual dev switch is employed.
Change-Id: I9c226d368e92ddf8f14ce4dcde00da144de2a5f3
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/57380
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
This commit is contained in:
parent
de2357a7c5
commit
532903ffd8
1 changed files with 20 additions and 1 deletions
|
|
@ -26,9 +26,28 @@
|
|||
#include <cbmem.h>
|
||||
#include <console/console.h>
|
||||
|
||||
#if CONFIG_VBOOT_VERIFY_FIRMWARE
|
||||
static int vboot_enable_developer(void)
|
||||
{
|
||||
struct vboot_handoff *vbho;
|
||||
|
||||
vbho = cbmem_find(CBMEM_ID_VBOOT_HANDOFF);
|
||||
|
||||
if (vbho == NULL) {
|
||||
printk(BIOS_ERR, "%s: Couldn't find vboot_handoff structure!\n",
|
||||
__func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return !!(vbho->init_params.out_flags & VB_INIT_OUT_ENABLE_DEVELOPER);
|
||||
}
|
||||
#else
|
||||
static inline int vboot_enable_developer(void) { return 0; }
|
||||
#endif
|
||||
|
||||
int developer_mode_enabled(void)
|
||||
{
|
||||
return get_developer_mode_switch();
|
||||
return get_developer_mode_switch() || vboot_enable_developer();
|
||||
}
|
||||
|
||||
int recovery_mode_enabled(void)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue