From f64f3d00481ae45e1e70e804d5cb7907cac8abac Mon Sep 17 00:00:00 2001 From: Jakub Czapiga Date: Fri, 8 Sep 2023 13:17:21 +0000 Subject: libpayload/vboot: Add vboot context initialization and management code To fully and easily implement fallback/recovery in libcbfs with vboot support the codebase requires access to vboot context. Moving context management to libpayload allows to avoid unnecessary overhead and code complication and still allows payloads to access it in a way it was designed. Access to this codebase will also allow implementation of e.g. vboot_fail_and_reboot() and other helpful utilities used by coreboot and depthcharge. BUG=b:197114807 TEST=make unit-tests TEST=Build and boot on google/ovis4es with CL:4839296 and VBOOT_CBFS_INTEGRATION enabled Change-Id: Id719be7c4f07251201424b7dc6c1125c6b5756d8 Signed-off-by: Jakub Czapiga Reviewed-on: https://review.coreboot.org/c/coreboot/+/77635 Tested-by: build bot (Jenkins) Reviewed-by: Eric Lai Reviewed-by: Yu-Ping Wu --- payloads/libpayload/include/lp_vboot.h | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 payloads/libpayload/include/lp_vboot.h (limited to 'payloads/libpayload/include') diff --git a/payloads/libpayload/include/lp_vboot.h b/payloads/libpayload/include/lp_vboot.h new file mode 100644 index 0000000000..56ec46024e --- /dev/null +++ b/payloads/libpayload/include/lp_vboot.h @@ -0,0 +1,10 @@ +/* SPDX-License-Identifier: BSD-3-Clause */ + +#ifndef _LP_VBOOT_H_ +#define _LP_VBOOT_H_ + +#include + +struct vb2_context *vboot_get_context(void); + +#endif /* _LP_VBOOT_H_ */ -- cgit v1.2.3