mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-29 08:40:03 +00:00
Merge changes I85eb75cf,Ic6d9f927 into integration
* changes: fconf: Update dyn_config compatible string doc: Add binding document for fconf.
This commit is contained in:
commit
6eb4304cf5
14 changed files with 60 additions and 15 deletions
32
docs/components/fconf/fconf_properties.rst
Normal file
32
docs/components/fconf/fconf_properties.rst
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
DTB binding for FCONF properties
|
||||||
|
================================
|
||||||
|
|
||||||
|
This document describes the device tree format of |FCONF| properties. These
|
||||||
|
properties are not related to a specific platform and can be queried from
|
||||||
|
common code.
|
||||||
|
|
||||||
|
Dynamic configuration
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
The |FCONF| framework expects a *dtb-registry* node with the following field:
|
||||||
|
|
||||||
|
- compatible [mandatory]
|
||||||
|
- value type: <string>
|
||||||
|
- Must be the string "fconf,dyn_cfg-dtb_registry".
|
||||||
|
|
||||||
|
Then a list of subnodes representing a configuration |DTB|, which can be used
|
||||||
|
by |FCONF|. Each subnode should be named according to the information it
|
||||||
|
contains, and must be formed with the following fields:
|
||||||
|
|
||||||
|
- load-address [mandatory]
|
||||||
|
- value type: <u64>
|
||||||
|
- Physical loading base address of the configuration.
|
||||||
|
|
||||||
|
- max-size [mandatory]
|
||||||
|
- value type: <u32>
|
||||||
|
- Maximum size of the configuration.
|
||||||
|
|
||||||
|
- id [mandatory]
|
||||||
|
- value type: <u32>
|
||||||
|
- Image ID of the configuration.
|
||||||
|
|
|
@ -81,6 +81,10 @@ Then, a wrapper has to be provided to match the ``FCONF_GET_PROPERTY()`` macro:
|
||||||
This second level wrapper can be used to remap the ``FCONF_GET_PROPERTY()`` to
|
This second level wrapper can be used to remap the ``FCONF_GET_PROPERTY()`` to
|
||||||
anything appropriate: structure, array, function, etc..
|
anything appropriate: structure, array, function, etc..
|
||||||
|
|
||||||
|
To ensure a good interpretation of the properties, this documentation must
|
||||||
|
explain how the properties are described for a specific backend. Refer to the
|
||||||
|
:ref:`binding-document` section for more information and example.
|
||||||
|
|
||||||
Loading the property device tree
|
Loading the property device tree
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
@ -88,7 +92,7 @@ The ``fconf_load_config()`` must be called to load the device tree containing
|
||||||
the properties' values. This must be done after the io layer is initialized, as
|
the properties' values. This must be done after the io layer is initialized, as
|
||||||
the |DTB| is stored on an external device (FIP).
|
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
|
||||||
|
|
||||||
Populating the properties
|
Populating the properties
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
@ -98,7 +102,7 @@ can be used to fill the C data structure with the data from the config |DTB|.
|
||||||
This function will call all the ``populate()`` callbacks which have been
|
This function will call all the ``populate()`` callbacks which have been
|
||||||
registered with ``FCONF_REGISTER_POPULATOR()`` as described above.
|
registered with ``FCONF_REGISTER_POPULATOR()`` as described above.
|
||||||
|
|
||||||
.. uml:: ../resources/diagrams/plantuml/fconf_bl2_populate.puml
|
.. uml:: ../../resources/diagrams/plantuml/fconf_bl2_populate.puml
|
||||||
|
|
||||||
Namespace guidance
|
Namespace guidance
|
||||||
~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~
|
||||||
|
@ -129,3 +133,12 @@ belong.
|
||||||
Example:
|
Example:
|
||||||
- Arm io framework: arm.io_policies.bl31_id
|
- Arm io framework: arm.io_policies.bl31_id
|
||||||
|
|
||||||
|
.. _binding-document:
|
||||||
|
|
||||||
|
Properties binding information
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 1
|
||||||
|
|
||||||
|
fconf_properties
|
|
@ -10,7 +10,7 @@ Components
|
||||||
arm-sip-service
|
arm-sip-service
|
||||||
debugfs-design
|
debugfs-design
|
||||||
exception-handling
|
exception-handling
|
||||||
fconf
|
fconf/index
|
||||||
firmware-update
|
firmware-update
|
||||||
platform-interrupt-controller-API
|
platform-interrupt-controller-API
|
||||||
ras
|
ras
|
||||||
|
|
|
@ -48,8 +48,8 @@ int fconf_populate_dtb_registry(uintptr_t config)
|
||||||
/* As libfdt use void *, we can't avoid this cast */
|
/* As libfdt use void *, we can't avoid this cast */
|
||||||
const void *dtb = (void *)config;
|
const void *dtb = (void *)config;
|
||||||
|
|
||||||
/* Find the node offset point to "arm,dyn_cfg-dtb_registry" compatible property */
|
/* Find the node offset point to "fconf,dyn_cfg-dtb_registry" compatible property */
|
||||||
const char *compatible_str = "arm,dyn_cfg-dtb_registry";
|
const char *compatible_str = "fconf,dyn_cfg-dtb_registry";
|
||||||
node = fdt_node_offset_by_compatible(dtb, -1, compatible_str);
|
node = fdt_node_offset_by_compatible(dtb, -1, compatible_str);
|
||||||
if (node < 0) {
|
if (node < 0) {
|
||||||
ERROR("FCONF: Can't find %s compatible in dtb\n", compatible_str);
|
ERROR("FCONF: Can't find %s compatible in dtb\n", compatible_str);
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
dtb-registry {
|
dtb-registry {
|
||||||
compatible = "arm,dyn_cfg-dtb_registry";
|
compatible = "fconf,dyn_cfg-dtb_registry";
|
||||||
|
|
||||||
/* tb_fw_config is temporarily contained in this dtb */
|
/* tb_fw_config is temporarily contained in this dtb */
|
||||||
tb_fw-config {
|
tb_fw-config {
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
dtb-registry {
|
dtb-registry {
|
||||||
compatible = "arm,dyn_cfg-dtb_registry";
|
compatible = "fconf,dyn_cfg-dtb_registry";
|
||||||
|
|
||||||
/* tb_fw_config is temporarily contained on this dtb */
|
/* tb_fw_config is temporarily contained on this dtb */
|
||||||
tb_fw-config {
|
tb_fw-config {
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
dtb-registry {
|
dtb-registry {
|
||||||
compatible = "arm,dyn_cfg-dtb_registry";
|
compatible = "fconf,dyn_cfg-dtb_registry";
|
||||||
|
|
||||||
/* tb_fw_config is temporarily contained on this dtb */
|
/* tb_fw_config is temporarily contained on this dtb */
|
||||||
tb_fw-config {
|
tb_fw-config {
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
dtb-registry {
|
dtb-registry {
|
||||||
compatible = "arm,dyn_cfg-dtb_registry";
|
compatible = "fconf,dyn_cfg-dtb_registry";
|
||||||
|
|
||||||
/* tb_fw_config is temporarily contained on this dtb */
|
/* tb_fw_config is temporarily contained on this dtb */
|
||||||
tb_fw-config {
|
tb_fw-config {
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
dtb-registry {
|
dtb-registry {
|
||||||
compatible = "arm,dyn_cfg-dtb_registry";
|
compatible = "fconf,dyn_cfg-dtb_registry";
|
||||||
|
|
||||||
/* tb_fw_config is temporarily contained on this dtb */
|
/* tb_fw_config is temporarily contained on this dtb */
|
||||||
tb_fw-config {
|
tb_fw-config {
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
dtb-registry {
|
dtb-registry {
|
||||||
compatible = "arm,dyn_cfg-dtb_registry";
|
compatible = "fconf,dyn_cfg-dtb_registry";
|
||||||
|
|
||||||
/* tb_fw_config is temporarily contained on this dtb */
|
/* tb_fw_config is temporarily contained on this dtb */
|
||||||
tb_fw-config {
|
tb_fw-config {
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
dtb-registry {
|
dtb-registry {
|
||||||
compatible = "arm,dyn_cfg-dtb_registry";
|
compatible = "fconf,dyn_cfg-dtb_registry";
|
||||||
|
|
||||||
/* tb_fw_config is temporarily contained on this dtb */
|
/* tb_fw_config is temporarily contained on this dtb */
|
||||||
tb_fw-config {
|
tb_fw-config {
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
/ {
|
/ {
|
||||||
dtb-registry {
|
dtb-registry {
|
||||||
compatible = "arm,dyn_cfg-dtb_registry";
|
compatible = "fconf,dyn_cfg-dtb_registry";
|
||||||
|
|
||||||
/* tb_fw_config is temporarily contained on this dtb */
|
/* tb_fw_config is temporarily contained on this dtb */
|
||||||
tb_fw-config {
|
tb_fw-config {
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
dtb-registry {
|
dtb-registry {
|
||||||
compatible = "arm,dyn_cfg-dtb_registry";
|
compatible = "fconf,dyn_cfg-dtb_registry";
|
||||||
|
|
||||||
/* tb_fw_config is temporarily contained on this dtb */
|
/* tb_fw_config is temporarily contained on this dtb */
|
||||||
tb_fw-config {
|
tb_fw-config {
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
dtb-registry {
|
dtb-registry {
|
||||||
compatible = "arm,dyn_cfg-dtb_registry";
|
compatible = "fconf,dyn_cfg-dtb_registry";
|
||||||
|
|
||||||
/* tb_fw_config is temporarily contained on this dtb */
|
/* tb_fw_config is temporarily contained on this dtb */
|
||||||
tb_fw-config {
|
tb_fw-config {
|
||||||
|
|
Loading…
Add table
Reference in a new issue