feat(bl32): create an sp_min_setup function

This new C function will call sp_min_early_platform_setup2() and
sp_min_plat_arch_setup(). At this step the C environment is already
enabled, and it allows adding function like the one for early console
for which r9-r12 registers could be clobbered.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I4cbf2f6acea769d595ff40b2e2b4ca5d29672878
This commit is contained in:
Yann Gautier 2024-01-18 18:20:43 +01:00
parent 4b0570c3c3
commit a1255c7585
3 changed files with 19 additions and 5 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016-2023, Arm Limited and Contributors. All rights reserved.
* Copyright (c) 2016-2024, Arm Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@ -118,8 +118,7 @@ func sp_min_entrypoint
mov r1, r10
mov r2, r11
mov r3, r12
bl sp_min_early_platform_setup2
bl sp_min_plat_arch_setup
bl sp_min_setup
/* Jump to the main function */
bl sp_min_main

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016-2023, Arm Limited and Contributors. All rights reserved.
* Copyright (c) 2016-2024, Arm Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@ -169,6 +169,17 @@ uintptr_t get_arm_std_svc_args(unsigned int svc_mask)
return (uintptr_t)&psci_args;
}
/******************************************************************************
* The SP_MIN setup function. Calls platforms init functions
*****************************************************************************/
void sp_min_setup(u_register_t arg0, u_register_t arg1, u_register_t arg2,
u_register_t arg3)
{
/* Perform early platform-specific setup */
sp_min_early_platform_setup2(arg0, arg1, arg2, arg3);
sp_min_plat_arch_setup();
}
/******************************************************************************
* The SP_MIN main function. Do the platform and PSCI Library setup. Also
* initialize the runtime service framework.

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2016-2024, Arm Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@ -7,6 +7,10 @@
#ifndef SP_MIN_PRIVATE_H
#define SP_MIN_PRIVATE_H
#include <stdint.h>
void sp_min_setup(u_register_t arg0, u_register_t arg1, u_register_t arg2,
u_register_t arg3);
void sp_min_main(void);
void sp_min_warm_boot(void);
void sp_min_fiq(void);