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:
Julius Werner
2019-11-26 17:58:11 -08:00
parent 3e8ef1028d
commit d618aaceae
5 changed files with 13 additions and 123 deletions

View File

@@ -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())