CFR: Add version field to root struct
Add a version field to the CFR root struct so parsers can check compatibility when parsing structs. Change-Id: Ifcb950f1bdedc0ab925f3841befb7e7001c0f7f4 Signed-off-by: Filip Brozovic <fbrozovic@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/86080 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
parent
4a2135d21e
commit
99cfad508a
3 changed files with 4 additions and 0 deletions
|
|
@ -49,6 +49,8 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#define CFR_VERSION 0x00000000
|
||||
|
||||
enum cfr_tags {
|
||||
CFR_TAG_OPTION_FORM = 1,
|
||||
CFR_TAG_ENUM_VALUE = 2,
|
||||
|
|
|
|||
|
|
@ -602,6 +602,7 @@ struct lb_efi_fw_info {
|
|||
struct lb_cfr {
|
||||
uint32_t tag;
|
||||
uint32_t size;
|
||||
uint32_t version;
|
||||
uint32_t checksum; /* Checksum of the variable payload. */
|
||||
/* struct lb_cfr_option_form forms[] */
|
||||
};
|
||||
|
|
|
|||
|
|
@ -307,6 +307,7 @@ void cfr_write_setup_menu(struct lb_cfr *cfr_root, struct sm_obj_form *sm_root[]
|
|||
|
||||
cfr_root->tag = LB_TAG_CFR_ROOT;
|
||||
cfr_root->size = sizeof(*cfr_root);
|
||||
cfr_root->version = CFR_VERSION;
|
||||
|
||||
current += cfr_root->size;
|
||||
while (sm_root && sm_root[i])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue