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> | 11 #include <stdint.h> |
12 #include <tss/tcs.h> | |
13 | 12 |
14 #include "utility.h" | 13 #include "utility.h" |
15 #include "tlcl.h" | 14 #include "tlcl.h" |
| 15 #include "tss_constants.h" |
16 | 16 |
17 uint16_t g_firmware_key_version = 0; | 17 uint16_t g_firmware_key_version = 0; |
18 uint16_t g_firmware_version = 0; | 18 uint16_t g_firmware_version = 0; |
19 uint16_t g_kernel_key_version = 0; | 19 uint16_t g_kernel_key_version = 0; |
20 uint16_t g_kernel_version = 0; | 20 uint16_t g_kernel_version = 0; |
21 | 21 |
22 static void InitializeSpaces(void) { | 22 static void InitializeSpaces(void) { |
23 uint16_t zero = 0; | 23 uint16_t zero = 0; |
24 uint32_t perm = TPM_NV_PER_WRITE_STCLEAR | TPM_NV_PER_PPWRITE; | 24 uint32_t perm = TPM_NV_PER_WRITE_STCLEAR | TPM_NV_PER_PPWRITE; |
25 | 25 |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 TlclWriteLock(FIRMWARE_VERSION_NV_INDEX); | 140 TlclWriteLock(FIRMWARE_VERSION_NV_INDEX); |
141 break; | 141 break; |
142 case KERNEL_KEY_VERSION: | 142 case KERNEL_KEY_VERSION: |
143 TlclWriteLock(KERNEL_KEY_VERSION_NV_INDEX); | 143 TlclWriteLock(KERNEL_KEY_VERSION_NV_INDEX); |
144 break; | 144 break; |
145 case KERNEL_VERSION: | 145 case KERNEL_VERSION: |
146 TlclWriteLock(KERNEL_VERSION_NV_INDEX); | 146 TlclWriteLock(KERNEL_VERSION_NV_INDEX); |
147 break; | 147 break; |
148 } | 148 } |
149 } | 149 } |
OLD | NEW |