From 79c1c6194bc45728a5043443d80506fa1d35c83b Mon Sep 17 00:00:00 2001 From: Randall Spangler Date: Wed, 3 Jan 2018 13:42:40 -0800 Subject: firmware: Include vb1 shared data in vb2 struct Currently, firmware verification uses entirely vb2 structs, including vb2_shared_data. This goes through an ugly translation to the old vb1 VbSharedData to pass it to depthcharge. The vboot kernel verification maintains an equally ugly translation back to the vb2 struct internally. Eventually, we want to get rid of all that and use vb2 all the way down to what crossystem picks up from the OS. But before we can do that, we need to finish translating kernel verification code to use the new vb2 structs. This is a step on that path, using vb2_shared_data equivalents where present and hiding the old vb1 shared data struct as a member of vb2_shared_data so at least the vboot functions don't need to pass around cparams to get at it. This will be followed by more CLs which convert more vboot internals to use vb2 structs directly, and eventually coreboot/depthcharge CLs which pass the vb2 structs from firmware verification directly to kernel verification. No change in functionality. BUG=chromium:611535 BRANCH=none TEST=make -j runtests; build bob firmware and boot it Change-Id: I5df8ce81ba3c3ac3f2cb4229db5461757cd89d8d Reviewed-on: https://chromium-review.googlesource.com/852856 Commit-Ready: ChromeOS CL Exonerator Bot Tested-by: Randall Spangler Reviewed-by: Stefan Reinauer --- firmware/2lib/include/2struct.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'firmware/2lib') diff --git a/firmware/2lib/include/2struct.h b/firmware/2lib/include/2struct.h index 9ae1f540..589e7c9b 100644 --- a/firmware/2lib/include/2struct.h +++ b/firmware/2lib/include/2struct.h @@ -194,6 +194,12 @@ struct vb2_shared_data { * stage memory requirements. */ + /* + * Vboot1 shared data header. This data should eventually get folded + * directly into the kernel portion of this struct. + */ + struct VbSharedDataHeader *vbsd; + /* * Offset and size of packed kernel key in work buffer. Size is 0 if * subkey is not stored in the work buffer. Note that kernel key may -- cgit v1.2.1