/*
- * Copyright (c) 2016-2017, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2016-2018, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
func bl2_entrypoint
/*---------------------------------------------
- * Save from r1 the extents of the trusted ram
- * available to BL2 for future use.
- * r0 is not currently used.
+ * Save arguments x0 - x3 from BL1 for future
+ * use.
* ---------------------------------------------
*/
- mov r11, r1
+ mov r9, r0
+ mov r10, r1
+ mov r11, r2
+ mov r12, r3
/* ---------------------------------------------
* Set the exception vector to something sane.
* specific early arch. setup e.g. mmu setup
* ---------------------------------------------
*/
- mov r0, r11
- bl bl2_early_platform_setup
+ mov r0, r9
+ mov r1, r10
+ mov r2, r11
+ mov r3, r12
+ bl bl2_early_platform_setup2
bl bl2_plat_arch_setup
/* ---------------------------------------------
/*
- * Copyright (c) 2013-2017, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
func bl2_entrypoint
/*---------------------------------------------
- * Save from x1 the extents of the tzram
- * available to BL2 for future use.
- * x0 is not currently used.
+ * Save arguments x0 - x3 from BL1 for future
+ * use.
* ---------------------------------------------
*/
- mov x20, x1
+ mov x20, x0
+ mov x21, x1
+ mov x22, x2
+ mov x23, x3
/* ---------------------------------------------
* Set the exception vector to something sane.
* ---------------------------------------------
*/
mov x0, x20
- bl bl2_early_platform_setup
+ mov x1, x21
+ mov x2, x22
+ mov x3, x23
+ bl bl2_early_platform_setup2
+
bl bl2_plat_arch_setup
/* ---------------------------------------------
/*
- * Copyright (c) 2013-2017, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
func bl31_entrypoint
#if !RESET_TO_BL31
/* ---------------------------------------------------------------
- * Preceding bootloader has populated x0 with a pointer to a
- * 'bl31_params' structure & x1 with a pointer to platform
- * specific structure
+ * Stash the previous bootloader arguments x0 - x3 for later use.
* ---------------------------------------------------------------
*/
mov x20, x0
mov x21, x1
+ mov x22, x2
+ mov x23, x3
/* ---------------------------------------------------------------------
* For !RESET_TO_BL31 systems, only the primary CPU ever reaches
_init_memory=0 \
_init_c_runtime=1 \
_exception_vectors=runtime_exceptions
-
- /* ---------------------------------------------------------------------
- * Relay the previous bootloader's arguments to the platform layer
- * ---------------------------------------------------------------------
- */
- mov x0, x20
- mov x1, x21
#else
/* ---------------------------------------------------------------------
* For RESET_TO_BL31 systems which have a programmable reset address,
* arguments passed to the platform layer to reflect that.
* ---------------------------------------------------------------------
*/
- mov x0, 0
- mov x1, 0
+ mov x20, 0
+ mov x21, 0
+ mov x22, 0
+ mov x23, 0
#endif /* RESET_TO_BL31 */
-
/* ---------------------------------------------
* Perform platform specific early arch. setup
* ---------------------------------------------
*/
- bl bl31_early_platform_setup
+ mov x0, x20
+ mov x1, x21
+ mov x2, x22
+ mov x3, x23
+ bl bl31_early_platform_setup2
bl bl31_plat_arch_setup
/* ---------------------------------------------
* specific structure
* ---------------------------------------------------------------
*/
- mov r11, r0
- mov r12, r1
+ mov r9, r0
+ mov r10, r1
+ mov r11, r2
+ mov r12, r3
/* ---------------------------------------------------------------------
* For !RESET_TO_SP_MIN systems, only the primary CPU ever reaches
* Relay the previous bootloader's arguments to the platform layer
* ---------------------------------------------------------------------
*/
- mov r0, r11
- mov r1, r12
#else
/* ---------------------------------------------------------------------
* For RESET_TO_SP_MIN systems which have a programmable reset address,
* Zero the arguments passed to the platform layer to reflect that.
* ---------------------------------------------------------------------
*/
- mov r0, #0
- mov r1, #0
+ mov r9, #0
+ mov r10, #0
+ mov r11, #0
+ mov r12, #0
+
#endif /* RESET_TO_SP_MIN */
#if SP_MIN_WITH_SECURE_FIQ
route_fiq_to_sp_min r4
#endif
- bl sp_min_early_platform_setup
+ mov r0, r9
+ mov r1, r10
+ mov r2, r11
+ mov r3, r12
+ bl sp_min_early_platform_setup2
bl sp_min_plat_arch_setup
/* Jump to the main function */
/*******************************************************************************
* Mandatory SP_MIN functions
******************************************************************************/
+#if !ERROR_DEPRECATED
void sp_min_early_platform_setup(void *from_bl2,
void *plat_params_from_bl2);
+#endif
+void sp_min_early_platform_setup2(u_register_t arg0, u_register_t arg1,
+ u_register_t arg2, u_register_t arg3);
void sp_min_platform_setup(void);
void sp_min_plat_runtime_setup(void);
void sp_min_plat_arch_setup(void);
/*******************************************************************************
* Mandatory BL2 functions
******************************************************************************/
+void bl2_early_platform_setup2(u_register_t arg0, u_register_t arg1, u_register_t arg2, u_register_t arg3);
+#if !ERROR_DEPRECATED
void bl2_early_platform_setup(struct meminfo *mem_layout);
+#endif
void bl2_plat_arch_setup(void);
void bl2_platform_setup(void);
struct meminfo *bl2_plat_sec_mem_layout(void);
/*******************************************************************************
* Mandatory BL31 functions
******************************************************************************/
+#if !ERROR_DEPRECATED
#if LOAD_IMAGE_V2
void bl31_early_platform_setup(void *from_bl2,
void *plat_params_from_bl2);
void bl31_early_platform_setup(struct bl31_params *from_bl2,
void *plat_params_from_bl2);
#endif
+#endif /* ERROR_DEPRECATED */
+void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
+ u_register_t arg2, u_register_t arg3);
void bl31_plat_arch_setup(void);
void bl31_platform_setup(void);
void bl31_plat_runtime_setup(void);
/*
- * Copyright (c) 2016-2017, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2016-2018, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <console.h>
#include <platform.h>
+#include <platform_sp_min.h>
#include <xlat_mmu_helpers.h>
/*
*/
console_uninit();
}
+
+#if !ERROR_DEPRECATED
+
+#pragma weak sp_min_early_platform_setup2
+
+void sp_min_early_platform_setup2(u_register_t arg0, u_register_t arg1,
+ u_register_t arg2, u_register_t arg3)
+{
+ sp_min_early_platform_setup((void *) arg0, (void *)arg1);
+}
+#endif
/*
- * Copyright (c) 2014-2017, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2014-2018, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#pragma weak bl31_plat_runtime_setup
#if !ERROR_DEPRECATED
#pragma weak plat_get_syscnt_freq2
+#pragma weak bl31_early_platform_setup2
#endif /* ERROR_DEPRECATED */
#if SDEI_SUPPORT
return (unsigned int)freq;
}
+
+void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
+ u_register_t arg2, u_register_t arg3)
+{
+ bl31_early_platform_setup((void *) arg0, (void *)arg1);
+}
#endif /* ERROR_DEPRECATED */
#if SDEI_SUPPORT
#include <bl_common.h>
#include <debug.h>
#include <errno.h>
+#include <platform.h>
/*
* The following platform functions are weakly defined. The Platforms
{
return 0;
}
+
+#if !ERROR_DEPRECATED
+#pragma weak bl2_early_platform_setup2
+
+/*
+ * The following platform API implementation that allow compatibility for
+ * the older platform APIs.
+ */
+void bl2_early_platform_setup2(u_register_t arg0, u_register_t arg1,
+ u_register_t arg2, u_register_t arg3)
+{
+ bl2_early_platform_setup((void *)arg1);
+}
+#endif