OLD | NEW |
(Empty) | |
| 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 |
| 3 * found in the LICENSE file. |
| 4 */ |
| 5 |
| 6 /* TPM Lightweight Command Library. |
| 7 * |
| 8 * A low-level library for interfacing to TPM hardware or an emulator. |
| 9 */ |
| 10 |
| 11 #ifndef VBOOT_REFERENCE_TLCL_STUB_H_ |
| 12 #define VBOOT_REFERENCE_TLCL_STUB_H_ |
| 13 |
| 14 #include "sysincludes.h" |
| 15 #include "tss_constants.h" |
| 16 |
| 17 /*****************************************************************************/ |
| 18 /* Functions to be implemented by the stub library */ |
| 19 |
| 20 /* Initialize the stub library */ |
| 21 void TlclStubInit(void); |
| 22 |
| 23 /* Close and open the device. This is needed for running more complex commands |
| 24 * at user level, such as TPM_TakeOwnership, since the TPM device can be opened |
| 25 * only by one process at a time. |
| 26 */ |
| 27 void TlclCloseDevice(void); |
| 28 void TlclOpenDevice(void); |
| 29 |
| 30 /* Send data to the TPM and receive a response. Returns 0 if success, |
| 31 * nonzero if error. */ |
| 32 uint32_t TlclStubSendReceive(const uint8_t* request, int request_length, |
| 33 uint8_t* response, int max_length); |
| 34 |
| 35 #endif /* VBOOT_REFERENCE_TLCL_STUB_H_ */ |
OLD | NEW |