b2163ea84b
Patch adds: - vboot_fail_and_reboot() for vboot failures handling. - reboot() weak implementation for payloads to implement, used by vboot_fail_and_reboot(). - vboot_recovery_mode_enabled() to check if recovery mode flag is set in vboot context. Implemented for future libcbfs implementation of VBOOT_CBFS_INTEGRATION in libpayload. BUG=b:197114807 TEST=none Change-Id: I53d1955573d54bc56d05f7780c18dcc8ac1fd399 Signed-off-by: Jakub Czapiga <jacz@semihalf.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77725 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com> Reviewed-by: Julius Werner <jwerner@chromium.org> Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
19 lines
491 B
C
19 lines
491 B
C
/* SPDX-License-Identifier: BSD-3-Clause */
|
|
|
|
#ifndef _LP_VBOOT_H_
|
|
#define _LP_VBOOT_H_
|
|
|
|
#include <vb2_api.h>
|
|
|
|
struct vb2_context *vboot_get_context(void);
|
|
|
|
/*
|
|
* Call vb2api_fail() with reason and subcode, save vboot data with vb2ex_commit_data()
|
|
* and reboot with vboot_reboot().
|
|
*/
|
|
void vboot_fail_and_reboot(struct vb2_context *ctx, uint8_t reason, uint8_t subcode);
|
|
|
|
/* Returns non-zero if recovery mode is enabled. */
|
|
int vboot_recovery_mode_enabled(void);
|
|
|
|
#endif /* _LP_VBOOT_H_ */
|