mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-24 02:05:01 +00:00
Revert "Implementation of Region API"
This reverts commit 1d3c804b6b.
This patch breaks cbuildbot on internal paladins bots.
Change-Id: Icf7f9d9bbb56b092035888eaa3e249ffd23fac16
(cherry picked from commit 3a60335ebb1530e5fd9d5da3bc6214949bc59caf)
Reviewed-on: https://chromium-review.googlesource.com/167451
Reviewed-by: Yoshiki Iguchi <yoshiki@chromium.org>
Commit-Queue: Yoshiki Iguchi <yoshiki@chromium.org>
Tested-by: Yoshiki Iguchi <yoshiki@chromium.org>
This commit is contained in:
@@ -7,10 +7,8 @@
|
||||
|
||||
#include "sysincludes.h"
|
||||
|
||||
#include "gbb_access.h"
|
||||
#include "gbb_header.h"
|
||||
#include "load_kernel_fw.h"
|
||||
#include "region.h"
|
||||
#include "rollback_index.h"
|
||||
#include "utility.h"
|
||||
#include "vboot_api.h"
|
||||
@@ -99,7 +97,7 @@ uint32_t VbTryLoadKernel(VbCommonParams *cparams, LoadKernelParams *p,
|
||||
p->disk_handle = disk_info[i].handle;
|
||||
p->bytes_per_lba = disk_info[i].bytes_per_lba;
|
||||
p->ending_lba = disk_info[i].lba_count - 1;
|
||||
retval = LoadKernel(p, cparams);
|
||||
retval = LoadKernel(p);
|
||||
VBDEBUG(("VbTryLoadKernel() LoadKernel() = %d\n", retval));
|
||||
|
||||
/*
|
||||
@@ -175,7 +173,8 @@ VbError_t VbBootNormal(VbCommonParams *cparams, LoadKernelParams *p)
|
||||
|
||||
VbError_t VbBootDeveloper(VbCommonParams *cparams, LoadKernelParams *p)
|
||||
{
|
||||
GoogleBinaryBlockHeader *gbb = cparams->gbb;
|
||||
GoogleBinaryBlockHeader *gbb =
|
||||
(GoogleBinaryBlockHeader *)cparams->gbb_data;
|
||||
VbSharedDataHeader *shared =
|
||||
(VbSharedDataHeader *)cparams->shared_data_blob;
|
||||
uint32_t allow_usb = 0, allow_legacy = 0, ctrl_d_pressed = 0;
|
||||
@@ -808,25 +807,13 @@ VbError_t VbEcSoftwareSync(VbCommonParams *cparams)
|
||||
return VBERROR_SUCCESS;
|
||||
}
|
||||
|
||||
/* This function is also used by tests */
|
||||
void VbApiKernelFree(VbCommonParams *cparams)
|
||||
{
|
||||
/* VbSelectAndLoadKernel() always allocates this, tests don't */
|
||||
if (cparams->gbb) {
|
||||
VbExFree(cparams->gbb);
|
||||
cparams->gbb = NULL;
|
||||
}
|
||||
if (cparams->bmp) {
|
||||
VbExFree(cparams->bmp);
|
||||
cparams->bmp = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
VbError_t VbSelectAndLoadKernel(VbCommonParams *cparams,
|
||||
VbSelectAndLoadKernelParams *kparams)
|
||||
{
|
||||
VbSharedDataHeader *shared =
|
||||
(VbSharedDataHeader *)cparams->shared_data_blob;
|
||||
GoogleBinaryBlockHeader *gbb =
|
||||
(GoogleBinaryBlockHeader *)cparams->gbb_data;
|
||||
VbError_t retval = VBERROR_SUCCESS;
|
||||
LoadKernelParams p;
|
||||
uint32_t tpm_status = 0;
|
||||
@@ -844,15 +831,9 @@ VbError_t VbSelectAndLoadKernel(VbCommonParams *cparams,
|
||||
kparams->bootloader_size = 0;
|
||||
Memset(kparams->partition_guid, 0, sizeof(kparams->partition_guid));
|
||||
|
||||
cparams->bmp = NULL;
|
||||
cparams->gbb = VbExMalloc(sizeof(*cparams->gbb));
|
||||
retval = VbGbbReadHeader_static(cparams, cparams->gbb);
|
||||
if (VBERROR_SUCCESS != retval)
|
||||
goto VbSelectAndLoadKernel_exit;
|
||||
|
||||
/* Do EC software sync if necessary */
|
||||
if ((shared->flags & VBSD_EC_SOFTWARE_SYNC) &&
|
||||
!(cparams->gbb->flags & GBB_FLAG_DISABLE_EC_SOFTWARE_SYNC)) {
|
||||
!(gbb->flags & GBB_FLAG_DISABLE_EC_SOFTWARE_SYNC)) {
|
||||
retval = VbEcSoftwareSync(cparams);
|
||||
if (retval != VBERROR_SUCCESS)
|
||||
goto VbSelectAndLoadKernel_exit;
|
||||
@@ -1001,8 +982,6 @@ VbError_t VbSelectAndLoadKernel(VbCommonParams *cparams,
|
||||
|
||||
VbSelectAndLoadKernel_exit:
|
||||
|
||||
VbApiKernelFree(cparams);
|
||||
|
||||
VbNvTeardown(&vnc);
|
||||
if (vnc.raw_changed)
|
||||
VbExNvStorageWrite(vnc.raw);
|
||||
|
||||
Reference in New Issue
Block a user