| #
ba2a6adb |
| 02-Jun-2023 |
Alvin Chang <alvinga@andestech.com> |
ldelf: Add TA stack trace for RISC-V architecture
Implement ta_elf_stack_trace_riscv() to unwind the stack of TA. Also the RISC-V architecture string of TA ELF is added into dump information.
Signe
ldelf: Add TA stack trace for RISC-V architecture
Implement ta_elf_stack_trace_riscv() to unwind the stack of TA. Also the RISC-V architecture string of TA ELF is added into dump information.
Signed-off-by: Alvin Chang <alvinga@andestech.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Marouene Boubakri <marouene.boubakri@nxp.com> Reviewed-by: Marouene Boubakri <marouene.boubakri@nxp.com>
show more ...
|
| #
af78e1b1 |
| 24-Oct-2022 |
Imre Kis <imre.kis@arm.com> |
ldelf: Provide access to TS load address
Propagate ELF load address from ldelf to user mode context as a preparation for load address relative memory regions.
Signed-off-by: Imre Kis <imre.kis@arm.
ldelf: Provide access to TS load address
Propagate ELF load address from ldelf to user mode context as a preparation for load address relative memory regions.
Signed-off-by: Imre Kis <imre.kis@arm.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
cb5f271c |
| 01-Feb-2023 |
Marouene Boubakri <marouene.boubakri@nxp.com> |
core, ldelf: replace is_arm32 with is_32bit
To refer to 32-bit mode, this commit replace is_arm32 with is_32bit in the following files: - core/kernel/ldelf_loader.c - ldelf/include/ldelf.h - ldelf/m
core, ldelf: replace is_arm32 with is_32bit
To refer to 32-bit mode, this commit replace is_arm32 with is_32bit in the following files: - core/kernel/ldelf_loader.c - ldelf/include/ldelf.h - ldelf/main.c
Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| #
4e994fd8 |
| 19-Jan-2021 |
Jelle Sels <jelle.sels@arm.com> |
core: Rename abort_print_current_ta
Rename abort_print_current_ta to abort_print_current_ts as it is used by both SPs and TAs.
Signed-off-by: Jelle Sels <jelle.sels@arm.com> Reviewed-by: Jens Wikla
core: Rename abort_print_current_ta
Rename abort_print_current_ta to abort_print_current_ts as it is used by both SPs and TAs.
Signed-off-by: Jelle Sels <jelle.sels@arm.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
0e7c71e1 |
| 21-Jul-2020 |
Jerome Forissier <jerome@forissier.org> |
ldelf: increase heap size from 12 to 16 KiB
Preparing for C++ support in TAs.
The current ldelf heap is barely sufficient to run some tests such as xtest 1022 (dlopen()) when CFG_ULIBS_SHARED=y. If
ldelf: increase heap size from 12 to 16 KiB
Preparing for C++ support in TAs.
The current ldelf heap is barely sufficient to run some tests such as xtest 1022 (dlopen()) when CFG_ULIBS_SHARED=y. If slightly larger section headers are present (such as when introducing Thread Local Storage tests, needed for C++), the heap becomes too small and the TA fails to load.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
099918f6 |
| 05-Sep-2019 |
Sumit Garg <sumit.garg@linaro.org> |
ftrace: Add support for syscall function tracer
This patch adds support for syscall tracing in TEE core. It complements existing ftrace support for user TAs via adding trace for syscalls that are in
ftrace: Add support for syscall function tracer
This patch adds support for syscall tracing in TEE core. It complements existing ftrace support for user TAs via adding trace for syscalls that are invoked by user TAs into the TEE core.
And after this patch ftrace will cover both TA and TEE core code. So lets rename config option from CFG_TA_FTRACE_SUPPORT to CFG_FTRACE_SUPPORT.
It is optional to enable syscall trace via CFG_SYSCALL_FTRACE=y config option in addition to CFG_FTRACE_SUPPORT=y config option.
Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Reviewed-by: Jerome Forissier <jerome@forissier.org>
show more ...
|
| #
0c76446c |
| 07-Oct-2019 |
Jerome Forissier <jerome@forissier.org> |
ldelf: increase heap size from 8 to 12 KiB
The ldelf heap is not big enough to load some 64-bit TAs with several shared libraries such as xtest 1006 when CFG_ULIBS_SHARED=y:
* regression_1006 Test
ldelf: increase heap size from 8 to 12 KiB
The ldelf heap is not big enough to load some 64-bit TAs with several shared libraries such as xtest 1006 when CFG_ULIBS_SHARED=y:
* regression_1006 Test Basic OS features E/LD: copy_section_headers:766 malloc E/TC:? 0 init_with_ldelf:229 ldelf failed with res: 0xffff000c E/TC:? 0 tee_ta_open_session:727 Failed. Return error 0xffff000c regression_1006 FAILED
Signed-off-by: Jerome Forissier <jerome@forissier.org> Acked-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
ebef121c |
| 01-Aug-2019 |
Jerome Forissier <jerome.forissier@linaro.org> |
core, ldelf: add support for runtime loading of shared libraries
This commit prepares the introduction of libdl, a dynamic linking library which will allow TAs to load shared libraries at run time,
core, ldelf: add support for runtime loading of shared libraries
This commit prepares the introduction of libdl, a dynamic linking library which will allow TAs to load shared libraries at run time, and resolve symbols on demand. It adds the following function to the system PTA, inspired from the POSIX dlopen() and dlsym():
- system_dlopen(): takes a UUID and flags. Performs an upcall into ldelf which then uses the usual system PTA functions to load an map the requested library into the address space of the calling TA. - system_dlsym(): takes a UUID and a symbol name. The symbol is looked up in the library specified by UUID by calling into ldelf. If UUID is all zeros, all the mapped binaries are searched.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
f90488af |
| 09-Jul-2019 |
Sumit Garg <sumit.garg@linaro.org> |
ldelf: ftrace: pass ftrace buffer address to kernel
Enable support to pass ftrace buffer address to kernel during loading of particular TA. It is required to support function execution time feature
ldelf: ftrace: pass ftrace buffer address to kernel
Enable support to pass ftrace buffer address to kernel during loading of particular TA. It is required to support function execution time feature since kernel needs to update timestamps in ftrace buffer during TA suspends for proper execution time.
Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
c35dfd95 |
| 30-Jul-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
ldelf: accurate non-legacy TA check
Prior to this patch ldelf relied on e_entry in the ELF header to point anywhere but at the lowest possible executable address to tell that it's not a legacy TA. T
ldelf: accurate non-legacy TA check
Prior to this patch ldelf relied on e_entry in the ELF header to point anywhere but at the lowest possible executable address to tell that it's not a legacy TA. This isn't enough since all TAs can use this entry address depending on compiler and linker. The only reliable indicator that the TA is not a legacy TA is that the depr_entry field of the TA header is UINT64_MAX. Unfortunately this means assuming that the ELF is not a legacy TA at load time and that the process needs to be restarted in case it turns out that it was a legacy TA.
With this patch we have reliable detection of non-legacy TAs, but with increased load time for legacy TAs since the main ELF needs to be loaded and verified twice due to the TA store interface.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
c86f218c |
| 18-Jun-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
ldelf: support TA ftrace
Adds support in ldelf to dump ftrace data.
Reviewed-by: Sumit Garg <sumit.garg@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wikl
ldelf: support TA ftrace
Adds support in ldelf to dump ftrace data.
Reviewed-by: Sumit Garg <sumit.garg@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
0242833a |
| 23-May-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
ldelf: support dumping TA call stack
Adds support in ldelf to dump the call stack of the TA.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@l
ldelf: support dumping TA call stack
Adds support in ldelf to dump the call stack of the TA.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
65137432 |
| 23-May-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
ldelf: support dumping memory map
Adds support in ldelf to dump memory maps.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
|
| #
7509ff7c |
| 23-May-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
Add user mode ELF loader
Adds ldelf which loads user mode TAs while in user mode. The TA ELF file is loaded and relocated by ldelf before the TA can be executed.
Reviewed-by: Jerome Forissier <jero
Add user mode ELF loader
Adds ldelf which loads user mode TAs while in user mode. The TA ELF file is loaded and relocated by ldelf before the TA can be executed.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|