mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-24 05:54:08 +00:00
doc: Update BL1 and BL2 boot flow
Updated the document for BL1 and BL2 boot flow to capture below changes made in FCONF 1. Loading of fw_config and tb_fw_config images by BL1. 2. Population of fw_config and tb_fw_config by BL2. Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com> Change-Id: Ifea5c61d520ff1de834c279ce1759b53448303ba
This commit is contained in:
parent
7fb9bcd846
commit
e555787b66
3 changed files with 56 additions and 19 deletions
|
@ -49,8 +49,10 @@ Hence each ``populate()`` function must be registered with a specific
|
||||||
configuration properties which is usually a device tree file.
|
configuration properties which is usually a device tree file.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
- FW_CONFIG: properties related to base address, maximum size and image id
|
||||||
|
of other DTBs etc.
|
||||||
- TB_FW: properties related to trusted firmware such as IO policies,
|
- TB_FW: properties related to trusted firmware such as IO policies,
|
||||||
base address of other DTBs, mbedtls heap info etc.
|
mbedtls heap info etc.
|
||||||
- HW_CONFIG: properties related to hardware configuration of the SoC
|
- HW_CONFIG: properties related to hardware configuration of the SoC
|
||||||
such as topology, GIC controller, PSCI hooks, CPU ID etc.
|
such as topology, GIC controller, PSCI hooks, CPU ID etc.
|
||||||
|
|
||||||
|
@ -88,9 +90,10 @@ explain how the properties are described for a specific backend. Refer to the
|
||||||
Loading the property device tree
|
Loading the property device tree
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
The ``fconf_load_config()`` must be called to load the device tree containing
|
The ``fconf_load_config(image_id)`` must be called to load fw_config and
|
||||||
the properties' values. This must be done after the io layer is initialized, as
|
tb_fw_config devices tree containing the properties' values. This must be done
|
||||||
the |DTB| is stored on an external device (FIP).
|
after the io layer is initialized, as the |DTB| is stored on an external
|
||||||
|
device (FIP).
|
||||||
|
|
||||||
.. uml:: ../../resources/diagrams/plantuml/fconf_bl1_load_config.puml
|
.. uml:: ../../resources/diagrams/plantuml/fconf_bl1_load_config.puml
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@ end box
|
||||||
|
|
||||||
box "platform common code"
|
box "platform common code"
|
||||||
participant plat_bl1_common
|
participant plat_bl1_common
|
||||||
|
participant fconf_dyn_cfg_getter
|
||||||
participant fconf
|
participant fconf
|
||||||
end box
|
end box
|
||||||
|
|
||||||
|
@ -20,12 +21,17 @@ bl1_main -> fvp_bl1_setup : bl1_platform_setup()
|
||||||
fvp_bl1_setup -> arm_bl1_setup : arm_bl1_platform_setup()
|
fvp_bl1_setup -> arm_bl1_setup : arm_bl1_platform_setup()
|
||||||
arm_bl1_setup -> arm_io_storage : plat_arm_io_setup()
|
arm_bl1_setup -> arm_io_storage : plat_arm_io_setup()
|
||||||
note over arm_io_storage : register and setup fip
|
note over arm_io_storage : register and setup fip
|
||||||
arm_bl1_setup -> fconf : fconf_load_config()
|
arm_bl1_setup -> fconf : set_fw_config_info(fw_config_base, max_size)
|
||||||
|
note over fconf
|
||||||
|
set fw_config information
|
||||||
|
(address, size, image_id)
|
||||||
|
in global dtb_infos array.
|
||||||
|
end note
|
||||||
activate fconf
|
activate fconf
|
||||||
note over fconf
|
arm_bl1_setup -> fconf : fconf_load_config(FW_CONFIG_ID)
|
||||||
create and populate an
|
fconf -> fconf : FCONF_GET_PROPERTY(dyn_cfg, dtb, FW_CONFIG_ID)
|
||||||
image_desc_t for FW_CONFIG
|
fconf -> fconf_dyn_cfg_getter: dyn_cfg_dtb_info_getter(FW_CONFIG_ID)
|
||||||
end note
|
fconf_dyn_cfg_getter -> fconf: fw_config_info
|
||||||
fconf -> bl_common : load_auth_image(FW_CONFIG_ID, &image_info)
|
fconf -> bl_common : load_auth_image(FW_CONFIG_ID, &image_info)
|
||||||
activate bl_common
|
activate bl_common
|
||||||
note over bl_common
|
note over bl_common
|
||||||
|
@ -33,18 +39,38 @@ activate fconf
|
||||||
with info from plat_io_policy
|
with info from plat_io_policy
|
||||||
end note
|
end note
|
||||||
bl_common -> arm_io_storage
|
bl_common -> arm_io_storage
|
||||||
arm_io_storage -> fconf: FCONF_GET_PROPERTY(arm, arm_io_policies, tb_fw_cfg)
|
arm_io_storage -> fconf: FCONF_GET_PROPERTY(arm, arm_io_policies, FW_CONFIG_ID)
|
||||||
note over fconf: use staticaly defined policies in bl1
|
note over fconf: use statically defined policies in bl1
|
||||||
|
fconf <- bl_common : image_info
|
||||||
|
deactivate bl_common
|
||||||
|
note over fconf : get fw_config_dtb from image_info
|
||||||
|
arm_bl1_setup -> fconf: FCONF_GET_PROPERTY(dyn_cfg, dtb, FW_CONFIG_ID)
|
||||||
|
fconf -> fconf_dyn_cfg_getter: dyn_cfg_dtb_info_getter(FW_CONFIG_ID)
|
||||||
|
fconf_dyn_cfg_getter -> arm_bl1_setup: fw_config_info
|
||||||
|
arm_bl1_setup -> fconf_dyn_cfg_getter: populate_dtb_registry(uintptr_t dtb)
|
||||||
|
arm_bl1_setup -> fconf: fconf_load_config(TB_FW_CONFIG_ID)
|
||||||
|
fconf -> fconf : FCONF_GET_PROPERTY(dyn_cfg, dtb, TB_FW_CONFIG_ID)
|
||||||
|
fconf -> fconf_dyn_cfg_getter: dyn_cfg_dtb_info_getter(TB_FW_CONFIG_ID)
|
||||||
|
fconf_dyn_cfg_getter -> fconf: tb_fw_config_info
|
||||||
|
fconf -> bl_common : load_auth_image(TB_FW_CONFIG_ID, &image_info)
|
||||||
|
activate bl_common
|
||||||
|
note over bl_common
|
||||||
|
load and auth image from fip
|
||||||
|
with info from plat_io_policy
|
||||||
|
end note
|
||||||
|
bl_common -> arm_io_storage
|
||||||
|
arm_io_storage -> fconf: FCONF_GET_PROPERTY(arm, arm_io_policies, TB_FW_CONFIG_ID)
|
||||||
|
note over fconf: use statically defined policies in bl1
|
||||||
fconf <- bl_common : image_info
|
fconf <- bl_common : image_info
|
||||||
deactivate bl_common
|
deactivate bl_common
|
||||||
note over fconf : get tb_fw_config_dtb from image_info
|
note over fconf : get tb_fw_config_dtb from image_info
|
||||||
fconf -> plat_bl1_common : bl1_plat_get_image_desc(BL2_IMAGE_ID)
|
fconf -> arm_bl1_setup
|
||||||
fconf <- plat_bl1_common : BL2_IMAGE_DESC
|
arm_bl1_setup -> plat_bl1_common : bl1_plat_get_image_desc(BL2_IMAGE_ID)
|
||||||
note over fconf
|
arm_bl1_setup <- plat_bl1_common : BL2_IMAGE_DESC
|
||||||
|
note over arm_bl1_setup
|
||||||
set ep_info.args.arg0 of BL2_IMAGE_DESC
|
set ep_info.args.arg0 of BL2_IMAGE_DESC
|
||||||
to FW_CONFIG base address
|
to FW_CONFIG base address
|
||||||
end note
|
end note
|
||||||
arm_bl1_setup <- fconf
|
|
||||||
deactivate fconf
|
deactivate fconf
|
||||||
|
|
||||||
== load & auth, prepare and jump to BL2 ==
|
== load & auth, prepare and jump to BL2 ==
|
||||||
|
|
|
@ -8,6 +8,7 @@ end box
|
||||||
box "platform common code"
|
box "platform common code"
|
||||||
participant fconf
|
participant fconf
|
||||||
participant fconf_tbbr_getter
|
participant fconf_tbbr_getter
|
||||||
|
participant fconf_dyn_cfg_getter
|
||||||
end box
|
end box
|
||||||
|
|
||||||
box "arm platform code" #LightBlue
|
box "arm platform code" #LightBlue
|
||||||
|
@ -25,10 +26,17 @@ note over arm_bl2_setup
|
||||||
end note
|
end note
|
||||||
arm_bl2_setup -> arm_bl2_setup : arm_bl2_early_platform_setup(\n\t fw_config, mem_layout)
|
arm_bl2_setup -> arm_bl2_setup : arm_bl2_early_platform_setup(\n\t fw_config, mem_layout)
|
||||||
activate arm_bl2_setup
|
activate arm_bl2_setup
|
||||||
arm_bl2_setup -> fconf: fconf_polulate("TB_FW", fw_config)
|
arm_bl2_setup -> fconf: fconf_populate("FW_CONFIG", fw_config)
|
||||||
activate fconf
|
activate fconf
|
||||||
|
fconf -> fconf_dyn_cfg_getter: populate_dtb_registry(uintptr_t dtb)
|
||||||
|
note over fconf_dyn_cfg_getter: read dtb_registry properties from dtb
|
||||||
|
fconf_dyn_cfg_getter -> arm_bl2_setup
|
||||||
|
arm_bl2_setup -> fconf: FCONF_GET_PROPERTY(dyn_cfg, dtb, TB_FW_CONFIG_ID)
|
||||||
|
fconf -> fconf_dyn_cfg_getter: dyn_cfg_dtb_info_getter(TB_FW_CONFIG_ID)
|
||||||
|
fconf_dyn_cfg_getter -> arm_bl2_setup: tb_fw_config_info
|
||||||
|
arm_bl2_setup -> fconf: fconf_populate("TB_FW_CONFIG", tb_fw_config)
|
||||||
fconf -> fconf_tbbr_getter: fconf_populate_tbbr_dyn_config(uintptr_t dtb)
|
fconf -> fconf_tbbr_getter: fconf_populate_tbbr_dyn_config(uintptr_t dtb)
|
||||||
note over fconf_tbbr_getter: read tbbr propeties from dtb
|
note over fconf_tbbr_getter: read tbbr properties from dtb
|
||||||
fconf -> arm_fconf_io: fconf_populate_arm_io_policies(uintptr_t dtb)
|
fconf -> arm_fconf_io: fconf_populate_arm_io_policies(uintptr_t dtb)
|
||||||
note over arm_fconf_io: read arm io propeties from dtb
|
note over arm_fconf_io: read arm io propeties from dtb
|
||||||
deactivate fconf
|
deactivate fconf
|
||||||
|
|
Loading…
Add table
Reference in a new issue