security/vboot: Use persistent context to read GBB flags
With the persistent vboot context coreboot no longer needs to read GBB flags from flash itself -- it can just ask vboot for the cached result. This patch removes the existing GBB code and provides gbb_is_flag_set() (with a slightly better namespaced name) as a static inline instead. Change-Id: Ibc3ed0f3fbeb53d630925d47df4dc474b0ed07ee Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/37261 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Joel Kitching <kitching@google.com>
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
#include <fmap.h>
|
||||
#include <reset.h>
|
||||
#include <stddef.h>
|
||||
#include <security/vboot/gbb.h>
|
||||
#include <security/vboot/misc.h>
|
||||
#include <security/vboot/vboot_common.h>
|
||||
#include <security/vboot/vbnv.h>
|
||||
#include <vb2_api.h>
|
||||
@@ -31,7 +31,7 @@ int vboot_can_enable_udc(void)
|
||||
if (!vboot_developer_mode_enabled())
|
||||
return 0;
|
||||
/* Enable if GBB flag is set */
|
||||
if (gbb_is_flag_set(VB2_GBB_FLAG_ENABLE_UDC))
|
||||
if (vboot_is_gbb_flag_set(VB2_GBB_FLAG_ENABLE_UDC))
|
||||
return 1;
|
||||
/* Enable if VBNV flag is set */
|
||||
if (vbnv_udc_enable_flag())
|
||||
|
Reference in New Issue
Block a user