| #
d40a2c00 |
| 30-Apr-2025 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: ffa: reserve physical nexus memory for manifest
In reinit_manifest_dt() when reserving physical memory for the manifest, allocate from physical nexus memory instead to support ns-virtualizatio
core: ffa: reserve physical nexus memory for manifest
In reinit_manifest_dt() when reserving physical memory for the manifest, allocate from physical nexus memory instead to support ns-virtualization.
Fixes: 414123ae8ca5 ("core: ffa: reserve physical memory for manifest") Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
414123ae |
| 03-Apr-2025 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: ffa: reserve physical memory for manifest
With CFG_CORE_SEL2_SPMC=y (Hafnium as SPMC at S-EL2), the FF-A manifest passed to OP-TEE resides in the memory reserved for OP-TEE just before the loa
core: ffa: reserve physical memory for manifest
With CFG_CORE_SEL2_SPMC=y (Hafnium as SPMC at S-EL2), the FF-A manifest passed to OP-TEE resides in the memory reserved for OP-TEE just before the load address. The physical memory pool is initialized with the entire range of secure memory, with holes carved out for already used memory.
Temporarily allocate the physical memory used by the manifest until it's not needed any longer and released by release_manifest_dt().
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| #
96e33b7f |
| 24-Jan-2025 |
Etienne Carriere <etienne.carriere@foss.st.com> |
core: dt: cached data for fdt_get_reg_props_by_index()
Factorize fdt_get_reg_props_by_index() and fdt_reg_info() to add DT cache info support to the former.
Signed-off-by: Etienne Carriere <etienne
core: dt: cached data for fdt_get_reg_props_by_index()
Factorize fdt_get_reg_props_by_index() and fdt_reg_info() to add DT cache info support to the former.
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
de56c16d |
| 04-Oct-2024 |
Etienne Carriere <etienne.carriere@foss.st.com> |
core: kernel: dt: add and use fdt_reg_info()
Implement fdt_reg_info() instead of fdt_reg_base_address() and fdt_reg_size() to optimize look up in the DT due to finding parent node.
Signed-off-by: E
core: kernel: dt: add and use fdt_reg_info()
Implement fdt_reg_info() instead of fdt_reg_base_address() and fdt_reg_size() to optimize look up in the DT due to finding parent node.
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
578bc4fe |
| 01-Oct-2024 |
Etienne Carriere <etienne.carriere@foss.st.com> |
core: dt: cache embedded DTB node information
Optimize OP-TEE boot time regarding parsing of the embedded DTB content when using libfdt. The library functions fdt_parent_offset() and fdt_node_offset
core: dt: cache embedded DTB node information
Optimize OP-TEE boot time regarding parsing of the embedded DTB content when using libfdt. The library functions fdt_parent_offset() and fdt_node_offset_by_phandle() are not very efficient since they parse the DTB from root node to target node to look up for, respectively, the node offset of a node parent and the node offset related to a node phandle. Helper functions fdt_reg_base_address() and fdt_reg_size() are also affected since they are based on fdt_parent_offset() to find the #address-cells and #size-cells properties of a node parent.
Optimize this by parsing the embedded DT once and caching node information (parent node, phandle value, parent node #address-cells and #size-cells values) in a array. Parse the array instead of the DT for find these information.
We made few tests to use bisection or hash tables for look up the information in the cache array. The gain was very small, likely due to the number of DT node involved in the platform is relatively small (only several hundreds or nodes).
This feature is enabled upon configuration switch CFG_DT_CACHED_NODE_INFO.
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
c5e3e79f |
| 10-Jun-2024 |
Sungbae Yoo <sungbaey@nvidia.com> |
core: kernel: change DT getters to use manifest DT
This change get_dt() and get_secure_dt() to use manifest DT as an alternative if there is no embedded DT or external DT.
Signed-off-by: Sungbae Yo
core: kernel: change DT getters to use manifest DT
This change get_dt() and get_secure_dt() to use manifest DT as an alternative if there is no embedded DT or external DT.
Signed-off-by: Sungbae Yoo <sungbaey@nvidia.com> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
4bc2c5f0 |
| 10-Jun-2024 |
Sungbae Yoo <sungbaey@nvidia.com> |
core: kernel: move manifest DT functions to dt.c
This moves functions to handle manifest DT, used as a SP (secure partition) manifest via FF-A interface, to core/kernel/dt.c and their definitions to
core: kernel: move manifest DT functions to dt.c
This moves functions to handle manifest DT, used as a SP (secure partition) manifest via FF-A interface, to core/kernel/dt.c and their definitions to dt.h. manifest DT is dependent with CORE_FFA that depends on CFG_DT, as the same as dt.c.
Signed-off-by: Sungbae Yoo <sungbaey@nvidia.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
a039ffc6 |
| 05-Jan-2024 |
Clement Faure <clement.faure@nxp.com> |
core: kernel: dt: check return values from snprintf()
Check return values from snprintf() function.
Signed-off-by: Clement Faure <clement.faure@nxp.com> Reviewed-by: Jerome Forissier <jerome.foriss
core: kernel: dt: check return values from snprintf()
Check return values from snprintf() function.
Signed-off-by: Clement Faure <clement.faure@nxp.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
5ca2c365 |
| 10-Jan-2024 |
Clement Faure <clement.faure@nxp.com> |
core: remove unnecessary includes
Remove unnecessary includes.
Signed-off-by: Clement Faure <clement.faure@nxp.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander
core: remove unnecessary includes
Remove unnecessary includes.
Signed-off-by: Clement Faure <clement.faure@nxp.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
dcff802b |
| 16-Nov-2023 |
Raymond Mao <raymond.mao@linaro.org> |
core: add new argument to init_external_dt()
Add argument to function init_external_dt() to allow callers to specify the maximum size of external DTB to be initialized.
Signed-off-by: Raymond Mao <
core: add new argument to init_external_dt()
Add argument to function init_external_dt() to allow callers to specify the maximum size of external DTB to be initialized.
Signed-off-by: Raymond Mao <raymond.mao@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
66763721 |
| 26-Sep-2023 |
Raymond Mao <raymond.mao@linaro.org> |
core: add support for transfer list
Add supports for Transfer List on both aarch32/64. Fetch arguments from {x,r}{0-3} and check if a valid Transfer List exists, which compliant to the Firmware Hand
core: add support for transfer list
Add supports for Transfer List on both aarch32/64. Fetch arguments from {x,r}{0-3} and check if a valid Transfer List exists, which compliant to the Firmware Handoff specification. The Transfer List will be mapped during early initialization and unmapped before exiting to next boot stage. DTB and pagable address will be parsed from the Transfer List if they exist as Transfer Entries. If Transfer List does not exist or is invalid, legacy argument handoff is backwards compatible.
Signed-off-by: Raymond Mao <raymond.mao@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
0c49b6d6 |
| 05-Jul-2023 |
Alvin Chang <alvinga@andestech.com> |
core: kernel: Refine variable declarations and return values in dt.c
Provide initialization values for local variables. The return values of libfdt functions are returned instead of -1 since libfdt
core: kernel: Refine variable declarations and return values in dt.c
Provide initialization values for local variables. The return values of libfdt functions are returned instead of -1 since libfdt has its own error codes and they are useful for debug.
Signed-off-by: Alvin Chang <alvinga@andestech.com> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
e6027f48 |
| 05-Jul-2023 |
Alvin Chang <alvinga@andestech.com> |
core: arm: Move some DT functions to common kernel
Some existed functions for device tree in ARM could be also used for other architectures. This commit moves most of functions from ARM architecture
core: arm: Move some DT functions to common kernel
Some existed functions for device tree in ARM could be also used for other architectures. This commit moves most of functions from ARM architecture into "core/kernel/dt.c", including external DT descriptor, DT overlay, external DT initialization, API for adding DT child nodes and reserved-memory nodes. Since "core/kernel/dt.c" is dependent with CFG_DT, other functions which are independent with CFG_DT are put into new file "core/kernel/boot.c".
Signed-off-by: Alvin Chang <alvinga@andestech.com> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
4e45454a |
| 11-Apr-2023 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add dt_getprop_as_number()
Adds dt_getprop_as_number() to read a property and parse it as a number returned as a uint64_t. The size of the property determines if it's read as an unsigned 32-bi
core: add dt_getprop_as_number()
Adds dt_getprop_as_number() to read a property and parse it as a number returned as a uint64_t. The size of the property determines if it's read as an unsigned 32-bit or 64-bit integer.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
9e3c57c8 |
| 28-Feb-2023 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: dt_driver: move related content from dt.h to dt_driver.h
Moves so-called dt_driver related declarations and definitions from dt.h to dt_drivers.h. Incidentally adds an inline description to en
core: dt_driver: move related content from dt.h to dt_driver.h
Moves so-called dt_driver related declarations and definitions from dt.h to dt_drivers.h. Incidentally adds an inline description to enum dt_driver_type. This change clarifies when a source file shall include dt.h and/or dt_driver.h.
This change updates driver source files to include none, one or both of these header files where applicable.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
73e27bfa |
| 07-Apr-2023 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
core: dt: fix return value in fdt_read_uint32_array()
If fdt_getprop() returns 0, the error code is contained in the fourth parameter: len in this case.
Return len instead of -FDT_ERR_NOTFOUND.
Si
core: dt: fix return value in fdt_read_uint32_array()
If fdt_getprop() returns 0, the error code is contained in the fourth parameter: len in this case.
Return len instead of -FDT_ERR_NOTFOUND.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
07ced948 |
| 22-Mar-2023 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
core: dt: add kernel DT API to retrieve regs by name
This patch adds _fdt_get_reg_props_by_index() and _fdt_get_reg_props_by_name() APIs.
Signed-off-by: Christophe Kerello <christophe.kerello@foss.
core: dt: add kernel DT API to retrieve regs by name
This patch adds _fdt_get_reg_props_by_index() and _fdt_get_reg_props_by_name() APIs.
Signed-off-by: Christophe Kerello <christophe.kerello@foss.st.com> Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
a2e8c036 |
| 22-Mar-2023 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
core: dt: add fdt_read_size() helper
This patch adds fdt_read_size() helper.
Signed-off-by: Christophe Kerello <christophe.kerello@foss.st.com> Signed-off-by: Gatien Chevallier <gatien.chevallier@f
core: dt: add fdt_read_size() helper
This patch adds fdt_read_size() helper.
Signed-off-by: Christophe Kerello <christophe.kerello@foss.st.com> Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
7c3a6b7b |
| 22-Mar-2023 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
core: dt: add kernel DT API fdt_read_uint32_index()
This patch adds fdt_read_uint32_index() API. This API reads one cell from a given multi-value property.
This patch updates fdt_read_uint32() and
core: dt: add kernel DT API fdt_read_uint32_index()
This patch adds fdt_read_uint32_index() API. This API reads one cell from a given multi-value property.
This patch updates fdt_read_uint32() and fdt_read_uint32_default() to use fdt_read_uint32_index() API
Signed-off-by: Christophe Kerello <christophe.kerello@foss.st.com> Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
f354a5d8 |
| 05-Apr-2023 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
core: replace _fdt_ prefix with fdt_ for device tree API
As per upstream discussion, there is no reason to keep _fdt_ prefix. Replaces it with fdt_ for all occurrences.
Signed-off-by: Gatien Cheval
core: replace _fdt_ prefix with fdt_ for device tree API
As per upstream discussion, there is no reason to keep _fdt_ prefix. Replaces it with fdt_ for all occurrences.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
884f2f1a |
| 21-Mar-2022 |
Olivier Moysan <olivier.moysan@foss.st.com> |
core: dt: allow null value in reg property
This change allows reg property to have value 0. The reg property can be used to describe an element that is not a physical address and for which 0 is a va
core: dt: allow null value in reg property
This change allows reg property to have value 0. The reg property can be used to describe an element that is not a physical address and for which 0 is a valid value.
Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com> Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| #
a5d5bbc8 |
| 25-Mar-2022 |
Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com> |
core: dt: Make it possible to alter device mapping
In case where IP core device is TrustZone aware and is used by both REE and TEE dt_map_dev() would normally cause non-secure mapping for the device
core: dt: Make it possible to alter device mapping
In case where IP core device is TrustZone aware and is used by both REE and TEE dt_map_dev() would normally cause non-secure mapping for the device.
When selected registers in IP core are only accessible by TrustZone device needs to be mapped with MEM_AREA_IO_SEC to cause actual AXI memory access be made with AWPROT[1] and ARPROT[1] bits configured properly.
This adds new argument for dt_map_dev() to enable forcing mapping to be secure or non-secure.
Signed-off-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
876826f3 |
| 15-Feb-2021 |
Gabriel Fernandez <gabriel.fernandez@foss.st.com> |
core: dt: add kernel DT API to retrieved device information from DT
Add _fdt_read_uint32_array(), _fdt_read_uint32(), _fdt_read_uint32_default(), _fdt_check_node() functions.
Acked-by: Etienne Carr
core: dt: add kernel DT API to retrieved device information from DT
Add _fdt_read_uint32_array(), _fdt_read_uint32(), _fdt_read_uint32_default(), _fdt_check_node() functions.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
show more ...
|
| #
61bdedea |
| 13-Jan-2022 |
Jerome Forissier <jerome@forissier.org> |
core: define DT drivers using scattered arrays
Replace the specific mechanism used to define and enumerate DT drivers with scattered arrays. Doing so simplifies the TEE linker file a bit.
Signed-of
core: define DT drivers using scattered arrays
Replace the specific mechanism used to define and enumerate DT drivers with scattered arrays. Doing so simplifies the TEE linker file a bit.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Suggested-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
06fd21dd |
| 03-Nov-2021 |
Lionel Debieve <lionel.debieve@foss.st.com> |
core: kernel: add reg_size in the dt_node_info structure
Add the register size read from device tree in the dt_node_info structure. It may be used to map the IO registers with the correct address ra
core: kernel: add reg_size in the dt_node_info structure
Add the register size read from device tree in the dt_node_info structure. It may be used to map the IO registers with the correct address range.
Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|