mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-25 18:55:24 +00:00
Passing the vb2 context around allows using more of the vb2 functions in future changes, and prepares for a future where we directly use the context as it was set up in firmware verification. BUG=chromium:611535 BRANCH=none TEST=make runtests; emerge-kevin coreboot depthcharge Change-Id: I8efa606dbdec5d195b66eb899e76fdc84337ad36 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/404997 Reviewed-by: Shelley Chen <shchen@chromium.org>
81 lines
1.6 KiB
C
81 lines
1.6 KiB
C
/* Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
#include "sysincludes.h"
|
|
|
|
#include "cgptlib.h"
|
|
#include "load_kernel_fw.h"
|
|
#include "rollback_index.h"
|
|
#include "tlcl.h"
|
|
#include "vboot_common.h"
|
|
#include "vboot_kernel.h"
|
|
#include "vboot_nvstorage.h"
|
|
|
|
|
|
int main(void)
|
|
{
|
|
/* cgptlib.h */
|
|
GptInit(0);
|
|
GptNextKernelEntry(0, 0, 0);
|
|
GptUpdateKernelEntry(0, 0);
|
|
|
|
/* load_kernel_fw.h */
|
|
LoadKernel(0, 0, 0);
|
|
|
|
/* rollback_index.h */
|
|
RollbackKernelRead(0);
|
|
RollbackKernelWrite(0);
|
|
RollbackKernelLock(0);
|
|
|
|
/* tlcl.h */
|
|
TlclStartup();
|
|
TlclResume();
|
|
TlclSelfTestFull();
|
|
TlclContinueSelfTest();
|
|
TlclDefineSpace(0, 0, 0);
|
|
TlclWrite(0, 0, 0);
|
|
TlclRead(0, 0, 0);
|
|
TlclWriteLock(0);
|
|
TlclReadLock(0);
|
|
TlclIsOwned();
|
|
TlclForceClear();
|
|
TlclSetEnable();
|
|
TlclSetDeactivated(0);
|
|
TlclGetFlags(0, 0, 0);
|
|
TlclSetGlobalLock();
|
|
TlclExtend(0, 0, 0);
|
|
TlclGetPermissions(0, 0);
|
|
#ifndef TPM2_MODE
|
|
TlclAssertPhysicalPresence();
|
|
TlclSetNvLocked();
|
|
TlclClearEnable();
|
|
#endif
|
|
|
|
/* vboot_api.h - entry points INTO vboot_reference */
|
|
VbSelectAndLoadKernel(0, 0);
|
|
|
|
/* vboot_common.h */
|
|
OffsetOf(0, 0);
|
|
GetPublicKeyData(0);
|
|
GetPublicKeyDataC(0);
|
|
GetSignatureData(0);
|
|
GetSignatureDataC(0);
|
|
VerifyMemberInside(0, 0, 0, 0, 0, 0);
|
|
VerifyPublicKeyInside(0, 0, 0);
|
|
VerifySignatureInside(0, 0, 0);
|
|
PublicKeyInit(0, 0, 0);
|
|
PublicKeyCopy(0, 0);
|
|
VbSharedDataInit(0, 0);
|
|
VbSharedDataReserve(0, 0);
|
|
VbSharedDataSetKernelKey(0, 0);
|
|
|
|
VbNvSetup(0);
|
|
VbNvGet(0, 0, 0);
|
|
VbNvSet(0, 0, 0);
|
|
VbNvTeardown(0);
|
|
|
|
return 0;
|
|
}
|