summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSubrata Banik <subratabanik@google.com>2022-06-30 18:53:35 +0530
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-07-08 22:48:36 +0000
commit448322b612d57980c35ce3be06bf2cea28676914 (patch)
tree87bf4b17fa2a7dd5c21ab5a6871d2edbbb9d1e2f
parent48e92c2fa97015e98c329acc413aad184de2f183 (diff)
downloadvboot-448322b612d57980c35ce3be06bf2cea28676914.tar.gz
vboot: Move `vb2_fw_result` definition from 2nvstorage.h to 2api.h
This patch moves the `vb2_fw_result` enum definition from 2nvstorage.h to 2api.h as 2api.h is the only header file which is getting included by the vb2_api.h. The direction is to keep all required data structure needed by coreboot inside 2api.h only. The follow-up patch would like to implement a new API which would allow to get the slot information and vboot logic as part of coreboot will call into this API to retrieve this info prior storing into the elog while booting. BUG=b:215615970 TEST=Able to compile the Google/Kano board using the emerge command. Signed-off-by: Subrata Banik <subratabanik@google.com> Change-Id: I35a4d34d1032dbf354b161feb6fcd68221a039a8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3737569 Reviewed-by: Julius Werner <jwerner@chromium.org> Reviewed-by: Yu-Ping Wu <yupingso@chromium.org> Auto-Submit: Subrata Banik <subratabanik@chromium.org> Commit-Queue: Subrata Banik <subratabanik@chromium.org> Tested-by: Subrata Banik <subratabanik@chromium.org>
-rw-r--r--firmware/2lib/include/2api.h15
-rw-r--r--firmware/2lib/include/2nvstorage.h15
2 files changed, 15 insertions, 15 deletions
diff --git a/firmware/2lib/include/2api.h b/firmware/2lib/include/2api.h
index 6db87b6a..785e4499 100644
--- a/firmware/2lib/include/2api.h
+++ b/firmware/2lib/include/2api.h
@@ -317,6 +317,21 @@ enum vb2_boot_mode {
VB2_BOOT_MODE_NORMAL = 5,
};
+/* Firmware result codes for VB2_NV_FW_RESULT and VB2_NV_FW_PREV_RESULT */
+enum vb2_fw_result {
+ /* Unknown */
+ VB2_FW_RESULT_UNKNOWN = 0,
+
+ /* Trying a new slot, but haven't reached success/failure */
+ VB2_FW_RESULT_TRYING = 1,
+
+ /* Successfully booted to the OS */
+ VB2_FW_RESULT_SUCCESS = 2,
+
+ /* Known failure */
+ VB2_FW_RESULT_FAILURE = 3,
+};
+
/* Helper for aligning fields in vb2_context. */
#define VB2_PAD_STRUCT3(size, align, count) \
uint8_t _pad##count[align - (((size - 1) % align) + 1)]
diff --git a/firmware/2lib/include/2nvstorage.h b/firmware/2lib/include/2nvstorage.h
index fe758230..a457250f 100644
--- a/firmware/2lib/include/2nvstorage.h
+++ b/firmware/2lib/include/2nvstorage.h
@@ -129,21 +129,6 @@ enum vb2_nv_param {
VB2_NV_MINIOS_PRIORITY,
};
-/* Firmware result codes for VB2_NV_FW_RESULT and VB2_NV_FW_PREV_RESULT */
-enum vb2_fw_result {
- /* Unknown */
- VB2_FW_RESULT_UNKNOWN = 0,
-
- /* Trying a new slot, but haven't reached success/failure */
- VB2_FW_RESULT_TRYING = 1,
-
- /* Successfully booted to the OS */
- VB2_FW_RESULT_SUCCESS = 2,
-
- /* Known failure */
- VB2_FW_RESULT_FAILURE = 3,
-};
-
/*
* Default value for VB2_NV_FIRMWARE_MAX_ROLLFORWARD on V1. This preserves the
* existing behavior that V1 systems will always roll forward the firmware