1/*
2 * Copyright (c) 2022, Arm Limited. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 *
6 */
7
8#ifndef __FWU_CONFIG_H__
9#define __FWU_CONFIG_H__
10
11/* This file contains device specific configurations in FWU partition based
12 * on MCUboot.
13 */
14
15/* Components if the device. When porting a specific bootloader to FWU partition,
16 * the bootloader specific image types can be defined here.
17 */
18#define FWU_COMPONENT_NUMBER              @MCUBOOT_IMAGE_NUMBER@
19
20#if FWU_COMPONENT_NUMBER > 1
21#define FWU_COMPONENT_ID_SECURE           0x00U
22#define FWU_COMPONENT_ID_NONSECURE        0x01U
23#else
24#define FWU_COMPONENT_ID_FULL             0x00U
25#endif
26
27/* The maximum size of an image digest in bytes. This is dependent
28 * on the hash algorithm used.
29 */
30#define TFM_FWU_MAX_DIGEST_SIZE              32
31
32/* The maximum permitted size for block in psa_fwu_write(), in bytes. */
33#define TFM_CONFIG_FWU_MAX_WRITE_SIZE   @TFM_CONFIG_FWU_MAX_WRITE_SIZE@
34
35/* The maximum permitted size for manifest in psa_fwu_start(), in bytes. */
36#define TFM_CONFIG_FWU_MAX_MANIFEST_SIZE   @TFM_CONFIG_FWU_MAX_MANIFEST_SIZE@
37
38/* Whether TRIAL component state is supported or not. This is device specific
39 * configuration.
40 */
41#cmakedefine FWU_SUPPORT_TRIAL_STATE
42
43#endif /* __FWU_CONFIG_H__ */
44