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

Side by Side Diff: firmware/lib/rollback_index.c

Issue 2810026: Add VBDEBUG macro for debug output. (Closed) Base URL: ssh://gitrw.chromium.org/vboot_reference.git
Patch Set: Created 10 years, 6 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 | « firmware/lib/cryptolib/rsa.c ('k') | firmware/lib/vboot_common.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. 3 * found in the LICENSE file.
4 * 4 *
5 * Functions for querying, manipulating and locking rollback indices 5 * Functions for querying, manipulating and locking rollback indices
6 * stored in the TPM NVRAM. 6 * stored in the TPM NVRAM.
7 */ 7 */
8 8
9 #include "rollback_index.h" 9 #include "rollback_index.h"
10 10
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 } 74 }
75 return result; 75 return result;
76 } 76 }
77 77
78 /* Creates the NVRAM spaces, and sets their initial values as needed. 78 /* Creates the NVRAM spaces, and sets their initial values as needed.
79 */ 79 */
80 static uint32_t InitializeSpaces(void) { 80 static uint32_t InitializeSpaces(void) {
81 uint32_t zero = 0; 81 uint32_t zero = 0;
82 uint32_t firmware_perm = TPM_NV_PER_GLOBALLOCK | TPM_NV_PER_PPWRITE; 82 uint32_t firmware_perm = TPM_NV_PER_GLOBALLOCK | TPM_NV_PER_PPWRITE;
83 83
84 debug("Initializing spaces\n"); 84 VBDEBUG(("Initializing spaces\n"));
85 85
86 RETURN_ON_FAILURE(TlclSetNvLocked()); 86 RETURN_ON_FAILURE(TlclSetNvLocked());
87 87
88 RETURN_ON_FAILURE(TlclDefineSpace(FIRMWARE_VERSIONS_NV_INDEX, 88 RETURN_ON_FAILURE(TlclDefineSpace(FIRMWARE_VERSIONS_NV_INDEX,
89 firmware_perm, sizeof(uint32_t))); 89 firmware_perm, sizeof(uint32_t)));
90 RETURN_ON_FAILURE(SafeWrite(FIRMWARE_VERSIONS_NV_INDEX, 90 RETURN_ON_FAILURE(SafeWrite(FIRMWARE_VERSIONS_NV_INDEX,
91 (uint8_t*) &zero, sizeof(uint32_t))); 91 (uint8_t*) &zero, sizeof(uint32_t)));
92 92
93 RETURN_ON_FAILURE(InitializeKernelVersionsSpaces()); 93 RETURN_ON_FAILURE(InitializeKernelVersionsSpaces());
94 94
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 return TPM_SUCCESS; 394 return TPM_SUCCESS;
395 } 395 }
396 396
397 uint32_t RollbackKernelWrite(uint16_t key_version, uint16_t version) { 397 uint32_t RollbackKernelWrite(uint16_t key_version, uint16_t version) {
398 return TPM_SUCCESS; 398 return TPM_SUCCESS;
399 } 399 }
400 400
401 uint32_t RollbackKernelLock(void) { 401 uint32_t RollbackKernelLock(void) {
402 return TPM_SUCCESS; 402 return TPM_SUCCESS;
403 } 403 }
OLDNEW
« no previous file with comments | « firmware/lib/cryptolib/rsa.c ('k') | firmware/lib/vboot_common.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698