blob: 8f2f5b8daada73a07c1d4930d3e50dd608dd950b [file] [log] [blame]
Jamie Foxe7f8b4e2023-05-30 18:03:20 +01001/*
2 * Copyright (c) 2023, Arm Limited. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 *
6 */
7
8#ifndef __DPE_LOG_H__
9#define __DPE_LOG_H__
10
11#include "dice_protection_environment.h"
12#include "tfm_sp_log.h"
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
18#if (TFM_PARTITION_LOG_LEVEL >= TFM_PARTITION_LOG_LEVEL_DEBUG)
19
20/**
Maulik Patelad2f3db2023-05-17 15:41:36 +010021 * \brief Log the derive rot context command parameters.
22 */
23void log_derive_rot_context(const DiceInputValues *dice_inputs);
24
25/**
Jamie Foxe7f8b4e2023-05-30 18:03:20 +010026 * \brief Log the derive child command parameters.
27 */
28void log_derive_child(int context_handle,
29 bool retain_parent_context,
30 bool allow_child_to_derive,
31 bool create_certificate,
Maulik Patelad2f3db2023-05-17 15:41:36 +010032 const DiceInputValues *dice_inputs,
33 int32_t client_id);
Jamie Foxe7f8b4e2023-05-30 18:03:20 +010034
35/**
Maulik Patel54d65f72023-06-28 13:04:36 +010036 * \brief Log the destroy context command parameters.
37 */
38void log_destroy_context(int context_handle,
39 bool destroy_recursively);
40
41/**
Jamie Foxe7f8b4e2023-05-30 18:03:20 +010042 * \brief Log the certify key command parameters.
43 */
44void log_certify_key(int context_handle,
45 bool retain_context,
46 const uint8_t *public_key,
47 size_t public_key_size,
48 const uint8_t *label,
49 size_t label_size);
50
51#else /* TFM_PARTITION_LOG_LEVEL */
52
Maulik Patelad2f3db2023-05-17 15:41:36 +010053#define log_derive_rot_context(...)
Jamie Foxe7f8b4e2023-05-30 18:03:20 +010054#define log_derive_child(...)
Maulik Patel54d65f72023-06-28 13:04:36 +010055#define log_destroy_context(...)
Jamie Foxe7f8b4e2023-05-30 18:03:20 +010056#define log_certify_key(...)
57
58#endif /* TFM_PARTITION_LOG_LEVEL */
59
60#ifdef __cplusplus
61}
62#endif
63
64#endif /* __DPE_LOG_H__ */