From 39b66f68d803f5ee585d17e316fc7adc185a53c5 Mon Sep 17 00:00:00 2001 From: Chandni Cherukuri Date: Thu, 10 May 2018 10:16:42 +0530 Subject: [PATCH] sgi/dyncfg: add dts files to enable support for dynamic config Remove the existing method of populating the platform id in arg2 of BL33 which is no longer needed with dynamic configuration feature enabled as the BL33 will get this information directly via the config files. Add the tb_fw_config and hw_config dts files. Change-Id: I3c93fec2aedf9ef1f774a5f0969d2d024e47ed2c Signed-off-by: Chandni Cherukuri --- plat/arm/css/sgi/fdts/sgi575.dts | 11 +++++++++++ plat/arm/css/sgi/fdts/sgi575_tb_fw_config.dts | 14 ++++++++++++++ plat/arm/css/sgi/sgi-common.mk | 13 +++++++++++++ plat/arm/css/sgi/sgi_bl31_setup.c | 15 --------------- 4 files changed, 38 insertions(+), 15 deletions(-) create mode 100644 plat/arm/css/sgi/fdts/sgi575.dts create mode 100644 plat/arm/css/sgi/fdts/sgi575_tb_fw_config.dts diff --git a/plat/arm/css/sgi/fdts/sgi575.dts b/plat/arm/css/sgi/fdts/sgi575.dts new file mode 100644 index 000000000..be9920cbc --- /dev/null +++ b/plat/arm/css/sgi/fdts/sgi575.dts @@ -0,0 +1,11 @@ +/* + * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +/dts-v1/; +/ { + /* compatible string */ + compatible = "arm,sgi575"; +}; diff --git a/plat/arm/css/sgi/fdts/sgi575_tb_fw_config.dts b/plat/arm/css/sgi/fdts/sgi575_tb_fw_config.dts new file mode 100644 index 000000000..0bb0a94e3 --- /dev/null +++ b/plat/arm/css/sgi/fdts/sgi575_tb_fw_config.dts @@ -0,0 +1,14 @@ +/* + * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +/dts-v1/; + +/ { + /* Platform Config */ + compatible = "arm,tb_fw"; + hw_config_addr = <0x0 0xFEF00000>; + hw_config_max_size = <0x0100000>; +}; diff --git a/plat/arm/css/sgi/sgi-common.mk b/plat/arm/css/sgi/sgi-common.mk index f6ef95a03..d27cafeec 100644 --- a/plat/arm/css/sgi/sgi-common.mk +++ b/plat/arm/css/sgi/sgi-common.mk @@ -39,6 +39,19 @@ BL31_SOURCES += ${ENT_CPU_SOURCES} \ ${CSS_ENT_BASE}/sgi_topology.c \ ${CSS_ENT_BASE}/sgi_plat_config.c +# Add the FDT_SOURCES and options for Dynamic Config +FDT_SOURCES += ${CSS_ENT_BASE}/fdts/${PLAT}_tb_fw_config.dts +TB_FW_CONFIG := ${BUILD_PLAT}/fdts/${PLAT}_tb_fw_config.dtb + +# Add the TB_FW_CONFIG to FIP and specify the same to certtool +$(eval $(call TOOL_ADD_PAYLOAD,${TB_FW_CONFIG},--tb-fw-config)) + +FDT_SOURCES += ${CSS_ENT_BASE}/fdts/${PLAT}.dts +HW_CONFIG := ${BUILD_PLAT}/fdts/${PLAT}.dtb + +# Add the HW_CONFIG to FIP and specify the same to certtool +$(eval $(call TOOL_ADD_PAYLOAD,${HW_CONFIG},--hw-config)) + $(eval $(call add_define,SGI_PLAT)) override CSS_LOAD_SCP_IMAGES := 0 diff --git a/plat/arm/css/sgi/sgi_bl31_setup.c b/plat/arm/css/sgi/sgi_bl31_setup.c index 0928b83b7..20908463f 100644 --- a/plat/arm/css/sgi/sgi_bl31_setup.c +++ b/plat/arm/css/sgi/sgi_bl31_setup.c @@ -12,23 +12,8 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1, u_register_t arg2, u_register_t arg3) { - uint32_t plat_version; - bl_params_node_t *bl_params; - - bl_params = ((bl_params_t *)arg0)->head; - /* Initialize the platform configuration structure */ plat_config_init(); - while (bl_params) { - if (bl_params->image_id == BL33_IMAGE_ID) { - plat_version = mmio_read_32(SSC_VERSION); - bl_params->ep_info->args.arg2 = plat_version; - break; - } - - bl_params = bl_params->next_params_info; - } - arm_bl31_early_platform_setup((void *)arg0, arg1, arg2, (void *)arg3); } -- GitLab