vboot2: secdata: Check struct_version on initialization
This patch reintroduces a vb2_secdata->struct_version check similar to
the one that was removed in CL:244846. The CRC is not a reliable way to
detect zeroed buffers, so this check helps vboot fail earlier and more
clearly in certain situations.
TEST=make runtests. Rebooted Jerry with 'mem w 0xff7601b0 0xfdb9', saw
that recovery reason was now 0x2b (VBNV_RECOVERY_VB2_SECDATA_INIT).
Signed-off-by: Julius Werner <firstname.lastname@example.org>
Reviewed-by: Randall Spangler <email@example.com>
Reviewed-by: Vadim Bendebury <firstname.lastname@example.org>
Commit-Queue: Vadim Bendebury <email@example.com>
Tested-by: Vadim Bendebury <firstname.lastname@example.org>
3 files changed