Age | Commit message (Collapse) | Author |
|
Moves some assembly routines into separate sections. This helps the garbage
collecting with the linker when separating what's must be unpaged from the
rest of the code. The garbage collector in the linker works on dependencies
between sections.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
|
|
Moves call to teecore_init_ta_ram() from init_teecore() to be called
directly from platform initialization routines. It's needed later when
the pager allocates secure DDR to store that backing pages. We don't want
to call init_teecore() until the pager is fully initialized because
init_teecore() pulls in many dependencies.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
|
|
* Implements a svc handler suitable to supply as a handler for
thread_svc_handler.
* Removes hardcoded call to tee_svc_sycall in
thread_svc_handler.
* Removes duplicated code for unwinding of stack after
tee_svc_enter_user_mode() replacing it with a single
tee_svc_unwind_enter_user_mode()
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU virt and FVP)
Reviewed-by: Etienne Carriere <etienne.carriere@st.com>
Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
Tested-by: Pascal Brand <pascal.brand@linaro.org> (STM platform)
|
|
* Moves bget to libutils replacing dlmalloc as kernel memory allocator
* Restores the code formatting of bget.{c,h} to the original state as
parts of the current code was unreadable
* Adds malloc_add_pool() to make use of previously unused memory
* Moves call to malloc_init() into platform specific code
* Restores MDBG into working condition
* Adds memalign function to bget.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU virt platform)
Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (FVP)
Reviewed-by: Etienne Carriere <etienne.carriere@st.com>
Tested-by: Pascal Brand <pascal.brand@linaro.org> (STM platform)
|
|
Signed-off-by: Pascal Brand <pascal.brand@st.com>
Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
|
|
Merges tee_core_trace.h and tee_uta_trace.h into a common trace.h
in libutil. Since the trace functions now resides libutil they have
to rely on core and libutee to provide functions to print to the
log device.
* Keeps compatible interface from tee_kta_trace.h
* Adds TAMSG() and TAMSG_RAW() to log TA related events
* Removes the TRACE_ALWAYS level
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU virt platform)
Reviewed-by: Etienne Carriere <etienne.carriere@st.com>
Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
Tested-by: Pascal Brand <pascal.brand@linaro.org> (STM platform)
|
|
Moves util.h from core into libutil to make it available anywhere.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@st.com>
|
|
Renames TEE_COMPILE_TIME_ASSERT to COMPILE_TIME_ASSERT, the
macro is also moved to assert.h to be available anywhere.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@st.com>
|
|
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
Tested-by: Pascal Brand <pascal.brand@linaro.org> (STM platform)
|
|
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU virt platform)
Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
|
|
Time initialization was performed in specific platform initialization
main_init_helper() function. It is now performed in the generic arm32
initialization init_teecore() function.
Signed-off-by: Pascal Brand <pascal.brand@st.com>
Reviewed-by: Joakim Bech joakim.bech@linaro.org
Reviewed-by: Jens Wiklander jens.wiklander@linaro.org
|
|
* Reenables warnings for all non-3rd party code
* Renames dprintf macro to dprintf_level
|
|
|
|
|
|
|
|
Fixes a number of build errors when 'PLATFORM=vexpress' and 'DEBUG=':
- '<var> may be used uninitialized'
- 'dereferencing type-punned pointer will break strict-aliasing rules'
This one is addressed by adding -fno-strict-aliasing to the cflags for the
problematic files, which is a temporary solution.
- 'inlining failed'
Also, make sure tee_svc_syscall_table is aligned on a 32-bit boundary.
Otherwise, an alignment fault might occur:
ERR [0x0] TEE-CORE:tee_pager_print_error_abort:101: data-abort at 0x602f16b
FSR 0x1 PC 0x6007bd4 TTBR0 0x603804A CONTEXIDR 0x1
CPUID 0x80000001 DBGPCSR 0x0 CPSR 0x80000013 (read from SPSR)
ERR [0x0] TEE-CORE:tee_pager_handle_abort:164: [TEE_PAGER] alignement fault! (trap CPU)
Note: on Foundation_v8, I measured a ~3x speedup between debug and non-debug
builds for asymmetric crypto tests.
|
|
Before this patch: The normal world was only allowed to enter
secure world with one thread at a time.
After this patch: The normal world may try to enter secure world
with as many threads as it likes, secure world will return busy
when no more threads can be allowed. Secure world still only allows
one active thread at a time, but during RPC another thread may enter
and do some work. This is needed for cancellation to work.
* Adds a mutex that waits in normal world if busy
* Adds a new RPC service to wait in normal world
* Imports bitstring.h from FreeBSD to aid mutex implementation
* Adds a critical section in tee_ta_init_session
* Unmaps TA before RPC exit and maps it again on return to handle
rescheduling of threads during RPC
* Doesn't clear a1-a3 when returning busy
* Bugfixes vector_std_smc_entry
This patch depends on the "Allow parallel entries to secure world"
patch in optee_linuxdriver.
|
|
|
|
This concerns:
- Communication Non-Secure <--> Secure
- sys/types.h contains some types not defined on all compilers
Signed-off-by: Pascal Brand <pascal.brand@st.com>
|
|
* Initial support for Versatile Express of FVP with ARM Trusted
Firmware (ATF below)
* Use entry vector for entering TEE
Align interface between TEE and secure monitor with the interface
between OPTEED in ATF and TEE.
Uses an ATF compatible entry vector for entering TEE from internal
secure monitor.
Internal secure monitor saves entry reason to be able to tell when
switching back to nonsecure world if r0-r3 should be preserved (FIQ case)
or returned as is (normal call case).
* Many small fixes of generic problems that could affect other platforms
too.
* Disable unaligned data accesses by adding compiler flag
-mno-unaligned-access
* Adds support for Versatile Express of QEMU with 8 MiB of secure DRAM
|
|
Signed-off-by: Pascal Brand <pascal.brand@st.com>
|