Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(148)

Side by Side Diff: src/platform/vboot_reference/vboot_firmware/linktest/main.c

Issue 2344002: Add recovery mode protection to new NVRAM locking scheme. (Closed) Base URL: ssh://git@chromiumos-git/chromeos
Patch Set: typo in comment Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/platform/vboot_reference/vboot_firmware/lib/rollback_index.c ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #include <stdio.h> 1 #include <stdio.h>
2 2
3 #include "cgptlib.h" 3 #include "cgptlib.h"
4 #include "firmware_image_fw.h" 4 #include "firmware_image_fw.h"
5 #include "kernel_image_fw.h" 5 #include "kernel_image_fw.h"
6 #include "load_kernel_fw.h" 6 #include "load_kernel_fw.h"
7 #include "rollback_index.h" 7 #include "rollback_index.h"
8 #include "tlcl.h" 8 #include "tlcl.h"
9 9
10 int main(void) 10 int main(void)
11 { 11 {
12 uint16_t x, y;
13
12 // cgptlib.h 14 // cgptlib.h
13 GptInit(0); 15 GptInit(0);
14 GptNextKernelEntry(0, 0, 0); 16 GptNextKernelEntry(0, 0, 0);
15 GptUpdateKernelEntry(0, 0); 17 GptUpdateKernelEntry(0, 0);
16 18
17 // firmware_image_fw.h 19 // firmware_image_fw.h
18 VerifyFirmwareHeader(0, 0, 0, 0); 20 VerifyFirmwareHeader(0, 0, 0, 0);
19 VerifyFirmwarePreamble(0, 0, 0, 0); 21 VerifyFirmwarePreamble(0, 0, 0, 0);
20 VerifyFirmwareData(0, 0, 0, 0, 0); 22 VerifyFirmwareData(0, 0, 0, 0, 0);
21 VerifyFirmware(0, 0, 0); 23 VerifyFirmware(0, 0, 0);
22 GetLogicalFirmwareVersion(0); 24 GetLogicalFirmwareVersion(0);
23 VerifyFirmwareDriver_f(0, 0, 0, 0, 0); 25 VerifyFirmwareDriver_f(0, 0, 0, 0, 0);
24 26
25 // kernel_image_fw.h 27 // kernel_image_fw.h
26 VerifyKernelKeyHeader(0, 0, 0, 0, 0, 0); 28 VerifyKernelKeyHeader(0, 0, 0, 0, 0, 0);
27 VerifyKernelPreamble(0, 0, 0, 0); 29 VerifyKernelPreamble(0, 0, 0, 0);
28 VerifyKernelData(0, 0, 0, 0, 0); 30 VerifyKernelData(0, 0, 0, 0, 0);
29 VerifyKernelHeader(0, 0, 0, 0, 0, 0, 0); 31 VerifyKernelHeader(0, 0, 0, 0, 0, 0, 0);
30 VerifyKernel(0, 0, 0); 32 VerifyKernel(0, 0, 0);
31 GetLogicalKernelVersion(0); 33 GetLogicalKernelVersion(0);
32 VerifyKernelDriver_f(0, 0, 0, 0); 34 VerifyKernelDriver_f(0, 0, 0, 0);
33 35
34 // load_kernel_fw.h 36 // load_kernel_fw.h
35 // FIXME: LoadKernel(0); 37 // FIXME: LoadKernel(0);
36 38
37 // rollback_index.h 39 // rollback_index.h
38 SetupTPM(); 40 SetupTPM();
39 GetStoredVersion(0); 41 GetStoredVersions(0, &x, &y);
40 WriteStoredVersion(0, 0); 42 WriteStoredVersions(0, 0, 0);
41 LockFirmwareVersions(); 43 LockFirmwareVersions();
42 LockKernelVersionsByLockingPP(); 44 LockKernelVersionsByLockingPP();
43 45
44 // tlcl.h 46 // tlcl.h
45 TlclLibinit(); 47 TlclLibinit();
46 TlclStartup(); 48 TlclStartup();
47 TlclSelftestfull(); 49 TlclSelftestfull();
48 TlclDefineSpace(0, 0, 0); 50 TlclDefineSpace(0, 0, 0);
49 TlclWrite(0, 0, 0); 51 TlclWrite(0, 0, 0);
50 TlclRead(0, 0, 0); 52 TlclRead(0, 0, 0);
51 TlclWriteLock(0); 53 TlclWriteLock(0);
52 TlclReadLock(0); 54 TlclReadLock(0);
53 TlclAssertPhysicalPresence(); 55 TlclAssertPhysicalPresence();
54 TlclSetNvLocked(); 56 TlclSetNvLocked();
55 TlclIsOwned(); 57 TlclIsOwned();
56 TlclForceClear(); 58 TlclForceClear();
57 TlclSetEnable(); 59 TlclSetEnable();
58 TlclSetDeactivated(0); 60 TlclSetDeactivated(0);
59 TlclGetFlags(0, 0); 61 TlclGetFlags(0, 0);
60 62
61 return 0; 63 return 0;
62 } 64 }
OLDNEW
« no previous file with comments | « src/platform/vboot_reference/vboot_firmware/lib/rollback_index.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698