blob: 6ca985b3f2c6eaa9230accf8486683290dba4233 [file] [log] [blame]
Tamas Ban48a0eb52018-08-17 12:48:05 +01001/*
Tamas Ban2318feb2019-01-02 16:50:51 +00002 * Copyright (c) 2018-2019, Arm Limited. All rights reserved.
Tamas Ban48a0eb52018-08-17 12:48:05 +01003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 *
6 */
7
8#ifndef __ATTESTATION_H__
9#define __ATTESTATION_H__
10
11#include "psa_initial_attestation_api.h"
12#include "psa_client.h"
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
18/* Extension of shared data TLVs defined in bl2/include/tfm_boot_status.h */
Tamas Bane2acf5f2019-01-02 18:59:41 +000019#define TLV_MINOR_IAS_BOOT_SEED 0x0f
20#define TLV_MINOR_IAS_INSTANCE_ID 0x10
21#define TLV_MINOR_IAS_CHALLENGE 0x11
22#define TLV_MINOR_IAS_CALLER_ID 0x12
23#define TLV_MINOR_IAS_IMPLEMENTATION_ID 0x13
Tamas Banf2b8ee52019-01-02 21:56:18 +000024#define TLV_MINOR_IAS_HW_VERSION 0x14
Tamas Ban48a0eb52018-08-17 12:48:05 +010025
26/*!
27 * \brief Initialise the initial attestation service during the TF-M boot up
28 * process.
29 *
30 * \return Returns PSA_ATTEST_ERR_SUCCESS if init has been completed,
31 * otherwise error as specified in \ref psa_attest_err_t
32 */
33enum psa_attest_err_t attest_init(void);
34
35/*!
36 * \brief Get initial attestation token
37 *
38 * \param[in] in_vec Pointer to in_vec array, which contains input data
39 * to attestation service
40 * \param[in] num_invec Number of elements in in_vec array
41 * \param[in/out] out_vec Pointer out_vec array, which contains output data
42 * to attestation service
43 * \param[in] num_outvec Number of elements in out_vec array
44 *
45 * \return Returns error code as specified in \ref psa_attest_err_t
46 */
47enum psa_attest_err_t
48initial_attest_get_token(const psa_invec *in_vec, uint32_t num_invec,
49 psa_outvec *out_vec, uint32_t num_outvec);
50
51
52#ifdef __cplusplus
53}
54#endif
55
56#endif /* __ATTESTATION_H__ */