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

Side by Side Diff: firmware/lib/tpm_lite/tlcl.c

Issue 3232006: Add resume command (TPM_Startup(ST_STATE)) (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/vboot_reference.git
Patch Set: Created 10 years, 3 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 | « firmware/lib/tpm_lite/include/tlcl_structures.h ('k') | firmware/version.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 5
6 /* A lightweight TPM command library. 6 /* A lightweight TPM command library.
7 * 7 *
8 * The general idea is that TPM commands are array of bytes whose 8 * The general idea is that TPM commands are array of bytes whose
9 * fields are mostly compile-time constant. The goal is to build much 9 * fields are mostly compile-time constant. The goal is to build much
10 * of the commands at compile time (or build time) and change some of 10 * of the commands at compile time (or build time) and change some of
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 void TlclLibInit(void) { 95 void TlclLibInit(void) {
96 TlclStubInit(); 96 TlclStubInit();
97 } 97 }
98 98
99 uint32_t TlclStartup(void) { 99 uint32_t TlclStartup(void) {
100 VBDEBUG(("TPM: Startup\n")); 100 VBDEBUG(("TPM: Startup\n"));
101 return Send(tpm_startup_cmd.buffer); 101 return Send(tpm_startup_cmd.buffer);
102 } 102 }
103 103
104 uint32_t TlclResume(void) {
105 VBDEBUG(("TPM: Resume\n"));
106 return Send(tpm_resume_cmd.buffer);
107 }
108
104 uint32_t TlclSelfTestFull(void) { 109 uint32_t TlclSelfTestFull(void) {
105 VBDEBUG(("TPM: Self test full\n")); 110 VBDEBUG(("TPM: Self test full\n"));
106 return Send(tpm_selftestfull_cmd.buffer); 111 return Send(tpm_selftestfull_cmd.buffer);
107 } 112 }
108 113
109 uint32_t TlclContinueSelfTest(void) { 114 uint32_t TlclContinueSelfTest(void) {
110 VBDEBUG(("TPM: Continue self test\n")); 115 VBDEBUG(("TPM: Continue self test\n"));
111 return Send(tpm_continueselftest_cmd.buffer); 116 return Send(tpm_continueselftest_cmd.buffer);
112 } 117 }
113 118
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 Memcpy(&cmd, &tpm_getpermissions_cmd, sizeof(cmd)); 319 Memcpy(&cmd, &tpm_getpermissions_cmd, sizeof(cmd));
315 ToTpmUint32(cmd.buffer + tpm_getpermissions_cmd.index, index); 320 ToTpmUint32(cmd.buffer + tpm_getpermissions_cmd.index, index);
316 result = TlclSendReceive(cmd.buffer, response, sizeof(response)); 321 result = TlclSendReceive(cmd.buffer, response, sizeof(response));
317 if (result != TPM_SUCCESS) 322 if (result != TPM_SUCCESS)
318 return result; 323 return result;
319 324
320 nvdata = response + kTpmResponseHeaderLength + sizeof(size); 325 nvdata = response + kTpmResponseHeaderLength + sizeof(size);
321 FromTpmUint32(nvdata + kNvDataPublicPermissionsOffset, permissions); 326 FromTpmUint32(nvdata + kNvDataPublicPermissionsOffset, permissions);
322 return result; 327 return result;
323 } 328 }
OLDNEW
« no previous file with comments | « firmware/lib/tpm_lite/include/tlcl_structures.h ('k') | firmware/version.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698