diff options
-rw-r--r-- | firmware/include/vboot_struct.h | 14 | ||||
-rw-r--r-- | firmware/lib/vboot_api_kernel.c | 14 | ||||
-rw-r--r-- | firmware/lib/vboot_kernel.c | 2 |
3 files changed, 14 insertions, 16 deletions
diff --git a/firmware/include/vboot_struct.h b/firmware/include/vboot_struct.h index 6334b99b..5d76ece7 100644 --- a/firmware/include/vboot_struct.h +++ b/firmware/include/vboot_struct.h @@ -48,8 +48,9 @@ extern "C" { * kernel keyblock. */ #define VBSD_KERNEL_KEY_VERIFIED 0x00000002 -/* LoadFirmware() was told the developer switch was on */ -#define VBSD_LF_DEV_SWITCH_ON 0x00000004 +/* LoadFirmware() was told the developer switch was on; + Deprecated as part of chromium:1038260 */ +#define VBSD_DEPRECATED_LF_DEV_SWITCH_ON 0x00000004 /* * LoadFirmware() is requesting the read only normal/dev code path. This is * deprecated and unsupported by current firmware. @@ -74,7 +75,7 @@ extern "C" { #define VBSD_EC_SOFTWARE_SYNC 0x00000800 /* VbInit() was told that the EC firmware is slow to update Deprecated as part of chromium:1038259 */ -#define VBSD_DEPRECATED_EC_SLOW_UPDATE 0x00001000 +#define VBSD_DEPRECATED_EC_SLOW_UPDATE 0x00001000 /* Firmware software write protect was enabled at boot time. Crossystem support deprecated as part of CL:575389. */ #define VBSD_DEPRECATED_BOOT_FIRMWARE_SW_WP_ENABLED 0x00002000 @@ -88,11 +89,12 @@ extern "C" { /* Firmware has loaded the VGA Option ROM; Deprecated as part of chromium:948529 */ #define VBSD_DEPRECATED_OPROM_LOADED 0x00020000 -/* Don't try for boot failures */ -#define VBSD_NOFAIL_BOOT 0x00040000 +/* Don't try for boot failures; + * Deprecated as part of chromium:1038260 */ +#define VBSD_DEPRECATED_NOFAIL_BOOT 0x00040000 /* VbInit() was told that the EC firmware supports EFS Deprecated as part of chromium:1038259 */ -#define VBSD_DEPRECATED_EC_EFS 0x00080000 +#define VBSD_DEPRECATED_EC_EFS 0x00080000 /* NvStorage uses 64-byte record, not 16-byte */ #define VBSD_NVDATA_V2 0x00100000 diff --git a/firmware/lib/vboot_api_kernel.c b/firmware/lib/vboot_api_kernel.c index ef9cd4d9..24b63c43 100644 --- a/firmware/lib/vboot_api_kernel.c +++ b/firmware/lib/vboot_api_kernel.c @@ -236,17 +236,13 @@ static vb2_error_t vb2_kernel_setup(struct vb2_context *ctx, if (sd->flags & VB2_SD_FLAG_DEV_MODE_ENABLED) ctx->flags |= VB2_CONTEXT_DEVELOPER_MODE; - /* - * The following flags are set by depthcharge. - * - * TODO: Some of these are set at compile-time, so could be #defines - * instead of flags. That would save on firmware image size because - * features that won't be used in an image could be compiled out. - */ + /* Translate vboot2 flags and fields into vboot1. */ if (ctx->flags & VB2_CONTEXT_EC_SYNC_SUPPORTED) shared->flags |= VBSD_EC_SOFTWARE_SYNC; - if (shared->flags & VBSD_NVDATA_V2) - ctx->flags |= VB2_CONTEXT_NVDATA_V2; + if (ctx->flags & VB2_CONTEXT_NVDATA_V2) + shared->flags |= VBSD_NVDATA_V2; + if (sd->flags & VB2_SD_FLAG_DEV_MODE_ENABLED) + shared->flags |= VBSD_BOOT_DEV_SWITCH_ON; /* Translate recovery reason-related fields into vboot1 */ shared->recovery_reason = sd->recovery_reason; diff --git a/firmware/lib/vboot_kernel.c b/firmware/lib/vboot_kernel.c index 7821c418..72ea0ebc 100644 --- a/firmware/lib/vboot_kernel.c +++ b/firmware/lib/vboot_kernel.c @@ -603,7 +603,7 @@ vb2_error_t LoadKernel(struct vb2_context *ctx, LoadKernelParams *params) * But not when we assume that the boot process may * not complete for valid reasons (eg. early shutdown). */ - if (!(shared->flags & VBSD_NOFAIL_BOOT)) + if (!(ctx->flags & VB2_CONTEXT_NOFAIL_BOOT)) GptUpdateKernelEntry(&gpt, GPT_UPDATE_ENTRY_TRY); /* |