blob: f2c43f7a4ea755398a140073fbe5c69a23eb7048 [file] [log] [blame]
Maulik Pateld3142702022-06-22 10:09:13 +01001/*
2 * Copyright (c) 2022, Arm Limited. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 *
6 */
7
8#ifndef __MEASURED_BOOT_UTILS_H__
9#define __MEASURED_BOOT_UTILS_H__
10
11#include <stddef.h>
12#include <stdint.h>
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
18/**
19 * \brief Logs all the measurement parameters used to extend the requested slot.
20 *
21 * \param[in] index Slot number in which measurement is
22 * to be stored.
23 * \param[in] signer_id Pointer to \p signer_id buffer.
24 * \param[in] signer_id_size Size of the \p signer_id buffer in
25 * bytes.
26 * \param[in] version Pointer to \p version buffer.
27 * \param[in] version_size Size of the \p version buffer in bytes.
28 * \param[in] measurement_algo Algorithm identifier used for
29 * measurement.
30 * \param[in] sw_type Pointer to \p sw_type buffer.
31 * \param[in] sw_type_size Size of the \p sw_type buffer in bytes.
32 * \param[in] measurement_value Pointer to \p measurement_value buffer.
33 * \param[in] measurement_value_size Size of the \p measurement_value
34 * buffer in bytes.
35 * \param[in] lock_measurement Flag requesting whether the
36 * measurement is to be locked.
37 */
38void log_extend_measurement(uint8_t index,
39 const uint8_t *signer_id,
40 size_t signer_id_size,
41 const uint8_t *version,
42 uint8_t version_size,
43 uint32_t measurement_algo,
44 const uint8_t *sw_type,
45 uint8_t sw_type_size,
46 const uint8_t *measurement_value,
47 size_t measurement_value_size,
48 uint8_t lock_measurement);
49
50#ifdef __cplusplus
51}
52#endif
53
54#endif /* __MEASURED_BOOT_UTILS_H__ */