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

Side by Side Diff: src/platform/tpm_lite/src/tlcl/tlcl_internal.h

Issue 847005: Bug fixes and timing code. This is the first fully functional code, (Closed)
Patch Set: Created 10 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
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 5
6 #ifndef TPM_LITE_TLCL_INTERNAL_H_ 6 #ifndef TPM_LITE_TLCL_INTERNAL_H_
7 #define TPM_LITE_TLCL_INTERNAL_H_ 7 #define TPM_LITE_TLCL_INTERNAL_H_
8 8
9 #include <stdint.h> 9 #include <stdint.h>
10 #include <stdio.h>
11 #include <stdlib.h>
12 10
13 typedef int bool; 11 typedef int bool;
14 const bool true = 1; 12 const bool true = 1;
15 const bool false = 0; 13 const bool false = 0;
16 14
17 /* 15 /*
18 * Conversion functions. ToTpmTYPE puts a value of type TYPE into a TPM 16 * Conversion functions. ToTpmTYPE puts a value of type TYPE into a TPM
19 * command buffer. FromTpmTYPE gets a value of type TYPE from a TPM command 17 * command buffer. FromTpmTYPE gets a value of type TYPE from a TPM command
20 * buffer into a variable. 18 * buffer into a variable.
21 */ 19 */
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 POSSIBLY_UNUSED 51 POSSIBLY_UNUSED
54 static INLINE void FromTpmUint16(const uint8_t *buffer, uint16_t *x) { 52 static INLINE void FromTpmUint16(const uint8_t *buffer, uint16_t *x) {
55 *x = (buffer[0] << 8) | buffer[1]; 53 *x = (buffer[0] << 8) | buffer[1];
56 } 54 }
57 55
58 /* 56 /*
59 * These numbers derive from adding the sizes of command fields as shown in the 57 * These numbers derive from adding the sizes of command fields as shown in the
60 * TPM commands manual. 58 * TPM commands manual.
61 */ 59 */
62 const int kTpmRequestHeaderLength = 10; 60 const int kTpmRequestHeaderLength = 10;
63 const int kTpmResponseHeaderLength = 14; 61 const int kTpmResponseHeaderLength = 10;
64 const int kTpmReadInfoLength = 12; 62 const int kTpmReadInfoLength = 12;
65 const int kEncAuthLength = 20; 63 const int kEncAuthLength = 20;
66 64
67 #endif 65 #endif
OLDNEW
« src/platform/tpm_lite/src/tlcl/tlcl.c ('K') | « src/platform/tpm_lite/src/tlcl/tlcl.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698