vboot: add magic and version to vb2_shared_data

In order for vb2_shared_data to cross application boundaries,
it needs magic and version fields.

These can be initialized in vb2_init_context, which is called
implicitly via vb2api_fw_phase1 and vb2api_fail.

On re-init, check fields for validity.

BUG=b:124141368, b:124192753
TEST=make clean && make runtests

Change-Id: I90005833836f13f60813bdf82f0e4dbb8d9afecd
Reviewed-on: https://chromium-review.googlesource.com/1521406
Commit-Ready: Joel Kitching <kitching@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
4 files changed