From 55d0af4618494a058d0c5a77b21cfaa003de7fa1 Mon Sep 17 00:00:00 2001 From: Patrick Rudolph Date: Fri, 11 Feb 2022 15:49:37 +0100 Subject: [PATCH] bsd/cb_err: Add error code for UEFI variable store Add a new set of errors that will be used by the introduced EFI non-volatile variable store in flash. Change-Id: I6baea9fb138d1a2755d22a3d587105793adb9c90 Signed-off-by: Patrick Rudolph Reviewed-on: https://review.coreboot.org/c/coreboot/+/61960 Tested-by: build bot (Jenkins) Reviewed-by: Lean Sheng Tan --- src/commonlib/bsd/include/commonlib/bsd/cb_err.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/commonlib/bsd/include/commonlib/bsd/cb_err.h b/src/commonlib/bsd/include/commonlib/bsd/cb_err.h index 725882c602..452f58b1ce 100644 --- a/src/commonlib/bsd/include/commonlib/bsd/cb_err.h +++ b/src/commonlib/bsd/include/commonlib/bsd/cb_err.h @@ -41,6 +41,16 @@ enum cb_err { CB_CBFS_NOT_FOUND = -401, /**< File not found in directory */ CB_CBFS_HASH_MISMATCH = -402, /**< Master hash validation failed */ CB_CBFS_CACHE_FULL = -403, /**< Metadata cache overflowed */ + + /* EFI errors */ + CB_EFI_FVH_INVALID = -500, /**< UEFI FVH (Firmware Volume Header) is corrupted */ + CB_EFI_CHECKSUM_INVALID = -501, /**< UEFI FVH checksum is invalid */ + CB_EFI_VS_NOT_FORMATTED_INVALID = -502, /**< UEFI variable store not formatted */ + CB_EFI_VS_CORRUPTED_INVALID = -503, /**< UEFI variable store is corrupted */ + CB_EFI_ACCESS_ERROR = -504, /**< UEFI variable store access error */ + CB_EFI_STORE_FULL = -505, /**< UEFI variable store is full */ + CB_EFI_OPTION_NOT_FOUND = -506, /**< UEFI variable not found */ + CB_EFI_BUFFER_TOO_SMALL = -507, /**< UEFI Buffer is too small. */ }; #endif /* _COMMONLIB_BSD_CB_ERR_H_ */