diff options
author | Daniele Castro <daniele.castro@arm.com> | 2022-11-24 12:06:13 +0000 |
---|---|---|
committer | Joanna Farley <joanna.farley@arm.com> | 2023-04-04 11:36:20 +0200 |
commit | c91b08c8a44aafac4f72c64aa8d4777b8c73647e (patch) | |
tree | 4d1d5b37af7645742afca81584c4ca4326901fb8 /plat/arm | |
parent | 70a296ee8641802dc60754aec5b18d8347820a5c (diff) | |
download | arm-trusted-firmware-c91b08c8a44aafac4f72c64aa8d4777b8c73647e.tar.gz |
feat(ethos-n): add NPU support in fiptool
Add platform specific Makefile to add UUIDs and command options
for the Arm(R) Ethos(TM)-N NPU firmware binary and certificate
data to the FIP so that the TF-A's BL2 can later be used to load
the Arm(R) Ethos(TM)-N NPU firmware binary into memory and verify
its integrity.
Add separate driver specific include header file for the
Arm(R) Ethos(TM)-N NPU images containing UUIDs and command options
to make it easy to port the FIP support to other platforms.
Signed-off-by: Daniele Castro <daniele.castro@arm.com>
Signed-off-by: Rob Hughes <robert.hughes@arm.com>
Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
Change-Id: I8cd64fb20d58f8bd539facb085606213d6cead05
Diffstat (limited to 'plat/arm')
-rw-r--r-- | plat/arm/board/juno/fip/plat_def_fip_uuid.h | 14 | ||||
-rw-r--r-- | plat/arm/board/juno/fip/plat_def_uuid_config.c | 25 | ||||
-rw-r--r-- | plat/arm/board/juno/plat_fiptool.mk | 16 |
3 files changed, 55 insertions, 0 deletions
diff --git a/plat/arm/board/juno/fip/plat_def_fip_uuid.h b/plat/arm/board/juno/fip/plat_def_fip_uuid.h new file mode 100644 index 000000000..0f0d11d41 --- /dev/null +++ b/plat/arm/board/juno/fip/plat_def_fip_uuid.h @@ -0,0 +1,14 @@ +/* + * Copyright (c) 2023, Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef PLAT_DEF_FIP_UUID_H +#define PLAT_DEF_FIP_UUID_H + +#ifdef ARM_ETHOSN_NPU_TZMP1 +#include <drivers/arm/ethosn_fip.h> +#endif + +#endif /* PLAT_DEF_FIP_UUID_H */ diff --git a/plat/arm/board/juno/fip/plat_def_uuid_config.c b/plat/arm/board/juno/fip/plat_def_uuid_config.c new file mode 100644 index 000000000..813392740 --- /dev/null +++ b/plat/arm/board/juno/fip/plat_def_uuid_config.c @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2023, Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include <stddef.h> + +#include <firmware_image_package.h> +#include <tbbr_config.h> + +#include "plat_def_fip_uuid.h" + +toc_entry_t plat_def_toc_entries[] = { +#ifdef ARM_ETHOSN_NPU_TZMP1 + ETHOSN_FW_KEY_CERTIFICATE_DEF, + ETHOSN_FW_CONTENT_CERTIFICATE_DEF, + ETHOSN_FW_DEF, +#endif + { + .name = NULL, + .uuid = { { 0 } }, + .cmdline_name = NULL, + } +}; diff --git a/plat/arm/board/juno/plat_fiptool.mk b/plat/arm/board/juno/plat_fiptool.mk new file mode 100644 index 000000000..46b517901 --- /dev/null +++ b/plat/arm/board/juno/plat_fiptool.mk @@ -0,0 +1,16 @@ +# +# Copyright (c) 2023, Arm Limited. All rights reserved. +# +# SPDX-License-Identifier: BSD-3-Clause +# + +PLAT_DEF_UUID := yes + +ifeq (${PLAT_DEF_UUID}, yes) +HOSTCCFLAGS += -DPLAT_DEF_FIP_UUID +ifeq (${ARM_ETHOSN_NPU_TZMP1},1) +HOSTCCFLAGS += -DARM_ETHOSN_NPU_TZMP1 +endif +INCLUDE_PATHS += -I./ -I${PLAT_DIR}fip -I../../include/ +OBJECTS += ${PLAT_DIR}fip/plat_def_uuid_config.o +endif |