From 6ef63af65f55e9402e4cdc534928faceb9c6e003 Mon Sep 17 00:00:00 2001 From: Raef Coles Date: Wed, 14 Dec 2022 15:02:16 +0000 Subject: [PATCH] feat(rss): add TC platform UUIDs for RSS images Add platform fiptool and UUIDs to the TC platform, to allow RSS images to be inserted into and used from FIPs Change-Id: Ic8e11bd4a766bdc616af7dee60d44fc5d1f6e7b6 Signed-off-by: Raef Coles --- plat/arm/board/tc/plat_def_fip_uuid.h | 37 ++++++++++++++ plat/arm/board/tc/plat_def_uuid_config.c | 61 ++++++++++++++++++++++++ plat/arm/board/tc/plat_fiptool.mk | 33 +++++++++++++ plat/arm/board/tc/platform.mk | 3 ++ 4 files changed, 134 insertions(+) create mode 100644 plat/arm/board/tc/plat_def_fip_uuid.h create mode 100644 plat/arm/board/tc/plat_def_uuid_config.c create mode 100644 plat/arm/board/tc/plat_fiptool.mk diff --git a/plat/arm/board/tc/plat_def_fip_uuid.h b/plat/arm/board/tc/plat_def_fip_uuid.h new file mode 100644 index 000000000..631f7c952 --- /dev/null +++ b/plat/arm/board/tc/plat_def_fip_uuid.h @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2022, Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + * + */ + +#ifndef __PLAT_DEF_FIP_UUID__ +#define __PLAT_DEF_FIP_UUID__ + +#include "uuid.h" + +#define UUID_RSS_FIRMWARE_BL1_2 \ + {{0x0a, 0xa5, 0xb1, 0xbe}, {0xe7, 0x84}, {0x41, 0xc5}, 0x81, 0xb8, {0x4a, 0x41, 0xcb, 0x4a, 0xd2, 0xdf}} + +#define UUID_RSS_FIRMWARE_BL2 \ + {{0xa3, 0xb3, 0xb3, 0x0d}, {0xeb, 0xc9}, {0x40, 0x48}, 0xb4, 0x80, {0x15, 0x53, 0x61, 0xc1, 0x70, 0x48}} + +#define UUID_RSS_FIRMWARE_SCP_BL1 \ + {{0xbf, 0xd5, 0x09, 0x8d}, {0xa7, 0x07}, {0x4f, 0x15}, 0x89, 0x1c, {0x37, 0x22, 0x10, 0xcb, 0x51, 0xe2}} + +#define UUID_RSS_FIRMWARE_AP_BL1 \ + {{0x12, 0x4c, 0x50, 0xe0}, {0xf2, 0xda}, {0x45, 0xe9}, 0x85, 0xc8, {0xda, 0xd9, 0x60, 0x9b, 0x7a, 0x11}} + +#define UUID_RSS_FIRMWARE_NS \ + {{0x8d, 0x95, 0x9f, 0x72}, {0xb8, 0xb1}, {0x42, 0x11}, 0x9a, 0xe6, {0x4b, 0x80, 0x97, 0x47, 0x5a, 0xd9}} + +#define UUID_RSS_FIRMWARE_S \ + {{0x22, 0xea, 0x33, 0x85}, {0xf8, 0x6e}, {0x47, 0x93}, 0x96, 0x8a, {0x2f, 0xe3, 0xdd, 0x50, 0x33, 0xcc}} + +#define UUID_RSS_SIC_TABLES_NS \ + {{0xd9, 0x10, 0x00, 0x72}, {0x6a, 0x28}, {0x4b, 0xec}, 0xb0, 0xd6, {0x8c, 0xed, 0xc4, 0x15, 0x7c, 0xe0}} + +#define UUID_RSS_SIC_TABLES_S \ + {{0xc7, 0x38, 0xd0, 0xde}, {0x8c, 0x26}, {0x48, 0x51}, 0x93, 0x36, {0xf3, 0xdb, 0xe2, 0x96, 0x65, 0x18}} + +#endif /* __PLAT_DEF_FIP_UUID__ */ diff --git a/plat/arm/board/tc/plat_def_uuid_config.c b/plat/arm/board/tc/plat_def_uuid_config.c new file mode 100644 index 000000000..903310b21 --- /dev/null +++ b/plat/arm/board/tc/plat_def_uuid_config.c @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2022, Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + * + */ + +#include + +#include + +#include "tbbr_config.h" + +toc_entry_t plat_def_toc_entries[] = { + { + .name = "RSS Firmware BL1_2 image", + .uuid = UUID_RSS_FIRMWARE_BL1_2, + .cmdline_name = "rss-bl1_2" + }, + { + .name = "RSS Firmware BL2 image", + .uuid = UUID_RSS_FIRMWARE_BL2, + .cmdline_name = "rss-bl2" + }, + { + .name = "RSS Firmware SCP BL1 image", + .uuid = UUID_RSS_FIRMWARE_SCP_BL1, + .cmdline_name = "rss-scp-bl1" + }, + { + .name = "RSS Firmware AP BL1 image", + .uuid = UUID_RSS_FIRMWARE_AP_BL1, + .cmdline_name = "rss-ap-bl1" + }, + { + .name = "RSS Firmware non-secure image", + .uuid = UUID_RSS_FIRMWARE_NS, + .cmdline_name = "rss-ns" + }, + { + .name = "RSS Firmware secure image", + .uuid = UUID_RSS_FIRMWARE_S, + .cmdline_name = "rss-s" + }, + { + .name = "RSS Firmware non-secure SIC tables", + .uuid = UUID_RSS_SIC_TABLES_NS, + .cmdline_name = "rss-sic-tables-ns" + }, + { + .name = "RSS Firmware secure SIC tables", + .uuid = UUID_RSS_SIC_TABLES_S, + .cmdline_name = "rss-sic-tables-s" + }, + + { + .name = NULL, + .uuid = { {0} }, + .cmdline_name = NULL, + } +}; diff --git a/plat/arm/board/tc/plat_fiptool.mk b/plat/arm/board/tc/plat_fiptool.mk new file mode 100644 index 000000000..0e1355689 --- /dev/null +++ b/plat/arm/board/tc/plat_fiptool.mk @@ -0,0 +1,33 @@ +# +# Copyright (c) 2021, NXP. All rights reserved. +# Copyright (c) 2022, Arm Limited. All rights reserved. +# +# SPDX-License-Identifier: BSD-3-Clause +# + +# Name of the platform defined source file name, +# which contains platform defined UUID entries populated +# in the plat_def_toc_entries[]. +PLAT_DEF_UUID_CONFIG_FILE_NAME := plat_def_uuid_config + +PLAT_DEF_UUID_CONFIG_FILE_PATH := ../../plat/arm/board/tc + +PLAT_DEF_UUID := yes +PLAT_DEF_UUID_OID_CONFIG_PATH := ../../plat/arm/board/tc + + +INCLUDE_PATHS += -I${PLAT_DEF_UUID_OID_CONFIG_PATH} \ + -I./ +# Clean the stale object file. +$(shell rm ${PLAT_DEF_UUID_CONFIG_FILE_PATH}/${PLAT_DEF_UUID_CONFIG_FILE_NAME}.o) + +ifeq (${PLAT_DEF_OID},yes) +HOSTCCFLAGS += -DPLAT_DEF_OID +endif + +ifeq (${PLAT_DEF_UUID},yes) +HOSTCCFLAGS += -DPLAT_DEF_FIP_UUID +PLAT_OBJECTS += ${PLAT_DEF_UUID_CONFIG_FILE_PATH}/${PLAT_DEF_UUID_CONFIG_FILE_NAME}.o +endif + +OBJECTS += ${PLAT_OBJECTS} diff --git a/plat/arm/board/tc/platform.mk b/plat/arm/board/tc/platform.mk index 37ba2295c..b132956ce 100644 --- a/plat/arm/board/tc/platform.mk +++ b/plat/arm/board/tc/platform.mk @@ -53,6 +53,9 @@ ENABLE_SYS_REG_TRACE_FOR_NS := 1 # enable trace filter control registers access to NS by default ENABLE_TRF_FOR_NS := 1 +# Enable RSS-required FIP UUIDs +$(shell cp plat/arm/board/tc/plat_fiptool.mk ${PLAT_DIR}) + # Include GICv3 driver files include drivers/arm/gic/v3/gicv3.mk