• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
2  * Use of this source code is governed by a BSD-style license that can be
3  * found in the LICENSE file.
4  */
5 
6 #include "sysincludes.h"
7 
8 #include "cgptlib.h"
9 #include "load_firmware_fw.h"
10 #include "load_kernel_fw.h"
11 #include "rollback_index.h"
12 #include "tlcl.h"
13 #include "tpm_bootmode.h"
14 #include "vboot_common.h"
15 #include "vboot_kernel.h"
16 #include "vboot_nvstorage.h"
17 
18 
main(void)19 int main(void)
20 {
21 	/* cgptlib.h */
22 	GptInit(0);
23 	GptNextKernelEntry(0, 0, 0);
24 	GptUpdateKernelEntry(0, 0);
25 
26 	/* load_firmware_fw.h */
27 	LoadFirmware(0, 0, 0);
28 
29 	/* load_kernel_fw.h */
30 	LoadKernel(0, 0);
31 
32 	/* rollback_index.h */
33 	RollbackS3Resume();
34 	RollbackFirmwareSetup(0, 0, 0, 0, 0);
35 	RollbackFirmwareWrite(0);
36 	RollbackFirmwareLock();
37 	RollbackKernelRead(0);
38 	RollbackKernelWrite(0);
39 	RollbackKernelLock(0);
40 
41 	/* tpm_bootmode.c */
42 	SetTPMBootModeState(0, 0, 0, 0);
43 
44 	/* tlcl.h */
45 	TlclStartup();
46 	TlclResume();
47 	TlclSelfTestFull();
48 	TlclContinueSelfTest();
49 	TlclDefineSpace(0, 0, 0);
50 	TlclWrite(0, 0, 0);
51 	TlclRead(0, 0, 0);
52 	TlclWriteLock(0);
53 	TlclReadLock(0);
54 	TlclAssertPhysicalPresence();
55 	TlclSetNvLocked();
56 	TlclIsOwned();
57 	TlclForceClear();
58 	TlclSetEnable();
59 	TlclClearEnable();
60 	TlclSetDeactivated(0);
61 	TlclGetFlags(0, 0, 0);
62 	TlclSetGlobalLock();
63 	TlclExtend(0, 0, 0);
64 	TlclGetPermissions(0, 0);
65 
66 	/* vboot_api.h - entry points INTO vboot_reference */
67 	VbInit(0, 0);
68 	VbSelectFirmware(0, 0);
69 	VbUpdateFirmwareBodyHash(0, 0, 0);
70 	VbSelectAndLoadKernel(0, 0);
71 
72 	/* vboot_common.h */
73 	OffsetOf(0, 0);
74 	GetPublicKeyData(0);
75 	GetPublicKeyDataC(0);
76 	GetSignatureData(0);
77 	GetSignatureDataC(0);
78 	VerifyMemberInside(0, 0, 0, 0, 0, 0);
79 	VerifyPublicKeyInside(0, 0, 0);
80 	VerifySignatureInside(0, 0, 0);
81 	PublicKeyInit(0, 0, 0);
82 	PublicKeyCopy(0, 0);
83 	PublicKeyToRSA(0);
84 	VerifyData(0, 0, 0, 0);
85 	VerifyDigest(0, 0, 0);
86 	KeyBlockVerify(0, 0, 0, 0);
87 	VerifyFirmwarePreamble(0, 0, 0);
88 	VbGetFirmwarePreambleFlags(0);
89 	VerifyKernelPreamble(0, 0, 0);
90 	VbSharedDataInit(0, 0);
91 	VbSharedDataReserve(0, 0);
92 	VbSharedDataSetKernelKey(0, 0);
93 
94 	VbNvSetup(0);
95 	VbNvGet(0, 0, 0);
96 	VbNvSet(0, 0, 0);
97 	VbNvTeardown(0);
98 
99 	return 0;
100 }
101