| 22d7b316 | 05-Dec-2020 |
Marek Vasut <marek.vasut+renesas@gmail.com> |
plat: rcar: Obtain memory layout from DT
Since the ATF is passing a DT fragment to OpTee-OS, parse the memory information from this DT fragment. This makes it possible to run the OpTee-OS on any mem
plat: rcar: Obtain memory layout from DT
Since the ATF is passing a DT fragment to OpTee-OS, parse the memory information from this DT fragment. This makes it possible to run the OpTee-OS on any memory layout instead of the few hard-coded options. Switch the default platform to this DT based approach, but retain the legacy platforms as well for backward compatibility.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Acked-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
show more ...
|
| 572afdce | 05-Dec-2020 |
Marek Vasut <marek.vasut+renesas@gmail.com> |
plat: rcar: Derive core map from PRR
Instead of hard-coding the core count and the core ID mapping, derive this information from the PRR register. All R-Car3 SoCs have either one or two 4-core CPU c
plat: rcar: Derive core map from PRR
Instead of hard-coding the core count and the core ID mapping, derive this information from the PRR register. All R-Car3 SoCs have either one or two 4-core CPU clusters composed of CA53 or CA57, except for M3W/M3W+, which has two CA57s and four CA53s.
So the approach here is to always set core count to 8, read out PRR register once on boot, and then calculate the core ID using CorePos = CoreId + (ClusterId << (IsM3W ? 1 : 0))
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
show more ...
|
| e9df68f0 | 11-Feb-2021 |
Jorge Ramirez-Ortiz <jorge@foundries.io> |
core: mobj: fixup undefined mobj_mapped_shm_alloc
Provide a function definition when CFG_CORE_DYN_SHM is not configured.
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io> Reviewed-by: Jens Wi
core: mobj: fixup undefined mobj_mapped_shm_alloc
Provide a function definition when CFG_CORE_DYN_SHM is not configured.
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| e7d7a709 | 10-Feb-2021 |
Volodymyr Babchuk <volodymyr_babchuk@epam.com> |
virt: round down TA RAM memory size to page size
It is possible that get_ta_ram_size() would return size which is not aligned to a small page size. This will cause panic in core_init_mmu_prtn() func
virt: round down TA RAM memory size to page size
It is possible that get_ta_ram_size() would return size which is not aligned to a small page size. This will cause panic in core_init_mmu_prtn() function.
To fix this we need to round down calculated value to a page size.
Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 93e678ed | 24-Sep-2020 |
Clement Faure <clement.faure@nxp.com> |
drivers: dcp: add DCP support
The Data Co-Processor (DCP) provides hardware acceleraiton for cryptographic algorithms. The features of DCP are: - AES128 ECB and CBC - SHA1, SHA256 - AES128-CMAC a
drivers: dcp: add DCP support
The Data Co-Processor (DCP) provides hardware acceleraiton for cryptographic algorithms. The features of DCP are: - AES128 ECB and CBC - SHA1, SHA256 - AES128-CMAC algorithm - SRAM key storage - HUK generation
This driver adds DCP support for the following platforms: - imx6slevk - imx6sllevk - imx6ullevk - imx6ulzevk
Signed-off-by: Remi Koman <remi.koman@nxp.com> Signed-off-by: Clement Faure <clement.faure@nxp.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| ce97b399 | 12-Jun-2020 |
Clement Faure <clement.faure@nxp.com> |
drivers: csu: enable DCP protection
Enable DCP protection in the CSU for the following platforms: - imx6slevk - imx6sllevk - imx6ullevk - imx6ulzevk
Signed-off-by: Clement Faure <clement.fa
drivers: csu: enable DCP protection
Enable DCP protection in the CSU for the following platforms: - imx6slevk - imx6sllevk - imx6ullevk - imx6ulzevk
Signed-off-by: Clement Faure <clement.faure@nxp.com> Acked-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| ec64f5ab | 16-Jul-2020 |
Clement Faure <clement.faure@nxp.com> |
core: add dcache_get_line_size() function
Add dcache_get_line_size() function to get cache line size for ARM32 and ARM64 platforms.
Signed-off-by: Clement Faure <clement.faure@nxp.com> Reviewed-by:
core: add dcache_get_line_size() function
Add dcache_get_line_size() function to get cache line size for ARM32 and ARM64 platforms.
Signed-off-by: Clement Faure <clement.faure@nxp.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| d73a6eb3 | 09-Feb-2021 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: clarify tlbi_mva_range()
Clarifies tlbi_mva_range() with a full description of the interface at the declaration of the function. The supplied VA range must be aligned on the supplied granulari
core: clarify tlbi_mva_range()
Clarifies tlbi_mva_range() with a full description of the interface at the declaration of the function. The supplied VA range must be aligned on the supplied granularity.
The implementation is updated to take full advantage of this restriction together with an additional assert.
Reviewed-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 89739a90 | 09-Feb-2021 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: remove deprecated core_tlb_maintenance()
Removes the deprecated and unused function core_tlb_maintenance().
Reviewed-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander
core: remove deprecated core_tlb_maintenance()
Removes the deprecated and unused function core_tlb_maintenance().
Reviewed-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 1c2924e5 | 04-Feb-2021 |
Sahil Malhotra <sahil.malhotra@nxp.com> |
core: ls: lx2160aqds: get GIC base address from dtb
CFG_EMBED_DT option is enabled by default for LX2160A-QDS GIC base address was hardcoded for LX2160A-QDS, now will get the base address from dtb f
core: ls: lx2160aqds: get GIC base address from dtb
CFG_EMBED_DT option is enabled by default for LX2160A-QDS GIC base address was hardcoded for LX2160A-QDS, now will get the base address from dtb file.
Signed-off-by: Sahil Malhotra <sahil.malhotra@nxp.com> Acked-by: Jerome Forissier <jerome@forissier.org>
show more ...
|
| 9b4c50be | 04-Feb-2021 |
Sahil Malhotra <sahil.malhotra@nxp.com> |
core: dts: add DTS files for LX2160A-RDB
Add dts file for LX2160A-QDS Platform.
Signed-off-by: Sahil Malhotra <sahil.malhotra@nxp.com> Acked-by: Jerome Forissier <jerome@forissier.org> |
| 1a121401 | 03-Jun-2020 |
Manish Tomar <manish.tomar@nxp.com> |
core: ls: add LX2160A-QDS platform
Add support for Layerscape® LX2160A-QDS from NXP. Dynamic shared memory is also enabled.
Signed-off-by: Manish Tomar <manish.tomar@nxp.com> Signed-off-by: Sahil M
core: ls: add LX2160A-QDS platform
Add support for Layerscape® LX2160A-QDS from NXP. Dynamic shared memory is also enabled.
Signed-off-by: Manish Tomar <manish.tomar@nxp.com> Signed-off-by: Sahil Malhotra <sahil.malhotra@nxp.com> Acked-by: Jerome Forissier <jerome@forissier.org>
show more ...
|
| a10b1b23 | 03-Feb-2021 |
Sahil Malhotra <sahil.malhotra@nxp.com> |
core: ls: lx2160ardb: get GIC base address from dtb
CFG_EMBED_DT option is enabled by default for LX2160A-RDB GIC base address was hardcoded for LX2160A-RDB, now will get the base address from dtb f
core: ls: lx2160ardb: get GIC base address from dtb
CFG_EMBED_DT option is enabled by default for LX2160A-RDB GIC base address was hardcoded for LX2160A-RDB, now will get the base address from dtb file.
Signed-off-by: Sahil Malhotra <sahil.malhotra@nxp.com> Acked-by: Jerome Forissier <jerome@forissier.org>
show more ...
|
| 04f3ad1b | 22-May-2020 |
Ruchika Gupta <ruchika.gupta@nxp.com> |
core: ls: Remove GIC initialization for ARM-TF based platforms
On ARMv8, GIC configuration is initialized in ARM-TF
Signed-off-by: Ruchika Gupta <ruchika.gupta@nxp.com> Signed-off-by: Sahil Malhotr
core: ls: Remove GIC initialization for ARM-TF based platforms
On ARMv8, GIC configuration is initialized in ARM-TF
Signed-off-by: Ruchika Gupta <ruchika.gupta@nxp.com> Signed-off-by: Sahil Malhotra <sahil.malhotra@nxp.com> Acked-by: Jerome Forissier <jerome@forissier.org>
show more ...
|
| 49687a34 | 08-May-2020 |
Sahil Malhotra <sahil.malhotra@nxp.com> |
core: dts: add DTS files for LX2160A-RDB
LX2160A-RDB will be compiled with Embedded DTB support. Add dts file for LX2160A-RDB Platform.
Signed-off-by: Sahil Malhotra <sahil.malhotra@nxp.com> Acked-
core: dts: add DTS files for LX2160A-RDB
LX2160A-RDB will be compiled with Embedded DTB support. Add dts file for LX2160A-RDB Platform.
Signed-off-by: Sahil Malhotra <sahil.malhotra@nxp.com> Acked-by: Jerome Forissier <jerome@forissier.org>
show more ...
|
| a8a14b78 | 24-Apr-2020 |
Ruchika Gupta <ruchika.gupta@nxp.com> |
core: ls: lx2160ardb: Add regions for dynamic shared memory
To enable use of dynamic shared memory, DDR regions need to be added in the platform MMU map.
Signed-off-by: Ruchika Gupta <ruchika.gupta
core: ls: lx2160ardb: Add regions for dynamic shared memory
To enable use of dynamic shared memory, DDR regions need to be added in the platform MMU map.
Signed-off-by: Ruchika Gupta <ruchika.gupta@nxp.com> Signed-off-by: Sahil Malhotra <sahil.malhotra@nxp.com> Acked-by: Jerome Forissier <jerome@forissier.org>
show more ...
|
| e989a6c4 | 01-Feb-2021 |
Sahil Malhotra <sahil.malhotra@nxp.com> |
console: lx2160A: fix uart clock and baud rate
Currently there are garbled messages from OP-TEE due to assumption that platform clock is always 700MHz. This is not correct as LX2 supports variable p
console: lx2160A: fix uart clock and baud rate
Currently there are garbled messages from OP-TEE due to assumption that platform clock is always 700MHz. This is not correct as LX2 supports variable platform frequency. It could be one of the 600, 650, 700, 750 Mhz based on the RCW configuration.
Ideally OPTEE should read RCW registers from Global Utilities Register block and derive the uart clock based on platform pll frequency. But there is no need for this as Baud Rate is already configured in PL011 by the previous boot stages in TF-A. This fix calls pl011_init() with zero for baud rate => It won't be reinitalized in OP-TEE.
Signed-off-by: Thirupathaiah Annapureddy <thiruan@linux.microsoft.com> Signed-off-by: Sahil Malhotra <sahil.malhotra@nxp.com> Acked-by: Jerome Forissier <jerome@forissier.org>
show more ...
|
| df580f57 | 04-Feb-2021 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: fix icache_inv_user_range()
Prior to this patch with CFG_WITH_PAGER=y, CFG_WITH_LPAE=y and CFG_CORE_UNMAP_CORE_AT_EL0=n icache_inv_user_range() crashes with a prefetch abort due to TTBR0 being
core: fix icache_inv_user_range()
Prior to this patch with CFG_WITH_PAGER=y, CFG_WITH_LPAE=y and CFG_CORE_UNMAP_CORE_AT_EL0=n icache_inv_user_range() crashes with a prefetch abort due to TTBR0 being configured with an invalid value. This happens due to an error in the ifdef logic using an uninitialized register.
Fix this by using the correct register.
Fixes: c4a57390edef ("core: pager: use icache_inv_user_range()") Reviewed-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| ae2a9cfc | 15-Oct-2020 |
Jorge Ramirez-Ortiz <jorge@foundries.io> |
core: fix shared memory buffer rpc allocation
When dynamic shared memory has been configured, contiguous shared memory regions outside reserved SHM need to be included in the allocation pool.
To ke
core: fix shared memory buffer rpc allocation
When dynamic shared memory has been configured, contiguous shared memory regions outside reserved SHM need to be included in the allocation pool.
To keep the implementation simple, we will restrict the size of these allocations to a single page; we can then leverage the mechanism used for the allocation of arguments.
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 9ebe34b0 | 26-Jan-2021 |
Volodymyr Babchuk <volodymyr_babchuk@epam.com> |
link: make section size definitions relocation-proof
Value of define VCORE_UNPG_RW_SZ is determined by linker script and provided to C code as a symbol value (__vcore_unpg_rw_size). This is a standa
link: make section size definitions relocation-proof
Value of define VCORE_UNPG_RW_SZ is determined by linker script and provided to C code as a symbol value (__vcore_unpg_rw_size). This is a standard way of sharing linker variables with C code, which is described in ld manual.
Problem is that linker sometimes makes those symbols relocatable and ASLR code then moves them to random places with rest of the OP-TEE image.
For example, on build for RCAR platform I am getting those entries in relocation section:
[...] 000000004415b120 R_AARCH64_RELATIVE *ABS*+0x0000000044100180 000000004415af60 R_AARCH64_RELATIVE *ABS*+0x000000004415fc48 000000004415afb0 R_AARCH64_RELATIVE *ABS*+0x00000000000a4000 <====== 000000004415aef8 R_AARCH64_RELATIVE *ABS*+0x000000004415c000 [...]
From programmer's point of view this looks like "constant" VCORE_UNPG_RW_SZ has random value every boot.
Obvious approach is to provide section end address and then calculate size on C side:
#define VCORE_UNPG_RW_SZ ((size_t)(__vcore_unpg_rx_end - __vcore_unpg_rx_start))
But with this approach compiler can't initialize constant values in definitions like
register_phys_mem_ul(MEM_AREA_TEE_RAM_RW, VCORE_UNPG_RW_PA, VCORE_UNPG_RW_SZ);
from core_mmu.c.
Basically, this leads to following constraints:
1. If we calculate section size in linker script, then compiler can use it as a constant expression, but this value may be mangled by ASLR at run-time.
2. We can't calculate section size in C code, because this value can't be used as a constant expression.
This patch provides a workaround around this issue by providing two sets of definitions: old _SZ definition is renamed to _SZ_UNSAFE and it should be used only in places where a constant expression is required and provided it is referenced only before dynamic relocations have been applied, while the new _SZ definition can be used in all other situations.
Value of _new SZ is obtained by deducting section start address from end address. Additional linker symbols are introduced to provide section end addresses.
Fixes: 170e9084a84f ("core: add support for CFG_CORE_ASLR") Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com> Reviewed-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 59ac3801 | 21-Dec-2020 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: split boot_init_primary()
Splits boot_init_primary() into boot_init_primary_early() and boot_init_primary_late(). The thread#0 stack pointer is assigned as stack pointer before boot_init_prima
core: split boot_init_primary()
Splits boot_init_primary() into boot_init_primary_early() and boot_init_primary_late(). The thread#0 stack pointer is assigned as stack pointer before boot_init_primary_late() is called. This allows functions registered to be called by call_finalcalls() to depend on the full thread stack being available.
Acked-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 955968a8 | 13-Jan-2021 |
Michael Scott <mike@foundries.io> |
core: imx: remove security check for i.MX6DQ
Recent commit cfff3778dae0 ("core: imx: remove security check for i.MX6SDL") fixed an issue where i.MX6SDL SoC does not expose the security configuration
core: imx: remove security check for i.MX6DQ
Recent commit cfff3778dae0 ("core: imx: remove security check for i.MX6SDL") fixed an issue where i.MX6SDL SoC does not expose the security configuration in the HPSR registers correctly.
This issue also affects i.MX6DQ. Let's add a check for this SoC family in the same place.
Acked-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Acked-by: Clement Faure <clement.faure@nxp.com> Signed-off-by: Michael Scott <mike@foundries.io> Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
show more ...
|
| 7fb5f454 | 04-Jan-2021 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: remove temporary external DT mapping
During boot the external DT is mapped while processing the DT. Once OP-TEE is done with the DT it should be unmapped to avoid stale mappings that might cau
core: remove temporary external DT mapping
During boot the external DT is mapped while processing the DT. Once OP-TEE is done with the DT it should be unmapped to avoid stale mappings that might cause problems later. Fix this by calling core_mmu_rem_mapping() from release_external_dt() just before jumping to normal world.
Fixes: https://github.com/OP-TEE/optee_os/issues/4278 Reviewed-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| a499fe12 | 04-Jan-2021 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: ifdef frag_id member in struct dt_descriptor
The frag_id member in struct dt_descriptor is only used if CFG_EXTERNAL_DTB_OVERLAY is defined, so make it conditional.
Acked-by: Etienne Carriere
core: ifdef frag_id member in struct dt_descriptor
The frag_id member in struct dt_descriptor is only used if CFG_EXTERNAL_DTB_OVERLAY is defined, so make it conditional.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 507229d5 | 04-Jan-2021 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add core_mmu_remove_mapping()
Adds core_mmu_remove_mapping() which removes mappings earlier added with core_mmu_add_mapping().
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Acke
core: add core_mmu_remove_mapping()
Adds core_mmu_remove_mapping() which removes mappings earlier added with core_mmu_add_mapping().
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|