diff options
author | Soby Mathew <soby.mathew@arm.com> | 2018-11-07 16:54:17 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-07 16:54:17 +0000 |
commit | de4fc982a3a46448884fe1aac32e9773138a23c0 (patch) | |
tree | 23d69faa0df759a533c88f146ba76b0fd215b53b /plat | |
parent | 9c10e3485b10ece95f9af8a6af79558397ee1d78 (diff) | |
parent | ed2c4f4a44c8a84e25fc924ba807a14fd60caae6 (diff) | |
download | platform_external_arm-trusted-firmware-de4fc982a3a46448884fe1aac32e9773138a23c0.tar.gz platform_external_arm-trusted-firmware-de4fc982a3a46448884fe1aac32e9773138a23c0.tar.bz2 platform_external_arm-trusted-firmware-de4fc982a3a46448884fe1aac32e9773138a23c0.zip |
Merge pull request #1666 from pmanish87/mp2/manish_local
plat/arm: Support direct Linux kernel boot in AArch32
Diffstat (limited to 'plat')
-rw-r--r-- | plat/arm/common/arm_common.mk | 13 | ||||
-rw-r--r-- | plat/arm/common/sp_min/arm_sp_min_setup.c | 13 |
2 files changed, 21 insertions, 5 deletions
diff --git a/plat/arm/common/arm_common.mk b/plat/arm/common/arm_common.mk index 23777fb7b..cb969b20b 100644 --- a/plat/arm/common/arm_common.mk +++ b/plat/arm/common/arm_common.mk @@ -86,11 +86,14 @@ $(eval $(call assert_boolean,ARM_LINUX_KERNEL_AS_BL33)) $(eval $(call add_define,ARM_LINUX_KERNEL_AS_BL33)) ifeq (${ARM_LINUX_KERNEL_AS_BL33},1) - ifneq (${ARCH},aarch64) - $(error "ARM_LINUX_KERNEL_AS_BL33 is only available in AArch64.") - endif - ifneq (${RESET_TO_BL31},1) - $(error "ARM_LINUX_KERNEL_AS_BL33 is only available if RESET_TO_BL31=1.") + ifeq (${ARCH},aarch64) + ifneq (${RESET_TO_BL31},1) + $(error "ARM_LINUX_KERNEL_AS_BL33 is only available if RESET_TO_BL31=1.") + endif + else + ifneq (${RESET_TO_SP_MIN},1) + $(error "ARM_LINUX_KERNEL_AS_BL33 is only available if RESET_TO_SP_MIN=1.") + endif endif ifndef PRELOADED_BL33_BASE $(error "PRELOADED_BL33_BASE must be set if ARM_LINUX_KERNEL_AS_BL33 is used.") diff --git a/plat/arm/common/sp_min/arm_sp_min_setup.c b/plat/arm/common/sp_min/arm_sp_min_setup.c index e151073f7..ca427d58a 100644 --- a/plat/arm/common/sp_min/arm_sp_min_setup.c +++ b/plat/arm/common/sp_min/arm_sp_min_setup.c @@ -82,6 +82,19 @@ void arm_sp_min_early_platform_setup(void *from_bl2, uintptr_t tos_fw_config, bl33_image_ep_info.spsr = arm_get_spsr_for_bl33_entry(); SET_SECURITY_STATE(bl33_image_ep_info.h.attr, NON_SECURE); +# if ARM_LINUX_KERNEL_AS_BL33 + /* + * According to the file ``Documentation/arm/Booting`` of the Linux + * kernel tree, Linux expects: + * r0 = 0 + * r1 = machine type number, optional in DT-only platforms (~0 if so) + * r2 = Physical address of the device tree blob + */ + bl33_image_ep_info.args.arg0 = 0U; + bl33_image_ep_info.args.arg1 = ~0U; + bl33_image_ep_info.args.arg2 = (u_register_t)ARM_PRELOADED_DTB_BASE; +# endif + #else /* RESET_TO_SP_MIN */ /* |