mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-18 18:44:22 +00:00
amlogic: axg: Add a build flag when using ATOS as BL32
BL2 is unconditionally setting 0 (OPTEE_AARCH64) in arg0 even when the BL32 image is 32bit (OPTEE_AARCH32). This is causing the boot to hang when ATOS (32bit Amlogic BL32 binary-only TEE OS) is used. Since we are not aware of any Amlogic platform shipping a 64bit version of ATOS we can hardcode OPTEE_AARCH32 / MODE_RW_32 when using ATOS. Signed-off-by: Carlo Caione <ccaione@baylibre.com> Change-Id: Iaea47cf6dc48bf8a646056761f02fb81b41c78a3
This commit is contained in:
parent
afd241e71d
commit
72d2535afd
3 changed files with 16 additions and 0 deletions
|
@ -18,6 +18,7 @@ In order to build it:
|
||||||
.. code:: shell
|
.. code:: shell
|
||||||
|
|
||||||
CROSS_COMPILE=aarch64-none-elf- make DEBUG=1 PLAT=axg [SPD=opteed]
|
CROSS_COMPILE=aarch64-none-elf- make DEBUG=1 PLAT=axg [SPD=opteed]
|
||||||
|
[AML_USE_ATOS=1 when using ATOS as BL32]
|
||||||
|
|
||||||
This port has been tested on a A113D board. After building it, follow the
|
This port has been tested on a A113D board. After building it, follow the
|
||||||
instructions in the `U-Boot repository`_, replacing the mentioned **bl31.img**
|
instructions in the `U-Boot repository`_, replacing the mentioned **bl31.img**
|
||||||
|
|
|
@ -84,6 +84,17 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
|
||||||
bl32_image_ep_info = *from_bl2->bl32_ep_info;
|
bl32_image_ep_info = *from_bl2->bl32_ep_info;
|
||||||
bl33_image_ep_info = *from_bl2->bl33_ep_info;
|
bl33_image_ep_info = *from_bl2->bl33_ep_info;
|
||||||
|
|
||||||
|
#if AML_USE_ATOS
|
||||||
|
/*
|
||||||
|
* BL2 is unconditionally setting 0 (OPTEE_AARCH64) in arg0 even when
|
||||||
|
* the BL32 image is 32bit (OPTEE_AARCH32). This is causing the boot to
|
||||||
|
* hang when ATOS (32bit Amlogic BL32 binary-only TEE OS) is used.
|
||||||
|
*
|
||||||
|
* Hardcode to OPTEE_AARCH32 / MODE_RW_32.
|
||||||
|
*/
|
||||||
|
bl32_image_ep_info.args.arg0 = MODE_RW_32;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (bl33_image_ep_info.pc == 0U) {
|
if (bl33_image_ep_info.pc == 0U) {
|
||||||
ERROR("BL31: BL33 entrypoint not obtained from BL2\n");
|
ERROR("BL31: BL33 entrypoint not obtained from BL2\n");
|
||||||
panic();
|
panic();
|
||||||
|
|
|
@ -66,6 +66,10 @@ SEPARATE_CODE_AND_RODATA := 1
|
||||||
# Use Coherent memory
|
# Use Coherent memory
|
||||||
USE_COHERENT_MEM := 1
|
USE_COHERENT_MEM := 1
|
||||||
|
|
||||||
|
AML_USE_ATOS := 0
|
||||||
|
$(eval $(call assert_boolean,AML_USE_ATOS))
|
||||||
|
$(eval $(call add_define,AML_USE_ATOS))
|
||||||
|
|
||||||
# Verify build config
|
# Verify build config
|
||||||
# -------------------
|
# -------------------
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue