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

Side by Side Diff: firmware/lib/include/tss_constants.h

Issue 2857030: Exhaustive test for rollback code (Closed) Base URL: ssh://git@chromiumos-git/vboot_reference.git
Patch Set: Fix write count handling and improve comments. Created 10 years, 5 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/include/rollback_index.h ('k') | firmware/lib/rollback_index.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 * Some TPM constants and type definitions for standalone compilation for use in 5 * Some TPM constants and type definitions for standalone compilation for use in
6 * the firmware 6 * the firmware
7 */ 7 */
8 8
9 /* FIXME(gauravsh): 9 /* FIXME(gauravsh):
10 * NOTE: This file is copied over from 10 * NOTE: This file is copied over from
11 * src/platform/tpm_lite/src/tlcl/tss_constants.h 11 * src/platform/tpm_lite/src/tlcl/tss_constants.h
12 * Ideally, we want to directly include it without having two maintain 12 * Ideally, we want to directly include it without having two maintain
13 * duplicate copies in sync. But in the current model, this is hard 13 * duplicate copies in sync. But in the current model, this is hard
14 * to do without breaking standalone compilation. 14 * to do without breaking standalone compilation.
15 * Eventually tpm_lite should be moved into vboot_reference. 15 * Eventually tpm_lite should be moved into vboot_reference.
16 */ 16 */
17 17
18 #ifndef TPM_LITE_TSS_CONSTANTS_H_ 18 #ifndef TPM_LITE_TSS_CONSTANTS_H_
19 #define TPM_LITE_TSS_CONSTANTS_H_ 19 #define TPM_LITE_TSS_CONSTANTS_H_
20 20
21 #include "sysincludes.h" 21 #include "sysincludes.h"
22 22
23 #define TPM_MAX_COMMAND_SIZE 4096 23 #define TPM_MAX_COMMAND_SIZE 4096
24 #define TPM_LARGE_ENOUGH_COMMAND_SIZE 256 /* saves space in the firmware */ 24 #define TPM_LARGE_ENOUGH_COMMAND_SIZE 256 /* saves space in the firmware */
25 25
26 #define TPM_SUCCESS ((uint32_t)0x00000000) 26 #define TPM_SUCCESS ((uint32_t)0x00000000)
27 #define TPM_E_BADINDEX ((uint32_t)0x00000002) 27 #define TPM_E_BADINDEX ((uint32_t)0x00000002)
28 #define TPM_E_MAXNVWRITES ((uint32_t)0x00000048) 28 #define TPM_E_MAXNVWRITES ((uint32_t)0x00000048)
29 #define TPM_E_ALREADY_INITIALIZED ((uint32_t)0x00005000) /* vboot local */ 29 #define TPM_E_OWNER_SET ((uint32_t)0x00000014)
30
31 #define TPM_E_ALREADY_INITIALIZED ((uint32_t)0x00005000) /* vboot local */
30 #define TPM_E_INTERNAL_INCONSISTENCY ((uint32_t)0x00005001) /* vboot local */ 32 #define TPM_E_INTERNAL_INCONSISTENCY ((uint32_t)0x00005001) /* vboot local */
31 #define TPM_E_MUST_REBOOT ((uint32_t)0x00005002) /* vboot local */ 33 #define TPM_E_MUST_REBOOT ((uint32_t)0x00005002) /* vboot local */
32 #define TPM_E_CORRUPTED_STATE ((uint32_t)0x00005003) /* vboot local */ 34 #define TPM_E_CORRUPTED_STATE ((uint32_t)0x00005003) /* vboot local */
33 35
34 #define TPM_NV_INDEX0 ((uint32_t)0x00000000) 36 #define TPM_NV_INDEX0 ((uint32_t)0x00000000)
35 #define TPM_NV_INDEX_LOCK ((uint32_t)0xffffffff) 37 #define TPM_NV_INDEX_LOCK ((uint32_t)0xffffffff)
36 #define TPM_NV_PER_WRITE_STCLEAR (((uint32_t)1)<<14) 38 #define TPM_NV_PER_WRITE_STCLEAR (((uint32_t)1)<<14)
37 #define TPM_NV_PER_PPWRITE (((uint32_t)1)<<0) 39 #define TPM_NV_PER_PPWRITE (((uint32_t)1)<<0)
38 #define TPM_NV_PER_GLOBALLOCK (((uint32_t)1)<<15) 40 #define TPM_NV_PER_GLOBALLOCK (((uint32_t)1)<<15)
39 41
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 TSS_BOOL disableFullDALogicInfo; 73 TSS_BOOL disableFullDALogicInfo;
72 } TPM_PERMANENT_FLAGS; 74 } TPM_PERMANENT_FLAGS;
73 75
74 #define TPM_ALL_LOCALITIES (TPM_LOC_ZERO | TPM_LOC_ONE | TPM_LOC_TWO \ 76 #define TPM_ALL_LOCALITIES (TPM_LOC_ZERO | TPM_LOC_ONE | TPM_LOC_TWO \
75 | TPM_LOC_THREE | TPM_LOC_FOUR) /* 0x1f */ 77 | TPM_LOC_THREE | TPM_LOC_FOUR) /* 0x1f */
76 78
77 #define TPM_ENCAUTH_SIZE 20 79 #define TPM_ENCAUTH_SIZE 20
78 #define TPM_PUBEK_SIZE 256 80 #define TPM_PUBEK_SIZE 256
79 81
80 #endif /* TPM_LITE_TSS_CONSTANTS_H_ */ 82 #endif /* TPM_LITE_TSS_CONSTANTS_H_ */
OLDNEW
« no previous file with comments | « firmware/lib/include/rollback_index.h ('k') | firmware/lib/rollback_index.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698