2 * This file is part of the coreboot project.
4 * Copyright 2011 Google Inc.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
29 * Initialize the TPM device. Returns 0 on success or -1 on
30 * failure (in case device probing did not succeed).
37 * Requests access to locality 0 for the caller. After all commands have been
38 * completed the caller is supposed to call tis_close().
40 * Returns 0 on success, -1 on failure.
47 * terminate the currect session with the TPM by releasing the locked
48 * locality. Returns 0 on success of -1 on failure (in case lock
49 * removal did not succeed).
56 * Send the requested data to the TPM and then try to get its response
58 * @sendbuf - buffer of the data to send
59 * @send_size size of the data to send
60 * @recvbuf - memory to save the response to
61 * @recv_len - pointer to the size of the response buffer
63 * Returns 0 on success (and places the number of response bytes at recv_len)
66 int tis_sendrecv(const u8
*sendbuf
, size_t send_size
, u8
*recvbuf
,
69 void init_tpm(int s3resume
);