mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-24 18:25:10 +00:00
Change-Id: I879c18cc139f8a02bcaa6eb80437eaf836a5e851 BUG=chrome-os-partner:2597 TEST=manual install pvt-signed image flip dev switch on and boot install dev-signed firmware reboot reboot sudo bash stop tcsd tpmc read 0x1008 0x0d bytes 6-10 should be 1 0 1 0, not FF FF FF FF Review URL: http://codereview.chromium.org/6626020
36 lines
1.2 KiB
C
36 lines
1.2 KiB
C
/* Copyright (c) 2010-2011 The Chromium OS Authors. All rights reserved.
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
/* TPM Lightweight Command Library.
|
|
*
|
|
* A low-level library for interfacing to TPM hardware or an emulator.
|
|
*/
|
|
|
|
#ifndef VBOOT_REFERENCE_TLCL_STUB_H_
|
|
#define VBOOT_REFERENCE_TLCL_STUB_H_
|
|
|
|
#include "sysincludes.h"
|
|
#include "tss_constants.h"
|
|
|
|
/*****************************************************************************/
|
|
/* Functions to be implemented by the stub library */
|
|
|
|
/* Initialize the stub library. Returns 0 if success, nonzero if error. */
|
|
uint32_t TlclStubInit(void);
|
|
|
|
/* Close and open the device. This is needed for running more complex commands
|
|
* at user level, such as TPM_TakeOwnership, since the TPM device can be opened
|
|
* only by one process at a time. Returns 0 if success, nonzero if error.
|
|
*/
|
|
uint32_t TlclCloseDevice(void);
|
|
uint32_t TlclOpenDevice(void);
|
|
|
|
/* Send data to the TPM and receive a response. Returns 0 if success,
|
|
* nonzero if error. */
|
|
uint32_t TlclStubSendReceive(const uint8_t* request, int request_length,
|
|
uint8_t* response, int max_length);
|
|
|
|
#endif /* VBOOT_REFERENCE_TLCL_STUB_H_ */
|