blob: c5fdc1c6512b2da2d6d0ce8a7192ab510b7a9015 [file] [log] [blame]
/* Copyright 2020 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
* User interfaces for developer and recovery mode menus.
*/
#ifndef VBOOT_REFERENCE_2UI_H_
#define VBOOT_REFERENCE_2UI_H_
/**
* UI for a developer-mode boot.
*
* Enter the developer menu, which provides options to switch out of developer
* mode, boot from external media, use legacy bootloader, or boot Chrome OS from
* disk.
*
* If a timeout occurs, take the default boot action.
*
* @param ctx Vboot context
* @returns VB2_SUCCESS, or non-zero error code.
*/
vb2_error_t vb2_developer_menu(struct vb2_context *ctx);
/**
* UI for a non-manual recovery ("BROKEN").
*
* Enter the recovery menu, which shows that an unrecoverable error was
* encountered last boot. Wait for the user to physically reset or shut down.
*
* @param ctx Vboot context
* @returns VB2_SUCCESS, or non-zero error code.
*/
vb2_error_t vb2_broken_recovery_menu(struct vb2_context *ctx);
/**
* UI for a manual recovery-mode boot.
*
* Enter the recovery menu, which prompts the user to insert recovery media,
* navigate the step-by-step recovery, or enter developer mode if allowed.
*
* @param ctx Vboot context
* @returns VB2_SUCCESS, or non-zero error code.
*/
vb2_error_t vb2_manual_recovery_menu(struct vb2_context *ctx);
#endif /* VBOOT_REFERENCE_2UI_H_ */