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

Side by Side Diff: lib/chromeos/tlcl_stub.c

Issue 6771044: Fill in a successful response when no hardware TPM. (Closed) Base URL: http://git.chromium.org/git/u-boot-next.git@chromeos-v2010.09
Patch Set: Created 9 years, 8 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2011 The Chromium OS Authors. All rights reserved. 2 * Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 * 5 *
6 * Alternatively, this software may be distributed under the terms of the 6 * Alternatively, this software may be distributed under the terms of the
7 * GNU General Public License ("GPL") version 2 as published by the Free 7 * GNU General Public License ("GPL") version 2 as published by the Free
8 * Software Foundation. 8 * Software Foundation.
9 */ 9 */
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 uint32_t TlclStubSendReceive(const uint8_t* request, int request_length, 52 uint32_t TlclStubSendReceive(const uint8_t* request, int request_length,
53 uint8_t* response, int max_length) 53 uint8_t* response, int max_length)
54 { 54 {
55 #ifdef CONFIG_HARDWARE_TPM 55 #ifdef CONFIG_HARDWARE_TPM
56 int ret; 56 int ret;
57 size_t recv_len = (size_t) max_length; 57 size_t recv_len = (size_t) max_length;
58 ret= tis_sendrecv(request, request_length, response, &recv_len); 58 ret= tis_sendrecv(request, request_length, response, &recv_len);
59 if (ret) 59 if (ret)
60 return TPM_E_IOERROR; 60 return TPM_E_IOERROR;
61 #else
62 /* Make a successful response */
63 uint8_t successful_response[10] =
64 {0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x0};
65 memcpy(response, successful_response, 10);
61 #endif 66 #endif
62 return TPM_SUCCESS; 67 return TPM_SUCCESS;
63 } 68 }
64 69
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698