From 3221fce842c0b5aea984bb8dbc1393082bd88a58 Mon Sep 17 00:00:00 2001 From: Olivier Deprez Date: Wed, 20 Oct 2021 15:17:07 +0200 Subject: [PATCH] fix(spmd): revert workaround hafnium as hypervisor This change essentially reverts [1] by removing the BL31 workaround forcing the dtb address when Hafnium is loaded as an Hypervisor. [1] https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/9569 Signed-off-by: Olivier Deprez Change-Id: I302161d027261448113c66b7fafa9c11620b54ef --- plat/arm/board/fvp/fdts/fvp_fw_config.dts | 4 +--- plat/arm/common/arm_bl31_setup.c | 12 ++++-------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/plat/arm/board/fvp/fdts/fvp_fw_config.dts b/plat/arm/board/fvp/fdts/fvp_fw_config.dts index cad888f37..c26b51920 100644 --- a/plat/arm/board/fvp/fdts/fvp_fw_config.dts +++ b/plat/arm/board/fvp/fdts/fvp_fw_config.dts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2020, ARM Limited. All rights reserved. + * Copyright (c) 2019-2021, ARM Limited. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -45,12 +45,10 @@ }; #endif -#if !defined(SPD_spmd) nt_fw-config { load-address = <0x0 0x80000000>; max-size = <0x200>; id = ; }; -#endif }; }; diff --git a/plat/arm/common/arm_bl31_setup.c b/plat/arm/common/arm_bl31_setup.c index 6472590f3..a6f7df5f4 100644 --- a/plat/arm/common/arm_bl31_setup.c +++ b/plat/arm/common/arm_bl31_setup.c @@ -218,6 +218,10 @@ void __init arm_bl31_early_platform_setup(void *from_bl2, uintptr_t soc_fw_confi * Linux kernel tree, Linux expects the physical address of the device * tree blob (DTB) in x0, while x1-x3 are reserved for future use and * must be 0. + * Repurpose the option to load Hafnium hypervisor in the normal world. + * It expects its manifest address in x0. This is essentially the linux + * dts (passed to the primary VM) by adding 'hypervisor' and chosen + * nodes specifying the Hypervisor configuration. */ #if RESET_TO_BL31 bl33_image_ep_info.args.arg0 = (u_register_t)ARM_PRELOADED_DTB_BASE; @@ -228,14 +232,6 @@ void __init arm_bl31_early_platform_setup(void *from_bl2, uintptr_t soc_fw_confi bl33_image_ep_info.args.arg2 = 0U; bl33_image_ep_info.args.arg3 = 0U; # endif - -#if defined(SPD_spmd) - /* - * Hafnium in normal world expects its manifest address in x0, In CI - * configuration manifest is preloaded at 0x80000000(start of DRAM). - */ - bl33_image_ep_info.args.arg0 = (u_register_t)ARM_DRAM1_BASE; -#endif } void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,