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 <olivier.deprez@arm.com>
Change-Id: I302161d027261448113c66b7fafa9c11620b54ef
This commit is contained in:
Olivier Deprez 2021-10-20 15:17:07 +02:00
parent 0a712819f2
commit 3221fce842
2 changed files with 5 additions and 11 deletions

View File

@ -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 = <NT_FW_CONFIG_ID>;
};
#endif
};
};

View File

@ -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,