| 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 ...
|
| c462c674 | 02-Aug-2019 |
Cedric Neveux <cedric.neveux@nxp.com> |
core: arm64: add read_ctr_el0 function
Add the read_ctr_el0 function in the arm64.h file
Signed-off-by: Cedric Neveux <cedric.neveux@nxp.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> |
| 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 ...
|
| 6d22d98c | 05-Jul-2019 |
Cedric Neveux <cedric.neveux@nxp.com> |
core: kernel: move DT pack at the end of boot
This change moves the DT pack operation at the end of the generic boot, in release_external_dt(). This change allows any driver or initialization functi
core: kernel: move DT pack at the end of boot
This change moves the DT pack operation at the end of the generic boot, in release_external_dt(). This change allows any driver or initialization function to change the DT and get its content repacked before DT is accessed by another boot agent.
Signed-off-by: Cedric Neveux <cedric.neveux@nxp.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> 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 ...
|
| f9bfeacb | 18-Apr-2019 |
Cedric Neveux <cedric.neveux@nxp.com> |
plat-imx: Add CRM registers mapping
Add registers to handle CAAM clocks
Signed-off-by: Cedric Neveux <cedric.neveux@nxp.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> |
| 330823b7 | 02-Jul-2019 |
Cedric Neveux <cedric.neveux@nxp.com> |
core: arm64 Add sev/wfe inline function
Add functions sev() and wfe() to implememt assembly instructions WFE/SEV.
Signed-off-by: Cedric Neveux <cedric.neveux@nxp.com> Reviewed-by: Jens Wiklander <j
core: arm64 Add sev/wfe inline function
Add functions sev() and wfe() to implememt assembly instructions WFE/SEV.
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>
show more ...
|
| c9ab9073 | 27-Aug-2019 |
Ricardo Salveti <ricardo@foundries.io> |
core: link.mk: support reproducible builds via SOURCE_DATE_EPOCH
Allow using SOURCE_DATE_EPOCH when defining DATE_STR in order to support reproducible builds.
See https://reproducible-builds.org/sp
core: link.mk: support reproducible builds via SOURCE_DATE_EPOCH
Allow using SOURCE_DATE_EPOCH when defining DATE_STR in order to support reproducible builds.
See https://reproducible-builds.org/specs/source-date-epoch/
Signed-off-by: Ricardo Salveti <ricardo@foundries.io> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| dc57b110 | 28-Aug-2019 |
Jerome Forissier <jerome.forissier@linaro.org> |
Do not let CFG_CRYPTO_SIZE_OPTIMIZATION set -Os
Compiler optimization flags -O0 or -Os are selected globally by the config variable CFG_CC_OPTIMIZE_FOR_SIZE, but crypto code (lib/libmbedtls and core
Do not let CFG_CRYPTO_SIZE_OPTIMIZATION set -Os
Compiler optimization flags -O0 or -Os are selected globally by the config variable CFG_CC_OPTIMIZE_FOR_SIZE, but crypto code (lib/libmbedtls and core/lib/libtomcrypt) is always built with -Os when CFG_CRYPTO_SIZE_OPTIMIZATION=y. This is a bit inconvenient when debugging crypto code because two flags have to be set, and it is not obvious why CFG_CC_OPTIMIZE_FOR_SIZE would not influence crypto.
Since performance does not matter much when debugging, and -Os/-O0 does not make a huge difference anyway, it is wiser to keep the purpose of the two CFG_ variables separated: CFG_CC_OPTIMIZE_FOR_SIZE should control the -O flag for all sources, while CFG_CRYPTO_SIZE_OPTIMIZATION should deal with other size-related settings in the crypto code (namely: set -DLTC_SMALL_CODE for LibTomCrypt).
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 10ed1717 | 18-Aug-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: remove some redundant RPC return registers
Removes SMC ID and thread ID from RPC returned registers. This saves a bit of stack space but also makes it more clear which registers are passed bac
core: remove some redundant RPC return registers
Removes SMC ID and thread ID from RPC returned registers. This saves a bit of stack space but also makes it more clear which registers are passed back and forth.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 4c07eaed | 19-Aug-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: thread_handle_std_smc() takes arguments by value
thread_handle_std_smc() takes its arguments by value instead of a structure containing all the registers. The returned values is reduced to a s
core: thread_handle_std_smc() takes arguments by value
thread_handle_std_smc() takes its arguments by value instead of a structure containing all the registers. The returned values is reduced to a single 32-bit value. This saves a bit of stack space but also makes it more clear which registers are passed back and forth.
Since 32-bit AAPCS (Procedure Call Standard for the ARM® Architecture) only passes arguments in r0-r3 the remaining r4-r7 still need to be passed via the stack, however the arguments are passed like normal value parameters for the C function.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 6e558fa9 | 18-Aug-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: __thread_std_smc_entry() takes arguments by value
__thread_std_smc_entry() and thread_std_smc_entry() takes their arguments by value instead of a structure containing all the registers. The ar
core: __thread_std_smc_entry() takes arguments by value
__thread_std_smc_entry() and thread_std_smc_entry() takes their arguments by value instead of a structure containing all the registers. The arguments are also reduced to only allow the four first 32-bit registers, r0-r3 or w0-w3. The returned values is reduced to a single 32-bit value. This saves a bit of stack space but also makes it more clear which registers are passed back and forth.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-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 ...
|
| 612791d0 | 13-Aug-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: replace thread_fast_smc_handler_ptr with weak function
Removes registration of platform specific fast SMC entry function in thread_fast_smc_handler_ptr. Instead a __weak overridable tee_entry_
core: replace thread_fast_smc_handler_ptr with weak function
Removes registration of platform specific fast SMC entry function in thread_fast_smc_handler_ptr. Instead a __weak overridable tee_entry_fast() is provided. Platforms that need a special tee_entry_fast() (currently on plat-zynq7k) provides their own tee_entry_fast() instead which at the end should call __tee_entry_fast() which does the generic fast call handling.
With this also fast_smc 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 ...
|
| 2dd2ca5f | 13-Aug-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: replace thread_std_smc_handler_ptr with weak function
Removes registration of platform specific standard SMC entry function in thread_std_smc_handler_ptr. Instead a __weak overridable tee_entr
core: replace thread_std_smc_handler_ptr with weak function
Removes registration of platform specific standard SMC entry function in thread_std_smc_handler_ptr. Instead a __weak overridable tee_entry_std() is provided. Platforms that need a special tee_entry_std() (currently on some STM platform) provides their own tee_entry_std() instead which at the end should call __tee_entry_std() which does the generic standard call handling.
With this also std_smc 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 ...
|
| 2786f143 | 08-Aug-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: thread: separate old SMC interface handling
Moves the old SMC interface handing parts for thread*.S into separate files to make way for SPCI which will provide another interface towards normal
core: thread: separate old SMC interface handling
Moves the old SMC interface handing parts for thread*.S into separate files to make way for SPCI which will provide another interface towards normal world.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 81d80da2 | 01-Aug-2019 |
Jeffrey Lin <linjunemail@gmail.com> |
core: LPAE finer grain remap support
Correct core_mmu_entry_to_finer_grained() when remapping an already mapped area. Prior this change were the page descriptors filled with corrupted data: physical
core: LPAE finer grain remap support
Correct core_mmu_entry_to_finer_grained() when remapping an already mapped area. Prior this change were the page descriptors filled with corrupted data: physical address was badly computed and the table/block mapping tag was wrong.
Fixes: 4c4ae2107715 ("mmu: replace _prepare_small_page_mapping with _entry_to_finer_grained") Signed-off-by: Jeffrey Lin <linjunemail@gmail.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 90ad2450 | 21-Aug-2019 |
Volodymyr Babchuk <volodymyr_babchuk@epam.com> |
scripts/sign.py: support PyCryptodome
Depending on the Linux distribution, the Crypto package may be provided by PyCrypto [1] or PyCryptodome [2]. For example, Ubuntu has the former, while Arch Linu
scripts/sign.py: support PyCryptodome
Depending on the Linux distribution, the Crypto package may be provided by PyCrypto [1] or PyCryptodome [2]. For example, Ubuntu has the former, while Arch Linux comes with the latter.
PyCryptodome is a fork of PyCrypto, which is not maintained any more (the last release dates back to 2013 [3]). It exposes almost the same API, but there are a few incompatibilities [4].
Newer versions of PyCryptodome throw NotImplementedError when calling size() method if RSA object. This is because this method is considered not safe. But this is only one way to get key size in PyCrypto.
We will use size_in_bytes() in case if size() is not available.
Also, added sanity check to ensure that computed signature size equals to actual one.
[1] https://pypi.org/project/pycrypto/ [2] https://pycryptodome.readthedocs.io/en/latest/ [3] https://pypi.org/project/pycrypto/#history [4] https://pycryptodome.readthedocs.io/en/latest/src/vs_pycrypto.html
Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| c96bced4 | 01-Aug-2019 |
Jerome Forissier <jerome.forissier@linaro.org> |
Add libdl for TAs
Adds basic support for dlopen(), dlsym() and dlclose(). The flags passed to dlopen() must be (RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE); other values are not supported at the moment.
Add libdl for TAs
Adds basic support for dlopen(), dlsym() and dlclose(). The flags passed to dlopen() must be (RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE); other values are not supported at the moment.
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 ...
|
| 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 ...
|
| 791ee55c | 08-Jul-2019 |
Jerome Forissier <jerome.forissier@linaro.org> |
libutee: add tee_uuid_from_str()
Moves internal function parse_uuid() from ldelf/ta_elf.c to libutee so that it may be used by TAs or other user-space libraries such as the upcoming libdl. The funct
libutee: add tee_uuid_from_str()
Moves internal function parse_uuid() from ldelf/ta_elf.c to libutee so that it may be used by TAs or other user-space libraries such as the upcoming libdl. The function is renamed to tee_uuid_from_str() and declared in tee_internal_api_extensions.h.
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 ...
|
| 9aed8c32 | 02-Aug-2019 |
Jerome Forissier <jerome.forissier@linaro.org> |
ldelf: fix comment
ldelf_dump() does not exist, the comment about struct dump_entry_arg should refer to ldelf_arg::dump_entry() instead.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org
ldelf: fix comment
ldelf_dump() does not exist, the comment about struct dump_entry_arg should refer to ldelf_arg::dump_entry() instead.
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 ...
|
| 716f442d | 12-Aug-2019 |
Jerome Forissier <jerome.forissier@linaro.org> |
get_maintainer.py: process patches individually
When given the -m/-merge-check option, get_maintainer.py parses the Acked-by and Reviewed-by tags that may be found in a patchset or Github PR. In pre
get_maintainer.py: process patches individually
When given the -m/-merge-check option, get_maintainer.py parses the Acked-by and Reviewed-by tags that may be found in a patchset or Github PR. In presence of several patches the tags should apply to each patch individually, not to the whole patchset as is currently done. As a result, the script may fail to report some unapproved changes.
Fix this issue by splitting patchsets into individual patches before processing.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| df7712ba | 21-Aug-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
Remove ASM define for assembly files
Removes the ASM define for assembly files now that they rely on the predefined macro __ASSEMBLER__ instead.
Reviewed-by: Jerome Forissier <jerome.forissier@lina
Remove ASM define for assembly files
Removes the ASM define for assembly files now that they rely on the predefined macro __ASSEMBLER__ instead.
Reviewed-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 ...
|