| 1cab7c32 | 19-Jun-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: ubsan: fix __ubsan_handle_nonnull_arg()
Fixes error: core/kernel/ubsan.c:114:6: error: conflicting types for built-in function '__ubsan_handle_nonnull_arg' [-Werror] void __ubsan_handle_nonnu
core: ubsan: fix __ubsan_handle_nonnull_arg()
Fixes error: core/kernel/ubsan.c:114:6: error: conflicting types for built-in function '__ubsan_handle_nonnull_arg' [-Werror] void __ubsan_handle_nonnull_arg(struct nonnull_arg_data *data, size_t arg_no); ^~~~~~~~~~~~~~~~~~~~~~~~~~ core/kernel/ubsan.c:229:6: error: conflicting types for built-in function '__ubsan_handle_nonnull_arg' [-Werror] void __ubsan_handle_nonnull_arg(struct nonnull_arg_data *data, ^~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors
When compiling with gcc 6.2.1
For the record: with GCC 6.0.0 __ubsan_handle_nonnull_arg() was changed to take only one argument.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 50f24313 | 07-Mar-2017 |
Volodymyr Babchuk <vlad.babchuk@gmail.com> |
msg_param: add msg_param.c with helper functions
This patch adds various helper functions to manipulate with parameters passed to/from normal world.
Also it introduces new optee_param type which is
msg_param: add msg_param.c with helper functions
This patch adds various helper functions to manipulate with parameters passed to/from normal world.
Also it introduces new optee_param type which is used to pass long lists of parameters.
Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (Hikey)
show more ...
|
| f9a64f12 | 01-Jun-2017 |
Zeng Tao <prime.zeng@hisilicon.com> |
core: fix the keepalive condition in close session
According to the The GP Internal Core API v1.1: The keepalive flag should be ignored when the single instance flag is not set.
Reviewed-by: Jens W
core: fix the keepalive condition in close session
According to the The GP Internal Core API v1.1: The keepalive flag should be ignored when the single instance flag is not set.
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Zeng Tao <prime.zeng@hisilicon.com>
show more ...
|
| bce4951c | 02-Jun-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add linker.h for link script symbols
Moves all core extern declarations of linker script symbols into <kernel/linker.h>.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off
core: add linker.h for link script symbols
Moves all core extern declarations of linker script symbols into <kernel/linker.h>.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 23660121 | 08-Mar-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
core: remove __early_bss
Initialize the .bss section early from assembler before entering C code. As a result, the __early_bss qualifier is not needed anymore. Remove it, as well as the related symb
core: remove __early_bss
Initialize the .bss section early from assembler before entering C code. As a result, the __early_bss qualifier is not needed anymore. Remove it, as well as the related symbols (__early_bss_start and __early_bss_end).
This makes the code simpler hence easier to maintain, at the expense of initialization time, since .bss is cleared before CPU caches are turned on (and doing it later would mean some C function have been called already). Here are some performance numbers measured on HiKey. The "memset" column measures the time it takes to clear .bss in C, without this patch. The "assembly" column reports the time taken by the clear_bss loop in this patch. Timings were performed using CNTPCT. Worst case is a ~1 ms overhead in boot time.
memset(): | assembly: ms (bytes) | ms (bytes) --------------+-------------- Aarch64 0.30 (72824) | 0.08 (73528) Aarch32 0.27 (65016) | 1.24 (65408) Aarch32/pager 0.03 (11328) | 0.23 (11736)
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (QEMU) Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey 32/64) Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey/pager) Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 159cc1f3 | 24-May-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: set_invoke_timeout() use ADD_OVERFLOW()
Replaces the integer overflow checks in set_invoke_timeout() with ADD_OVERFLOW()
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off
core: set_invoke_timeout() use ADD_OVERFLOW()
Replaces the integer overflow checks in set_invoke_timeout() with ADD_OVERFLOW()
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 4dc31c52 | 02-Mar-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
core: arm: generic boot: dt: switch console to /secure-chosen/stdout-path
If CFG_DT=y, check the Device Tree's /secure-chosen node and look for the stdout-path property. Adjust the console output ac
core: arm: generic boot: dt: switch console to /secure-chosen/stdout-path
If CFG_DT=y, check the Device Tree's /secure-chosen node and look for the stdout-path property. Adjust the console output accordingly. The DT bindings for this property have been proposed on the LKML [1].
[1] https://www.spinics.net/lists/arm-kernel/msg566034.html
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (QEMU) Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 7ba16abb | 02-Mar-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
dt: Add dt_map_dev()
Maps a device into memory from its FDT node.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-
dt: Add dt_map_dev()
Maps a device into memory from its FDT node.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 9fe4c797 | 02-Mar-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
dt: Add FDT manipulation functions
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wikland
dt: Add FDT manipulation functions
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| a4f139d7 | 04-Mar-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
core: introduce struct dt_driver
When CFG_DT=y, a linker section is created (.rodata.dtdrv) to hold all the DT-compatible drivers. The table can later be queried at runtime. Some manipulation functi
core: introduce struct dt_driver
When CFG_DT=y, a linker section is created (.rodata.dtdrv) to hold all the DT-compatible drivers. The table can later be queried at runtime. Some manipulation functions are exported in <kernel/dt.h>.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 756aea59 | 17-Feb-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
core: add common implementation for console_putc() and console_flush()
Since most platforms now use the same console_putc() and console_flush(), move them to core/kernel/console.c. Make them __weak
core: add common implementation for console_putc() and console_flush()
Since most platforms now use the same console_putc() and console_flush(), move them to core/kernel/console.c. Make them __weak so that platforms may still provide their own. The common code expects the platforms to initialize whatever serial device from console_init() and call register_console().
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 ...
|
| 80a4e51d | 17-Mar-2017 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: allow SDP buffers as memory reference parameters
Before this change, at OP-TEE entry (from non secure), memory reference parameters needed to match the 'shm_mobj': the nonsecure shared memory.
core: allow SDP buffers as memory reference parameters
Before this change, at OP-TEE entry (from non secure), memory reference parameters needed to match the 'shm_mobj': the nonsecure shared memory.
This change allows memory reference parameters to match the registered SDP memories and be used when invoking TA that claimed the SDP support through TA_FLAG_SECURE_DATA_PATH.
As SDP memory is not default mapped in OP-TEE core, nonsecure cannot invoke a pseudo/static TA with a SDP memref parameter. only a user TA can invoke a pseudo/static TA with a SDP memref parameter.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 42fb5b2e | 13-Feb-2017 |
Etienne Carriere <etienne.carriere@linaro.org> |
rename 'static TA' into 'pseudo TA'
This renaming prevents confusion of what is a static TA: static TAs are NOT Trusted Application operating at OP-TEE core privilege execution level. There are rath
rename 'static TA' into 'pseudo TA'
This renaming prevents confusion of what is a static TA: static TAs are NOT Trusted Application operating at OP-TEE core privilege execution level. There are rather OP-TEE core services that offer an invocation API based on GP TEE specified invocation API: open session, invoke command and close session.
This change renames all 'static TA' references into 'pseudo TA' references.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 883c4be3 | 13-Oct-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
Add support for user TA profiling with gprof (-pg)
Adds the infrastructure to collect profiling information from Trusted Applications running in user mode and instrumented with -pg. Enable with: CFG
Add support for user TA profiling with gprof (-pg)
Adds the infrastructure to collect profiling information from Trusted Applications running in user mode and instrumented with -pg. Enable with: CFG_TA_GPROF_SUPPORT=y.
Profiling support in itself adds no significant performance overhead. Instrumented applications however may run 1.3x - 2x slower, and have a larger .bss section (+1.36 times .text size for 32-bit TAs, +1.77 times .text size for 64-bit ones).
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (D02 64-bit) Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (QEMU 32-bit) Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| acc10c43 | 08-Dec-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: remove tee_dispatch_* functions
Prior to this patch the tee_dispatch_* functions where called when invoking TAs from normal world.
The tee_dipatch_* functions provided little value and has no
core: remove tee_dispatch_* functions
Prior to this patch the tee_dispatch_* functions where called when invoking TAs from normal world.
The tee_dipatch_* functions provided little value and has now been collapsed into the architecture specific entry_std.c reducing the stack usage.
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 ...
|
| 0cad9723 | 19-Jan-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: remove obsolete mobj_is_unsafe()
Removes obsolete mobj_is_unsafe(). As a consequence some tee_ta_manager code can be removed too.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> T
core: remove obsolete mobj_is_unsafe()
Removes obsolete mobj_is_unsafe(). As a consequence some tee_ta_manager code can be removed too.
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 ...
|
| 0dcfa568 | 19-Jan-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: introduce MOBJ abstraction
Introduces MOBJ for memory objects, no changes in features except breaking unsafe-nw-param/mem-multipurpose.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.
core: introduce MOBJ abstraction
Introduces MOBJ for memory objects, no changes in features except breaking unsafe-nw-param/mem-multipurpose.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by Volodymyr Babchuk <vlad.babchuk@gmail.com> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 26ed70ec | 29-Nov-2016 |
Guanchao Liang <liang.guanchao@linaro.org> |
core: add code for the interrupt framework
With this commit, we add three more GIC APIs for the kernel of OPTEE-OS: itr_raise_sgi : can raise software generate interrupt(SGI) from secure world to no
core: add code for the interrupt framework
With this commit, we add three more GIC APIs for the kernel of OPTEE-OS: itr_raise_sgi : can raise software generate interrupt(SGI) from secure world to no-secure world, or secure world to secure world. It's a quick communication between different worlds and different cores. Because SGI is using the GIC N-N model, so with this API, every core can receive the interrupt if want.
itr_raise_pi : can trigger the peripheral interrupt with the corresponding interrupt number. When sending it to N cores, just one core can receive the effective interrupt.
itr_set_affinity : can target the peripheral interrupt to the core you want, it means that one can bind the interrupt to the corresponding core use this API.
The usage may as follow: itr_raise_sgi(11, 0x1 << 1) it will raise SGI11 to core 1, and if you want not only core 1 can receive SGI11 but also core 2, then you can change the code to itr_raise_sgi(11, 0x1 << 1 || 0x1 << 2).
itr_set_affinity(61, 0x1 << 1) itr_raise_pi(61) These two APIs may use together, the operation set_affinity set the PI61 can just sent to core 1, then raise_pi, core 1 will receive the peripheral interrupt 61.
Signed-off-by: Guanchao Liang <liang.guanchao@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Tested-by: Joakim Bech <joakim.bech@linaro.org> (QEMU) [Update commit author to be same as S-o-b: above] Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 68540524 | 02-Nov-2016 |
Igor Opaniuk <igor.opaniuk@linaro.org> |
core/libutee: perform cleanup for magic "4"
Perform cleanup for magic "4" constant that represents amount of tee params
Signed-off-by: Igor Opaniuk <igor.opaniuk@linaro.org> Reviewed-by: Etienne Ca
core/libutee: perform cleanup for magic "4"
Perform cleanup for magic "4" constant that represents amount of tee params
Signed-off-by: Igor Opaniuk <igor.opaniuk@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 2ffdd194 | 26-Oct-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
Remove legacy tee_common_unpg.h
Removes legacy file core/include/kernel/tee_common_unpg.h and updates with new types etc as needed.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Teste
Remove legacy tee_common_unpg.h
Removes legacy file core/include/kernel/tee_common_unpg.h and updates with new types etc as needed.
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> (QEMU) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| aee3c6d6 | 13-Oct-2016 |
Zeng Tao <prime.zeng@hisilicon.com> |
core: add unwind stack in panic
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Zeng Tao <prime.zeng@hisilicon.com> |
| a884c935 | 12-Sep-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add support for paging of user TAs
Enables support for paging of user TAs if CFG_PAGED_USER_TA is y
Acked-by: David Brown <david.brown@linaro.org> Tested-by: Jerome Forissier <jerome.forissie
core: add support for paging of user TAs
Enables support for paging of user TAs if CFG_PAGED_USER_TA is y
Acked-by: David Brown <david.brown@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey) Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU 7) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 1d171f95 | 30-Aug-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add support for kernel address sanitizer
Adds support for kernel address sanitizer. Currently only for plat-vexpress-qemu_virt.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Tes
core: add support for kernel address sanitizer
Adds support for kernel address sanitizer. Currently only for plat-vexpress-qemu_virt.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU v7) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 3f17b838 | 16-Aug-2016 |
Etienne Carriere <etienne.carriere@linaro.org> |
core debug: cleanup CFG_TEE_CORE_DEBUG
Fix inconsistencies in CFG_TEE_CORE_DEBUG. This change proposes to define CFG_TEE_CORE_DEBUG as a y/n directive.
This change also fixes the comment describing
core debug: cleanup CFG_TEE_CORE_DEBUG
Fix inconsistencies in CFG_TEE_CORE_DEBUG. This change proposes to define CFG_TEE_CORE_DEBUG as a y/n directive.
This change also fixes the comment describing DEBUG directive.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Tested-by: Etienne Carriere <etienne.carriere@linaro.org> (qemu_v7/v8) Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 8c9d9445 | 23-Jul-2016 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: review assert and panic traces
Replace few "{ EMSG(...); panic(); }" with "panic(...);".
Disable file/line/func debug traces in panic() logs when CFG_TEE_CORE_DEBUG is disable.
Change __asse
core: review assert and panic traces
Replace few "{ EMSG(...); panic(); }" with "panic(...);".
Disable file/line/func debug traces in panic() logs when CFG_TEE_CORE_DEBUG is disable.
Change __assert_log() uses EMSG_RAW() to no pollute trace with __assert_log() internals (duplicated file/line/func traces).
Change assert() to use a low/high verbosity mode upon CFG_TEE_CORE_DEBUG as panic() does.
Change assert() to also trace the C function where assertion failed.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jen.wiklander@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Etienne Carriere <etienne.carriere@linaro.org> (QEMU)
show more ...
|