summaryrefslogtreecommitdiff
path: root/include/fwu.h
diff options
context:
space:
mode:
authorSughosh Ganu <sughosh.ganu@linaro.org>2022-10-21 18:16:03 +0530
committerTom Rini <trini@konsulko.com>2022-10-31 14:47:32 -0400
commit86794052418b7aa15d94025add3082cd357a0b12 (patch)
treef41630f0e51fb7f25db164009d8af79ad4c25267 /include/fwu.h
parent7e9814cc6c1dcda8cb8028e1d34483387889e149 (diff)
downloadu-boot-86794052418b7aa15d94025add3082cd357a0b12.tar.gz
u-boot-86794052418b7aa15d94025add3082cd357a0b12.tar.bz2
u-boot-86794052418b7aa15d94025add3082cd357a0b12.zip
FWU: Add support for the FWU Multi Bank Update feature
The FWU Multi Bank Update feature supports updating firmware images to one of multiple sets(also called banks) of images. The firmware images are clubbed together in banks, with the system booting images from the active bank. Information on the images such as which bank they belong to is stored as part of the metadata structure, which is stored on the same storage media as the firmware images on a dedicated partition. At the time of update, the metadata is read to identify the bank to which the images need to be flashed(update bank). On a successful update, the metadata is modified to set the updated bank as active bank to subsequently boot from. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'include/fwu.h')
-rw-r--r--include/fwu.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/include/fwu.h b/include/fwu.h
index a8ed67b0e0..0919ced812 100644
--- a/include/fwu.h
+++ b/include/fwu.h
@@ -98,6 +98,7 @@ struct fwu_mdata_ops {
};
#define FWU_MDATA_VERSION 0x1
+#define FWU_IMAGE_ACCEPTED 0x1
/*
* GUID value defined in the FWU specification for identification
@@ -107,6 +108,24 @@ struct fwu_mdata_ops {
EFI_GUID(0x8a7a84a0, 0x8387, 0x40f6, 0xab, 0x41, \
0xa8, 0xb9, 0xa5, 0xa6, 0x0d, 0x23)
+/*
+* GUID value defined in the Dependable Boot specification for
+* identification of the revert capsule, used for reverting
+* any image in the updated bank.
+*/
+#define FWU_OS_REQUEST_FW_REVERT_GUID \
+ EFI_GUID(0xacd58b4b, 0xc0e8, 0x475f, 0x99, 0xb5, \
+ 0x6b, 0x3f, 0x7e, 0x07, 0xaa, 0xf0)
+
+/*
+* GUID value defined in the Dependable Boot specification for
+* identification of the accept capsule, used for accepting
+* an image in the updated bank.
+*/
+#define FWU_OS_REQUEST_FW_ACCEPT_GUID \
+ EFI_GUID(0x0c996046, 0xbcc0, 0x4d04, 0x85, 0xec, \
+ 0xe1, 0xfc, 0xed, 0xf1, 0xc6, 0xf8)
+
/**
* fwu_check_mdata_validity() - Check for validity of the FWU metadata copies
*
@@ -379,4 +398,15 @@ u8 fwu_update_checks_pass(void);
*/
u8 fwu_empty_capsule_checks_pass(void);
+/**
+ * fwu_trial_state_ctr_start() - Start the Trial State counter
+ *
+ * Start the counter to identify the platform booting in the
+ * Trial State. The counter is implemented as an EFI variable.
+ *
+ * Return: 0 if OK, -ve on error
+ *
+ */
+int fwu_trial_state_ctr_start(void);
+
#endif /* _FWU_H_ */