mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-24 02:05:01 +00:00
vboot: Split partition and vblock verification from LoadKernel()
LoadKernel() was a big function which did everything from looping over partitions on a drive to loading the data within them to calling the low-level verification functions on that data. Split it apart into more manageable chunks. This also reduces indentation of the inner parts of the code, whic increases readability. No outwardly-visible functionality changes. BUG=chromium:611535 BRANCH=none TEST=make runtests; emerge-kevin coreboot depthcharge Change-Id: Iea79e70163f5d9f1a9d0d897e4a9bacc925a742d Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/404919 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
This commit is contained in:
committed by
chrome-bot
parent
dfcacc87be
commit
f182401b97
@@ -1087,8 +1087,6 @@ VbError_t VbSelectAndLoadKernel(VbCommonParams *cparams,
|
||||
|
||||
/* Fill in params for calls to LoadKernel() */
|
||||
memset(&p, 0, sizeof(p));
|
||||
p.shared_data_blob = cparams->shared_data_blob;
|
||||
p.shared_data_size = cparams->shared_data_size;
|
||||
p.gbb_data = cparams->gbb_data;
|
||||
p.gbb_size = cparams->gbb_size;
|
||||
p.fwmp = &fwmp;
|
||||
@@ -1295,9 +1293,9 @@ VbError_t VbSelectAndLoadKernel(VbCommonParams *cparams,
|
||||
|
||||
/* Save disk parameters */
|
||||
kparams->disk_handle = p.disk_handle;
|
||||
kparams->partition_number = (uint32_t)p.partition_number;
|
||||
kparams->partition_number = p.partition_number;
|
||||
kparams->bootloader_address = p.bootloader_address;
|
||||
kparams->bootloader_size = (uint32_t)p.bootloader_size;
|
||||
kparams->bootloader_size = p.bootloader_size;
|
||||
kparams->flags = p.flags;
|
||||
memcpy(kparams->partition_guid, p.partition_guid,
|
||||
sizeof(kparams->partition_guid));
|
||||
|
||||
Reference in New Issue
Block a user