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

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

Issue 6676039: Fix compiler errors on MSVC (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/vboot_reference.git@master
Patch Set: ...and fix gcc again Created 9 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | firmware/lib/tpm_bootmode.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-2011 The Chromium OS Authors. All rights reserved. 1 /* Copyright (c) 2010-2011 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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 return WriteSpaceFirmware(&rsf); 347 return WriteSpaceFirmware(&rsf);
348 } 348 }
349 349
350 uint32_t RollbackFirmwareLock(void) { 350 uint32_t RollbackFirmwareLock(void) {
351 return TlclSetGlobalLock(); 351 return TlclSetGlobalLock();
352 } 352 }
353 353
354 uint32_t RollbackKernelRecovery(int developer_mode) { 354 uint32_t RollbackKernelRecovery(int developer_mode) {
355 uint32_t rvs, rve; 355 uint32_t rvs, rve;
356 RollbackSpaceFirmware rsf; 356 RollbackSpaceFirmware rsf;
357 uint8_t out_digest[20]; /* For PCR extend output */
358 357
359 /* In recovery mode we ignore TPM malfunctions or corruptions, and * 358 /* In recovery mode we ignore TPM malfunctions or corruptions, and *
360 * leave the TPM complelely unlocked; we call neither 359 * leave the TPM complelely unlocked; we call neither
361 * TlclSetGlobalLock() nor TlclLockPhysicalPresence(). The recovery 360 * TlclSetGlobalLock() nor TlclLockPhysicalPresence(). The recovery
362 * kernel will fix the TPM (if needed) and lock it ASAP. We leave 361 * kernel will fix the TPM (if needed) and lock it ASAP. We leave
363 * Physical Presence on in either case. */ 362 * Physical Presence on in either case. */
364 rvs = SetupTPM(1, developer_mode, &rsf); 363 rvs = SetupTPM(1, developer_mode, &rsf);
365 rve = SetTPMBootModeState(developer_mode, 364 rve = SetTPMBootModeState(developer_mode,
366 1, /* Recovery Mode Status. */ 365 1, /* Recovery Mode Status. */
367 0); /* In recovery mode, there is no RW firmware 366 0); /* In recovery mode, there is no RW firmware
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 407
409 uint32_t RollbackKernelLock(void) { 408 uint32_t RollbackKernelLock(void) {
410 if (g_rollback_recovery_mode) { 409 if (g_rollback_recovery_mode) {
411 return TPM_SUCCESS; 410 return TPM_SUCCESS;
412 } else { 411 } else {
413 return TlclLockPhysicalPresence(); 412 return TlclLockPhysicalPresence();
414 } 413 }
415 } 414 }
416 415
417 #endif // DISABLE_ROLLBACK_TPM 416 #endif // DISABLE_ROLLBACK_TPM
OLDNEW
« no previous file with comments | « no previous file | firmware/lib/tpm_bootmode.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698