1a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr// Copyright 2015 The Chromium OS Authors. All rights reserved.
2a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr// Use of this source code is governed by a BSD-style license that can be
3a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr// found in the LICENSE file.
4fa4eec387bbb3ca367ae9eb7a35e0e79f9307390Vadim Bendebury
5a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr// THIS CODE IS GENERATED - DO NOT MODIFY!
6a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr
7776e23689ddfb58cf6d6a111a3741a308e3fe60fVadim Bendebury#ifndef TPM2_POLICYCPHASH_FP_H_
8776e23689ddfb58cf6d6a111a3741a308e3fe60fVadim Bendebury#define TPM2_POLICYCPHASH_FP_H_
9a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr
10a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr#include "tpm_generated.h"
11fa4eec387bbb3ca367ae9eb7a35e0e79f9307390Vadim Bendebury
12fa4eec387bbb3ca367ae9eb7a35e0e79f9307390Vadim Bendeburytypedef struct {
13a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr  TPMI_SH_POLICY policySession;
14f788ffb5e5b4493cb4c1deaa12a97c80c2694b01Vadim Bendebury  TPM2B_DIGEST cpHashA;
15fa4eec387bbb3ca367ae9eb7a35e0e79f9307390Vadim Bendebury} PolicyCpHash_In;
16fa4eec387bbb3ca367ae9eb7a35e0e79f9307390Vadim Bendebury
17a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr// Executes PolicyCpHash with request handles and parameters from |in|.
18a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn BohrTPM_RC TPM2_PolicyCpHash(PolicyCpHash_In* in);
19a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr
20776e23689ddfb58cf6d6a111a3741a308e3fe60fVadim Bendebury// Initializes handle fields in |target| from |request_handles|. Unmarshals
21a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr// parameter fields in |target| from |buffer|.
22a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn BohrTPM_RC PolicyCpHash_In_Unmarshal(PolicyCpHash_In* target,
23776e23689ddfb58cf6d6a111a3741a308e3fe60fVadim Bendebury                                 TPM_HANDLE request_handles[],
24a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr                                 BYTE** buffer,
25a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr                                 INT32* size);
26a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr
27776e23689ddfb58cf6d6a111a3741a308e3fe60fVadim Bendebury// Unmarshals any request parameters starting at |request_parameter_buffer|.
28a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr// Executes command. Marshals any response handles and parameters to the
29776e23689ddfb58cf6d6a111a3741a308e3fe60fVadim Bendebury// global response buffer and computes |*response_handle_buffer_size| and
30776e23689ddfb58cf6d6a111a3741a308e3fe60fVadim Bendebury// |*response_parameter_buffer_size|. If |tag| == TPM_ST_SESSIONS, marshals
31a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr// parameter_size indicating the size of the parameter area. parameter_size
32a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr// field is located between the handle area and parameter area.
33a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn BohrTPM_RC Exec_PolicyCpHash(TPMI_ST_COMMAND_TAG tag,
34776e23689ddfb58cf6d6a111a3741a308e3fe60fVadim Bendebury                         BYTE** request_parameter_buffer,
35776e23689ddfb58cf6d6a111a3741a308e3fe60fVadim Bendebury                         INT32* request_parameter_buffer_size,
36776e23689ddfb58cf6d6a111a3741a308e3fe60fVadim Bendebury                         TPM_HANDLE request_handles[],
37776e23689ddfb58cf6d6a111a3741a308e3fe60fVadim Bendebury                         UINT32* response_handle_buffer_size,
38776e23689ddfb58cf6d6a111a3741a308e3fe60fVadim Bendebury                         UINT32* response_parameter_buffer_size);
39fa4eec387bbb3ca367ae9eb7a35e0e79f9307390Vadim Bendebury
40a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr#endif  // TPM2_POLICYCPHASH_FP_H
41