| 6b3a371c | 01-Mar-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: remove algo from crypto_hash_*()
Removes the algo parameters from all crypto_hash_*() functions except crypto_hash_alloc_ctx().
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Ack
core: remove algo from crypto_hash_*()
Removes the algo parameters from all crypto_hash_*() functions except crypto_hash_alloc_ctx().
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 95bec10a | 17-Jul-2019 |
Vikas Gupta <vikas.gupta@broadcom.com> |
drivers: bnxt: add Broadcom bnxt driver
Add Broadcom bnxt driver which helps to load the firmware on bnxt device
Signed-off-by: Vikas Gupta <vikas.gupta@broadcom.com> Signed-off-by: Sheetal Tigadol
drivers: bnxt: add Broadcom bnxt driver
Add Broadcom bnxt driver which helps to load the firmware on bnxt device
Signed-off-by: Vikas Gupta <vikas.gupta@broadcom.com> Signed-off-by: Sheetal Tigadoli <sheetal.tigadoli@broadcom.com> Reviewed-by: Sandeep Tripathy <sandeep.tripathy@broadcom.com> Acked-by: Jerome Forissier <jerome@forissier.org> Acked-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 ...
|
| 1e866588 | 10-Sep-2019 |
Jerome Forissier <jerome@forissier.org> |
core: dt: add __noreturn to _fdt_fill_device_info() stub
When CFG_DT != y, the stub function _fdt_fill_device_info() just panics. Therefore it deserves the __noreturn attribute. Adding it makes a Cl
core: dt: add __noreturn to _fdt_fill_device_info() stub
When CFG_DT != y, the stub function _fdt_fill_device_info() just panics. Therefore it deserves the __noreturn attribute. Adding it makes a Clang warning go away.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| f8f95bc1 | 10-Sep-2019 |
Jerome Forissier <jerome@forissier.org> |
Get rid of option -Wno-suggest-attribute=noreturn
The GCC option -Wno-suggest-attribute=noreturn is not supported by Clang. Instead of playing with compiler options, let's fix the code according to
Get rid of option -Wno-suggest-attribute=noreturn
The GCC option -Wno-suggest-attribute=noreturn is not supported by Clang. Instead of playing with compiler options, let's fix the code according to the following rules: - If a function is know to never return, it should have the __noreturn attribute in the header file. - If only some implementation of a function never returns, __noreturn shall be applied to that particular implementation in the .c file.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 7222fc6a | 06-Aug-2019 |
Cedric Neveux <cedric.neveux@nxp.com> |
core: driver: generic resources for crypto device driver
Add a generic cryptographic driver interface connecting TEE Crypto generic APIs to HW driver interface
The Generic Crypto Driver interface i
core: driver: generic resources for crypto device driver
Add a generic cryptographic driver interface connecting TEE Crypto generic APIs to HW driver interface
The Generic Crypto Driver interface in the core/driver/crypto/crypto_api is implemented to be able to use a HW driver.
Signed-off-by: Cedric Neveux <cedric.neveux@nxp.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jerome Forissier <jerome@forissier.org>
show more ...
|
| 1df107b6 | 03-Sep-2019 |
Sumit Garg <sumit.garg@linaro.org> |
ftrace: exclude only foreign interrupt time
Current TA function execution time feature only reports user mode execution time and exclude any non-user mode execution time. But in case of syscalls whi
ftrace: exclude only foreign interrupt time
Current TA function execution time feature only reports user mode execution time and exclude any non-user mode execution time. But in case of syscalls which are essentially function invocations from TA into the kernel, we shouldn't exclude syscall execution time in order to account for actual function execution time. That means we only exclude time that is spent serving foreign interrupts.
So changes in this patch allows to incorporate syscall execution time in the function graph output.
Fixes: f5df167c2ffb ("ftrace: Add function execution time support") Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Acked-by: Jerome Forissier <jerome@forissier.org>
show more ...
|
| 776d2158 | 26-Jun-2019 |
Rouven Czerwinski <r.czerwinski@pengutronix.de> |
core: import IS_ENABLED macro from Zephyr OS
The IS_ENABLED macro checks whether a macro is defined to the value 1 or may not be defined at all. This allows checks in the code instead of using #ifde
core: import IS_ENABLED macro from Zephyr OS
The IS_ENABLED macro checks whether a macro is defined to the value 1 or may not be defined at all. This allows checks in the code instead of using #ifdef:
#define CFG_MX6Q 1
if (IS_ENABLED(CFG_MX6Q)) printf("MX6Q enabled") if (IS_ENABLED(CFG_MX6D)) printf("MX6D enabled")
expands to:
if (1) printf("MX6Q enabled") if (0) printf("MX6Q enabled")
where the second if statement can be optimized out by the compiler.
This implementation was imported from Zephyr OS commit ff07fc7f0a19 ("lib: libc: fix alignment of HEAP base address for ARM").
The Copyright is attributed to Intel, since the original commit 5bc458a0fae5 ("util.h: Add IS_ENABLED() macro for expression-legal ifdef-checking") was done by Andy Ross <andrew.j.ross@intel.com>.
Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Peng Fan <peng.fan@nxp.com>
show more ...
|
| c22e4872 | 01-Aug-2019 |
Cedric Neveux <cedric.neveux@nxp.com> |
core: io: add {get/put}_le{32/64}()
Add 32 and 64 bits little endian put/get functions
Signed-off-by: Cedric Neveux <cedric.neveux@nxp.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.or
core: io: add {get/put}_le{32/64}()
Add 32 and 64 bits little endian put/get functions
Signed-off-by: Cedric Neveux <cedric.neveux@nxp.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 95cdc5e0 | 05-Jul-2019 |
Cedric Neveux <cedric.neveux@nxp.com> |
core: add DT function to read/modify DT
Add DT functions: dt_get_irq() get the interrupt number of a node
dt_disable_status() disable the 'status' field of node's prop
dt_enable_secure_status(
core: add DT function to read/modify DT
Add DT functions: dt_get_irq() get the interrupt number of a node
dt_disable_status() disable the 'status' field of node's prop
dt_enable_secure_status() set 'secure-status' field of node's prop and disable the 'status' field in the same time
Signed-off-by: Cedric Neveux <cedric.neveux@nxp.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| e9f46c74 | 13-Aug-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: replace thread_nintr_handler_ptr with weak function
Removes registration of platform specific secure interrupt handler in thread_nintr_handler_ptr. Instead a __weak overridable itr_core_handle
core: replace thread_nintr_handler_ptr with weak function
Removes registration of platform specific secure interrupt handler in thread_nintr_handler_ptr. Instead a __weak overridable itr_core_handler() is provided. Platforms which expects to receive secure interrupts must override the default function. The default function calls panic() if called.
With this also nintr is removed from struct thread_handlers and consequently all platforms are updated to stop using that field.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 757331fc | 21-Aug-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
Replace ASM with compiler-builtin __ASSEMBLER__
The C preprocessor predefines __ASSEMBLER__ with value 1 when when preprocessing assembly language, see [1]. Instead of using a special defines, let's
Replace ASM with compiler-builtin __ASSEMBLER__
The C preprocessor predefines __ASSEMBLER__ with value 1 when when preprocessing assembly language, see [1]. Instead of using a special defines, let's use the define already provided.
Link: [1] https://gcc.gnu.org/onlinedocs/cpp/Standard-Predefined-Macros.html
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 922308b3 | 11-Dec-2017 |
Peng Fan <peng.fan@nxp.com> |
drivers: imx_wdog: update wdog support for mx7ulp
Update watchdog for imx7ulp SoC support.
Signed-off-by: Peng Fan <peng.fan@nxp.com> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> |
| a8f769f3 | 12-Aug-2019 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: rename versioning field in bootstrap TA header
Rename field version into ta_version in struct shdr_bootstrap_ta to explicit the info related to TA versioning.
Signed-off-by: Etienne Carriere
core: rename versioning field in bootstrap TA header
Rename field version into ta_version in struct shdr_bootstrap_ta to explicit the info related to TA versioning.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| cbb41c91 | 30-May-2019 |
Abhishek Shah <abhishek.shah@broadcom.com> |
drivers: wdt: Add arm SP805 watchdog driver
Add sp805 watchdog driver with following functionality: - start/reload watchdog with specified timeout - stop watchdog - ping watchdog (clear watchdog int
drivers: wdt: Add arm SP805 watchdog driver
Add sp805 watchdog driver with following functionality: - start/reload watchdog with specified timeout - stop watchdog - ping watchdog (clear watchdog interrupt and reload it) - register watchdog interrupt handler
Signed-off-by: Abhishek Shah <abhishek.shah@broadcom.com> Reviewed-by: Sandeep Tripathy <sandeep.tripathy@broadcom.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| f5df167c | 09-Aug-2019 |
Sumit Garg <sumit.garg@linaro.org> |
ftrace: Add function execution time support
Add support to dump function execution time at corresponding function exit points in output ftrace buffer.
To achieve proper function execution time we n
ftrace: Add function execution time support
Add support to dump function execution time at corresponding function exit points in output ftrace buffer.
To achieve proper function execution time we need to exclude TA suspend time from timestamps, so add corresponding support in TEE core.
Also user mapping must be active to access ftrace buffer, so do that during TA resume.
Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (QEMU) Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 545861aa | 19-Jun-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: remove struct load_seg
Removes struct load_seg, the mobj stored in struct load_seg is already stored in struct vm_region. A flag VM_FLAG_EXCLUSIVE_MOBJ is added to indicate that the mobj in st
core: remove struct load_seg
Removes struct load_seg, the mobj stored in struct load_seg is already stored in struct vm_region. A flag VM_FLAG_EXCLUSIVE_MOBJ is added to indicate that the mobj in struct vm_region should be freed instead of just ignored when removing a region.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| d301003e | 19-Jun-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add VM_FLAG_READONLY
Adds VM_FLAG_READONLY which is used to enforce that read-only parts of a TA binary shared between TAs cannot be mapped read/write.
Reviewed-by: Jerome Forissier <jerome.f
core: add VM_FLAG_READONLY
Adds VM_FLAG_READONLY which is used to enforce that read-only parts of a TA binary shared between TAs cannot be mapped read/write.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| ef55da15 | 19-Jun-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add vm_get_flags()
Adds vm_get_flags() which returns the flags of a mapped region.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@li
core: add vm_get_flags()
Adds vm_get_flags() which returns the flags of a mapped region.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 2e8a1d08 | 18-Jun-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add vm_remap()
Adds vm_remap() to allow changing virtual address of an already established mapping
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <j
core: add vm_remap()
Adds vm_remap() to allow changing virtual address of an already established mapping
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 60ef5192 | 19-Jun-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: split TEE_MATTR_* defines
Splits the TEE_MATTR_* defines into two groups, TEE_MATTR_* and VM_FLAG_*. TEE_MATTR_* is restored to only handle mappings attributes and permissions. The new group V
core: split TEE_MATTR_* defines
Splits the TEE_MATTR_* defines into two groups, TEE_MATTR_* and VM_FLAG_*. TEE_MATTR_* is restored to only handle mappings attributes and permissions. The new group VM_FLAG_* is added to tag regions with purpose and such.
As a consequence user_ta_map(), vm_map_pad() and vm_map() takes one more argument, the flags field.
struct vm_region also gains a flags field, but since only the lower bits are used in the flags and attr fields they are each stored as uint16_t instead.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 642a0c68 | 19-Jun-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: remove unused TEE_MATTR_LOCKED
Removes the now unused TEE_MATTR_LOCKED macro.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.
core: remove unused TEE_MATTR_LOCKED
Removes the now unused TEE_MATTR_LOCKED macro.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 570f0d71 | 19-Jun-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: remove obsolete TEE_MMU_UMAP_* defines
Removes the now obsolete TEE_MMU_UMAP_* defines.
Fixes: 211417d3a487 ("core: more flexible ta mapping") Reviewed-by: Jerome Forissier <jerome.forissier@
core: remove obsolete TEE_MMU_UMAP_* defines
Removes the now obsolete TEE_MMU_UMAP_* defines.
Fixes: 211417d3a487 ("core: more flexible ta mapping") Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| ec295ea0 | 22-Mar-2019 |
Jerome Forissier <jerome.forissier@linaro.org> |
core: change the pattern used to generate asm-defines.h
This commit prepares support for the Clang compiler.
$O/core/include/generated/asm-defines.h is generated from core/arch/arm/kernel/asm-defin
core: change the pattern used to generate asm-defines.h
This commit prepares support for the Clang compiler.
$O/core/include/generated/asm-defines.h is generated from core/arch/arm/kernel/asm-defines.c by the C compiler with the -S flag (generate assembler code), followed by some light post-processing with sed.
The intermediate file ($O/core/include/generated/.asm-defines.s) is actually not a valid assembler file. It contains illegal tokens, which where chosen to make it easy to parse with sed. For example:
==>SM_CTX_SIZE #256 sizeof(struct sm_ctx) @
...is turned into:
#define SM_CTX_SIZE 256 /* sizeof(struct sm_ctx) */
While this works fine with GCC, the Clang compiler won't accept to output invalid assembler. This commit slightly modifies the inline assembler so that the needed information is contained within a .ascii directive:
.ascii "==>SM_CTX_SIZE 248 sizeof(struct sm_ctx)" @
The 'c' constraint (%c0) is added to avoid the # prefix before an immediate value, which is not accepted by Clang either.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| d2c717b2 | 02-Jul-2019 |
Jerome Forissier <jerome.forissier@linaro.org> |
core: console: fix use after free when CFG_DT=y
Commit 770b2afacf33 ("core: more flexible console init from DT") has split configure_console_from_dt() in two parts, the first one being moved to a ne
core: console: fix use after free when CFG_DT=y
Commit 770b2afacf33 ("core: more flexible console init from DT") has split configure_console_from_dt() in two parts, the first one being moved to a new function: get_console_node_from_dt(). Unfortunately, this function may return pointers to a freed buffer.
Fix the problem by allocating each output string on the heap and letting the caller clean on return.
Fixes: 770b2afacf33 ("core: more flexible console init from DT") Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Rouven Czerwinski <r.czerwinksi@pengutronix.de> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|