OLD | NEW |
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 |
11 #include <stdint.h> | |
12 | |
13 #include "utility.h" | |
14 #include "tlcl.h" | 11 #include "tlcl.h" |
15 #include "tss_constants.h" | 12 #include "tss_constants.h" |
| 13 #include "utility.h" |
16 | 14 |
17 uint16_t g_firmware_key_version = 0; | 15 uint16_t g_firmware_key_version = 0; |
18 uint16_t g_firmware_version = 0; | 16 uint16_t g_firmware_version = 0; |
19 uint16_t g_kernel_key_version = 0; | 17 uint16_t g_kernel_key_version = 0; |
20 uint16_t g_kernel_version = 0; | 18 uint16_t g_kernel_version = 0; |
21 | 19 |
22 #define RETURN_ON_FAILURE(tpm_command) do { \ | 20 #define RETURN_ON_FAILURE(tpm_command) do { \ |
23 uint32_t result; \ | 21 uint32_t result; \ |
24 if ((result = (tpm_command)) != TPM_SUCCESS) { \ | 22 if ((result = (tpm_command)) != TPM_SUCCESS) { \ |
25 return result; \ | 23 return result; \ |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 return TPM_SUCCESS; | 353 return TPM_SUCCESS; |
356 } | 354 } |
357 | 355 |
358 uint32_t LockFirmwareVersions() { | 356 uint32_t LockFirmwareVersions() { |
359 return TlclSetGlobalLock(); | 357 return TlclSetGlobalLock(); |
360 } | 358 } |
361 | 359 |
362 uint32_t LockKernelVersionsByLockingPP() { | 360 uint32_t LockKernelVersionsByLockingPP() { |
363 return TlclLockPhysicalPresence(); | 361 return TlclLockPhysicalPresence(); |
364 } | 362 } |
OLD | NEW |