mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 01:24:27 +00:00
Merge changes from topic "mb/rst-to-bl31-update" into integration
* changes: docs: update RESET_TO_BL31 documentation fix(bl31): avoid clearing of argument registers in RESET_TO_BL31 case Revert "docs(bl31): aarch64: RESET_TO_BL31_WITH_PARAMS" Revert "feat(bl31): aarch64: RESET_TO_BL31_WITH_PARAMS"
This commit is contained in:
commit
a1c924df6d
5 changed files with 15 additions and 37 deletions
2
Makefile
2
Makefile
|
@ -1124,7 +1124,6 @@ $(eval $(call assert_booleans,\
|
|||
PSCI_EXTENDED_STATE_ID \
|
||||
PSCI_OS_INIT_MODE \
|
||||
RESET_TO_BL31 \
|
||||
RESET_TO_BL31_WITH_PARAMS \
|
||||
SAVE_KEYS \
|
||||
SEPARATE_CODE_AND_RODATA \
|
||||
SEPARATE_BL2_NOLOAD_REGION \
|
||||
|
@ -1270,7 +1269,6 @@ $(eval $(call add_defines,\
|
|||
PSCI_OS_INIT_MODE \
|
||||
RAS_EXTENSION \
|
||||
RESET_TO_BL31 \
|
||||
RESET_TO_BL31_WITH_PARAMS \
|
||||
SEPARATE_CODE_AND_RODATA \
|
||||
SEPARATE_BL2_NOLOAD_REGION \
|
||||
SEPARATE_NOBITS_REGION \
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2013-2022, ARM Limited and Contributors. All rights reserved.
|
||||
* Copyright (c) 2013-2021, ARM Limited and Contributors. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
@ -66,19 +66,6 @@ func bl31_entrypoint
|
|||
_init_c_runtime=1 \
|
||||
_exception_vectors=runtime_exceptions \
|
||||
_pie_fixup_size=BL31_LIMIT - BL31_BASE
|
||||
|
||||
#if !RESET_TO_BL31_WITH_PARAMS
|
||||
/* ---------------------------------------------------------------------
|
||||
* For RESET_TO_BL31 systems, BL31 is the first bootloader to run so
|
||||
* there's no argument to relay from a previous bootloader. Zero the
|
||||
* arguments passed to the platform layer to reflect that.
|
||||
* ---------------------------------------------------------------------
|
||||
*/
|
||||
mov x20, 0
|
||||
mov x21, 0
|
||||
mov x22, 0
|
||||
mov x23, 0
|
||||
#endif /* RESET_TO_BL31_WITH_PARAMS */
|
||||
#endif /* RESET_TO_BL31 */
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
|
|
|
@ -141,26 +141,27 @@ CPU executes a modified BL31 initialization, as described below.
|
|||
Platform initialization
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
In this configuration, when the CPU resets to BL31 there should be no parameters
|
||||
that can be passed in registers by previous boot stages. Instead, the platform
|
||||
code in BL31 needs to know, or be able to determine, the location of the BL32
|
||||
(if required) and BL33 images and provide this information in response to the
|
||||
``bl31_plat_get_next_image_ep_info()`` function.
|
||||
|
||||
.. note::
|
||||
Some platforms that configure ``RESET_TO_BL31`` might still be able to
|
||||
receive parameters in registers depending on their actual boot sequence. On
|
||||
those occasions, and in addition to ``RESET_TO_BL31``, these platforms should
|
||||
set ``RESET_TO_BL31_WITH_PARAMS`` to avoid the input registers from being
|
||||
zeroed before entering BL31.
|
||||
In this configuration, since the CPU resets to BL31, no parameters are expected
|
||||
to be passed to BL31 (see notes below for clarification).
|
||||
Instead, the platform code in BL31 needs to know, or be able to determine, the
|
||||
location of the BL32 (if required) and BL33 images and provide this information
|
||||
in response to the ``bl31_plat_get_next_image_ep_info()`` function.
|
||||
|
||||
Additionally, platform software is responsible for carrying out any security
|
||||
initialisation, for example programming a TrustZone address space controller.
|
||||
This might be done by the Trusted Boot Firmware or by platform code in BL31.
|
||||
|
||||
.. note::
|
||||
Even though RESET_TO_BL31 is designed such that BL31 is the reset BL image,
|
||||
some platforms may wish to pass some arguments to BL31 as per the defined
|
||||
contract between BL31 and previous bootloaders. Previous bootloaders can
|
||||
pass arguments through registers x0 through x3. BL31 will preserve them and
|
||||
propagate them to platform code, which will handle these arguments in an
|
||||
IMPDEF manner.
|
||||
|
||||
--------------
|
||||
|
||||
*Copyright (c) 2015-2022, Arm Limited and Contributors. All rights reserved.*
|
||||
*Copyright (c) 2015-2023, Arm Limited and Contributors. All rights reserved.*
|
||||
|
||||
.. |Default reset code flow| image:: ../resources/diagrams/default_reset_code.png
|
||||
.. |Reset code flow with programmable reset address| image:: ../resources/diagrams/reset_code_no_boot_type_check.png
|
||||
|
|
|
@ -755,11 +755,6 @@ Common build options
|
|||
entrypoint) or 1 (CPU reset to BL31 entrypoint).
|
||||
The default value is 0.
|
||||
|
||||
- ``RESET_TO_BL31_WITH_PARAMS``: If ``RESET_TO_BL31`` has been enabled, setting
|
||||
this additional option guarantees that the input registers are not cleared
|
||||
therefore allowing parameters to be passed to the BL31 entrypoint.
|
||||
The default value is 0.
|
||||
|
||||
- ``RESET_TO_SP_MIN``: SP_MIN is the minimal AArch32 Secure Payload provided
|
||||
in TF-A. This flag configures SP_MIN entrypoint as the CPU reset vector
|
||||
instead of the BL1 entrypoint. It can take the value 0 (CPU reset to BL1
|
||||
|
|
|
@ -264,9 +264,6 @@ RAS_EXTENSION := 0
|
|||
# By default, BL1 acts as the reset handler, not BL31
|
||||
RESET_TO_BL31 := 0
|
||||
|
||||
# By default, clear the input registers when RESET_TO_BL31 is enabled
|
||||
RESET_TO_BL31_WITH_PARAMS := 0
|
||||
|
||||
# For Chain of Trust
|
||||
SAVE_KEYS := 0
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue