| bdc1a182 | 11-Aug-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
core: link.mk: force link of tee.elf when object list has changed
Since the parent commit ("Add support for early Trusted Applications"), the link step of tee.elf may pull object files generated fro
core: link.mk: force link of tee.elf when object list has changed
Since the parent commit ("Add support for early Trusted Applications"), the link step of tee.elf may pull object files generated from Trusted Application binaries. This is controlled by $(EARLY_TA_PATHS). Adding or removing files should cause tee.elf to be re-linked, even when no re-compilation or change in the configuration variables occur. This is not the case currently. For example: $ make EARLY_TA_PATHS="a.elf b.elf" $ make EARLY_TA_PATHS="a.elf" # Should re-link without b.elf
The link recipe is modified so that the link step is forced when the object list changes.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| d0c63614 | 25-Jul-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
Add support for early Trusted Applications
Early TAs are user-mode Trusted Applications that are embedded at link time in the TEE binary. A special read-only data section is used to store them (.rod
Add support for early Trusted Applications
Early TAs are user-mode Trusted Applications that are embedded at link time in the TEE binary. A special read-only data section is used to store them (.rodata.early_ta). A Python script takes care of converting the TAs into a C source file with the proper linker section attribute.
The feature is disabled by default. To enable it, the paths to the TA binaries have to be given in $(EARLY_TA_PATHS). They should be ELF files. Typical build steps: $ make ... CFG_EARLY_TA=y ta_dev_kit # (1) $ # ... build the TAs ... # (2) $ make ... EARLY_TA_PATHS=path/to/<uuid>.stripped.elf # (3) Notes: - Setting CFG_EARLY_TA=y during the first step (1) is not necessary, but it will avoid rebuilding libraries during the third step (3) - CFG_EARLY_TA is automatically enabled when EARLY_TA_PATHS is non-empty in step (3) - Several TAs may be given in $(EARLY_TA_PATHS) (3)
Early TAs are given a higher load priority than REE FS TAs, since they should be available even before tee-supplicant is ready.
Suggested-by: Zeng Tao <prime.zeng@hisilicon.com> Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 23346f16 | 27-Jul-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
Add support for several user TA stores
Replace the pointer to the user-mode TA load operations with a list so that several implementations may be used simultaneously. Each store has its own priority
Add support for several user TA stores
Replace the pointer to the user-mode TA load operations with a list so that several implementations may be used simultaneously. Each store has its own priority. Make tee_ta_init_user_ta_session() iterate on the list and stop as soon as a matching TA is found. This is preparatory work for the introduction of a new TA store.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 6076de2c | 27-Jul-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
Add description string to user_ta_store_ops
In preparation for the introduction of a new TA store type, add a description string to the user_ta_store_ops structure and print it when a user-mode TA i
Add description string to user_ta_store_ops
In preparation for the introduction of a new TA store type, add a description string to the user_ta_store_ops structure and print it when a user-mode TA is being loaded.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 5b2fecf1 | 27-Jul-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
Remove leading spaces and dots in DMSG() messages
Some debug messages have various amounts of leading spaces and dots (.) probably in an attempt to better align the text. It is unreliable because de
Remove leading spaces and dots in DMSG() messages
Some debug messages have various amounts of leading spaces and dots (.) probably in an attempt to better align the text. It is unreliable because debug traces include function names and line numbers, which introduce random offsets. Remove these characters.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| f147124e | 26-Jul-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
core/sub.mk: add missing dependency on the TA key processing script
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by:
core/sub.mk: add missing dependency on the TA key processing script
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 2fcf4eaa | 22-Aug-2017 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: fix unwind in PSCI
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> |
| 67a1725b | 11-Jul-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add matches operation to mobj_paged_ops
Adds the matches operation to mobj_paged_ops in order to correctly classify paged MOBJs.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Te
core: add matches operation to mobj_paged_ops
Adds the matches operation to mobj_paged_ops in order to correctly classify paged MOBJs.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| de0413e2 | 11-Jul-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add matches operation to mobj_reg_shm_ops
Adds the matches operation to mobj_reg_shm_ops in order to correctly classify reg_shm MOBJs.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.o
core: add matches operation to mobj_reg_shm_ops
Adds the matches operation to mobj_reg_shm_ops in order to correctly classify reg_shm MOBJs.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 4e07a7b1 | 11-Aug-2017 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: fix memory address comparison
Addresses are unsigned values. Subtracting address values results in an unsigned value. Since qsort comparison function expects a signed integer return value, the
core: fix memory address comparison
Addresses are unsigned values. Subtracting address values results in an unsigned value. Since qsort comparison function expects a signed integer return value, the unsigned address subtraction value gets signed and can produce a wrong result. This change overcomes the issue by producing a +1/0/-1 signed value based on the address unsigned values comparison.
Introduce CMP_TRILEAN() in util.h to implement the operation.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Tested-by: Etienne Carriere <etienne.carriere@linaro.org> (b2260) Reviewed-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 2e4e94bf | 16-Aug-2017 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: default enable program flow prediction on ARMv7 cores
Introduce CFG_ENABLE_SCTLR_Z to enable SCTLR[Z] from the generic boot. SCTLR[Z] enables program flow prediction support from the core.
Ea
core: default enable program flow prediction on ARMv7 cores
Introduce CFG_ENABLE_SCTLR_Z to enable SCTLR[Z] from the generic boot. SCTLR[Z] enables program flow prediction support from the core.
Early branch prediction may be unsafe against uncontrolled memory prefetches that could hit some hard memory access control firewalls. It is usually safer to enable after the mmu is enabled.
CFG_ENABLE_SCTLR_Z allows to use vanilla op-tee on development board to exercises benchmark and performance tests over the op-tee system.
This feature is no expected on ARMv8 architectures and some recent ARMv7 architectures since program flow prediction enable is tight to mmu enable.
Suggested-by: Jangseop Shin <jsshin@sor.snu.ac.kr> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 6a55dc21 | 16-Aug-2017 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: clarify SCTLR initialization in 32bit mode.
Synchronize SCTLR init for primary cold boot and secondary cpu on through the use of the macro 'set_sctlr' in generic_entry_a32.S.
Update STCLR ini
core: clarify SCTLR initialization in 32bit mode.
Synchronize SCTLR init for primary cold boot and secondary cpu on through the use of the macro 'set_sctlr' in generic_entry_a32.S.
Update STCLR init to enforce TE=0 (exceptions in ARM mode) and M=0 (mmu off).
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 909cd817 | 16-Aug-2017 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: default enable CFG_ENABLE_SCTLR_RR for some ARMv7 cores
Some platforms could benefit from CFG_ENABLE_SCTLR_RR according to their current implementation.
Updated platforms are stm-(cannes2|b22
core: default enable CFG_ENABLE_SCTLR_RR for some ARMv7 cores
Some platforms could benefit from CFG_ENABLE_SCTLR_RR according to their current implementation.
Updated platforms are stm-(cannes2|b2260), several mx6-*sabre* mx6-(qsabrelite|qsabresd|dlsabresd) (CFG_MX6Q/_MX6D/_MX6DL/_MX6S) and zynq-zc702.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| f460af34 | 16-Aug-2017 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: introduce CFG_ENABLE_SCTLR_RR for ARMv7 cores
CFG_ENABLE_SCTLR_RR to enable SCTLR[RR] from the generic boot. SCTLR[RR] enables the round robin replacement strategy for the several caches (icac
core: introduce CFG_ENABLE_SCTLR_RR for ARMv7 cores
CFG_ENABLE_SCTLR_RR to enable SCTLR[RR] from the generic boot. SCTLR[RR] enables the round robin replacement strategy for the several caches (icache, dcache, btac, tlb).
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| d0394fd0 | 16-Aug-2017 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: move plat_cpu_reset_early before SCTLR generic inits
Prior this change, some plat_cpu_reset_early() implementation discarded the generic effect of CFG_SCTLR_ALIGNMENT_CHECK or execute-never su
core: move plat_cpu_reset_early before SCTLR generic inits
Prior this change, some plat_cpu_reset_early() implementation discarded the generic effect of CFG_SCTLR_ALIGNMENT_CHECK or execute-never support.
To overcome the issue, call plat_cpu_reset_early() before generic init of SCTLR.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 110da4bc | 26-Jul-2017 |
Joseph Chen <chenjh@rock-chips.com> |
plat-rockchip: rk322x: add PSCI system suspend
Support gating clks and power down PLLs.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> A
plat-rockchip: rk322x: add PSCI system suspend
Support gating clks and power down PLLs.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 1032b987 | 26-Jul-2017 |
Joseph Chen <chenjh@rock-chips.com> |
plat-rockchip: rk322x: add PSCI features
Add currently implemented PSCI functions.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-
plat-rockchip: rk322x: add PSCI features
Add currently implemented PSCI functions.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| f1ecb128 | 26-Jul-2017 |
Joseph Chen <chenjh@rock-chips.com> |
plat-rockchip: rk322x: add PSCI version
Improve PSCI version to PSCI_VERSION_1_0.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-b
plat-rockchip: rk322x: add PSCI version
Improve PSCI version to PSCI_VERSION_1_0.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 81637626 | 10-Jul-2017 |
Joseph Chen <chenjh@rock-chips.com> |
core: arm: sm: add PSCI system suspend
Add __weak property for the function, developers could have their own implementation.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com> Acked-by: Jerome Fori
core: arm: sm: add PSCI system suspend
Add __weak property for the function, developers could have their own implementation.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 7fd0f4bf | 18-Aug-2017 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: fix overlapping conditions of pagestore load areas
This change copies pagestore remaining part first, from any location to its target destination before copying pagestore init part to target d
core: fix overlapping conditions of pagestore load areas
This change copies pagestore remaining part first, from any location to its target destination before copying pagestore init part to target destination. This prevents pagestore init copy to corrupt pagestore remaining part at the location where bootloader loaded it.
As bootloader can load pagestore data anywhere in RAM, it is possible that it loads it into an area overlapping with the area allocated by the core to store effective pagestore. To prevent this, use memmove() to copy the data instead of memcpy().
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 935ac3ec | 11-Jul-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: arm32: handle aborts in system mode
Switch to handle aborts in system mode in order to be able to give a stack trace in case an abort occurs in the abort handler.
In a manner similar to the A
core: arm32: handle aborts in system mode
Switch to handle aborts in system mode in order to be able to give a stack trace in case an abort occurs in the abort handler.
In a manner similar to the AArch64 implementation are abort and undef mode stack pointers pointing to the struct thread_core_local of corresponding cpu.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 0073c9a8 | 05-Jul-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: pager: optimize tee_pager_handle_fault()
Optimizes tee_pager_handle_fault() by using ICACHE_AREA_INVALIDATE instead of ICACHE_INVALIDATE.
Reviewed-by: Etienne Carriere <etienne.carriere@linar
core: pager: optimize tee_pager_handle_fault()
Optimizes tee_pager_handle_fault() by using ICACHE_AREA_INVALIDATE instead of ICACHE_INVALIDATE.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Tested-by: Etienne Carriere <etienne.carriere@linaro.org> (b2260) Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (Hikey) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 84c40296 | 30-Jun-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: pager: remove unneeded tlb invalidation
Removes one unneeded tlb invalidation when unhiding a page. Since the page was hidden there's no valid mapping for that entry and tlb entries can't have
core: pager: remove unneeded tlb invalidation
Removes one unneeded tlb invalidation when unhiding a page. Since the page was hidden there's no valid mapping for that entry and tlb entries can't have been created.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (Hikey AArch{32,64} pager) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 39386844 | 23-Jul-2017 |
Peng Fan <peng.fan@nxp.com> |
core: arm: mmu: enable MEM_AREA_TEE_COHERENT
Enable MEM_AREA_TEE_COHERENT with attribute setting to SECURE/PRWX/NONCACHE.
Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Jens Wiklander <jen
core: arm: mmu: enable MEM_AREA_TEE_COHERENT
Enable MEM_AREA_TEE_COHERENT with attribute setting to SECURE/PRWX/NONCACHE.
Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 70baf8d6 | 04-Jul-2017 |
Igor Opaniuk <igor.opaniuk@linaro.org> |
benchmark: fix core data-abort at address 0x0
Issue reproduces with enabled CFG_TEE_BENCHMARK and in case when registration of benchmark timestamp buffer failes or isn't performed (in case if any CA
benchmark: fix core data-abort at address 0x0
Issue reproduces with enabled CFG_TEE_BENCHMARK and in case when registration of benchmark timestamp buffer failes or isn't performed (in case if any CA is invoked directly, without using benchmark CA)
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Igor Opaniuk <igor.opaniuk@linaro.org>
show more ...
|