blob: 1e3eca65bf7fe82bbd8c2b4a38d1395db301ee57 [file] [log] [blame]
Sherry Zhang73126e52022-02-15 14:27:49 +08001/*
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
Sherry Zhang71468952022-10-19 14:09:05 +080011/* 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 */
Xinyu Zhang23c06d42022-12-13 19:01:55 +080018#define FWU_COMPONENT_NUMBER @MCUBOOT_IMAGE_NUMBER@
19
20#if FWU_COMPONENT_NUMBER > 1
Sherry Zhang71468952022-10-19 14:09:05 +080021#define FWU_COMPONENT_ID_SECURE 0x00U
22#define FWU_COMPONENT_ID_NONSECURE 0x01U
23#else
24#define FWU_COMPONENT_ID_FULL 0x00U
25#endif
Sherry Zhang71468952022-10-19 14:09:05 +080026
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
Sherry Zhang73126e52022-02-15 14:27:49 +080042
43#endif /* __FWU_CONFIG_H__ */