| 9ffea7b4 | 25-Sep-2019 |
Jerome Forissier <jerome@forissier.org> |
build: cfg-depends-one, cfg-depends-all: disable variable with ':= n'
Update cfg-depends-one and cfg-depends-all to use ':= n' to disable a variable instead of setting it to an empty string. Functio
build: cfg-depends-one, cfg-depends-all: disable variable with ':= n'
Update cfg-depends-one and cfg-depends-all to use ':= n' to disable a variable instead of setting it to an empty string. Functionally equivalent but looks better.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 9e8c816a | 26-Sep-2019 |
Jerome Forissier <jerome@forissier.org> |
build: make cfg-one-enabled return 'n' instead of an empty string
Modify cfg-one-enabled in the same way the parent commit modified cfg-all-enabled.
Signed-off-by: Jerome Forissier <jerome@forissie
build: make cfg-one-enabled return 'n' instead of an empty string
Modify cfg-one-enabled in the same way the parent commit modified cfg-all-enabled.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| b2a75cd4 | 25-Sep-2019 |
Jerome Forissier <jerome@forissier.org> |
build: make cfg-all-enabled return 'n' instead of an empty string
cfg-all-enabled returns either 'y' or an empty string. Since it is often used to derive a configuration variable from other ones, it
build: make cfg-all-enabled return 'n' instead of an empty string
cfg-all-enabled returns either 'y' or an empty string. Since it is often used to derive a configuration variable from other ones, it would be better to return 'n' instead of an empty string for consistency (most boolean variables in $O/conf.mk are either 'y' or 'n').
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| e6e68745 | 20-Sep-2019 |
Jerome Forissier <jerome@forissier.org> |
core: REE FS TAs: disable CFG_REE_FS_TA_BUFFERED by default
Now that the TA loader is in user space [1], the main reason why we had introduced CFG_REE_FS_TA_BUFFERED [2] does not exist anymore. Ther
core: REE FS TAs: disable CFG_REE_FS_TA_BUFFERED by default
Now that the TA loader is in user space [1], the main reason why we had introduced CFG_REE_FS_TA_BUFFERED [2] does not exist anymore. Therefore we can set it to 'n' by default, thus saving some time and memory.
[1] commit d1911a85142d ("core: load TAs using ldelf") [2] commit 7db24ad625b9 ("core: REE FS TAs: add option to verify signature before processing")
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| cba8ca1c | 13-Sep-2019 |
Jerome Forissier <jerome@forissier.org> |
build: prevent produce-* from being forced built before current submodule
Problem:
$ make -s out/arm-plat-vexpress/core/mm/fobj.o $ rm out/arm-plat-vexpress/ldelf/ldelf.elf $ rm out/arm-plat-vex
build: prevent produce-* from being forced built before current submodule
Problem:
$ make -s out/arm-plat-vexpress/core/mm/fobj.o $ rm out/arm-plat-vexpress/ldelf/ldelf.elf $ rm out/arm-plat-vexpress/core/mm/fobj.o $ make out/arm-plat-vexpress/core/mm/fobj.o CHK out/arm-plat-vexpress/conf.mk CHK out/arm-plat-vexpress/include/generated/conf.h LD out/arm-plat-vexpress/ldelf/ldelf.elf GEN out/arm-plat-vexpress/core/ldelf_hex.c CC out/arm-plat-vexpress/core/mm/fobj.o
Why would fobj.o depend on ldelf.elf and ldelf_hex.c? Answer is: it shouldn't. This behavior is caused by FORCE-GENSRC$(sm) depending on all the produce-<something> targets. In fact, such a dependency is rarely needed. It makes sense for include files for instance; but certainly not for C source files which are pulled in the build by other means.
This patch introduces force-gensrc-<something> to prevent the generated file $(produce-<something>) from being added to FORCE-GENSRC$(sm) unless $(force-gensrcs-<something>) is "y". The test case above works as expected:
$ make -s out/arm-plat-vexpress/core/mm/fobj.o $ rm out/arm-plat-vexpress/ldelf/ldelf.elf $ rm out/arm-plat-vexpress/core/mm/fobj.o $ make out/arm-plat-vexpress/core/mm/fobj.o CHK out/arm-plat-vexpress/conf.mk CHK out/arm-plat-vexpress/include/generated/conf.h CC out/arm-plat-vexpress/core/mm/fobj.o
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| d1492098 | 29-Aug-2019 |
Jerome Forissier <jerome@forissier.org> |
ftrace: allow display of larger durations
Currently the ftrace buffer shows durations in microseconds and modulo 1000000 us. It is problematic if values larger than one second are measured.
This pa
ftrace: allow display of larger durations
Currently the ftrace buffer shows durations in microseconds and modulo 1000000 us. It is problematic if values larger than one second are measured.
This patch makes sure that no invalid value is ever displayed when an overflow occurs. Instead, the trace will contain dashes, such as "--------- us".
In addition, the unit is changed from microseconds (us) to milliseconds (ms) when the duration exceeds a predefined value set by CFG_FTRACE_US_MS (default: 10000 us).
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
show more ...
|
| 0f8adafe | 29-Aug-2019 |
Jerome Forissier <jerome@forissier.org> |
ftrace: allow tracing of syscall wrappers only
Introduces a new configuration flag: CFG_SYSCALL_WRAPPERS_MCOUNT to control the instrumentation of the system call wrapper functions (utee_*) with -pg,
ftrace: allow tracing of syscall wrappers only
Introduces a new configuration flag: CFG_SYSCALL_WRAPPERS_MCOUNT to control the instrumentation of the system call wrapper functions (utee_*) with -pg, for function tracing and gprof. The default value is taken from CFG_ULIBS_MCOUNT. The main use case is to trace only the system calls in a TA: CFG_TA_FTRACE_SUPPORT=y CFG_SYSCALL_WRAPPERS_MCOUNT=y
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Sumit Garg <sumit.garg@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 ...
|
| 13ff3d45 | 09-Aug-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
Fix signing libraries
Libraries are signed if OP-TEE is compiled with the non-default CFG_ULIBS_SHARED=y configuration option.
With 1cdd95a2a46d ("Support offline signing of TAs.") the sign.py scri
Fix signing libraries
Libraries are signed if OP-TEE is compiled with the non-default CFG_ULIBS_SHARED=y configuration option.
With 1cdd95a2a46d ("Support offline signing of TAs.") the sign.py script no longer supports the --version switch and instead gives an error like: SIGN ../out-os-qemu/ta_arm32-lib/libutee/527f1a47-b92c-4a74-95bd-72f19f4a6f74.ta usage: sign.py command [ arguments ]
command: sign Generate signed loadable TA image file. Takes arguments --uuid, --in, --out and --key. digest Generate loadable TA binary image digest for offline signing. Takes arguments --uuid, --in and --dig. stitch Generate loadable signed TA binary image file from TA raw image and its signature. Takes arguments --uuid, --in, --out, and --sig.
sign.py --help show available commands and arguments sign.py: error: argument command: invalid choice: '0' (choose from 'sign', 'digest', 'stitch', 'generate-digest', 'stitch-ta') mk/lib.mk:83: recipe for target '../out-os-qemu/ta_arm32-lib/libutee/527f1a47-b92c-4a74-95bd-72f19f4a6f74.ta' failed
With this patch the switch "--version 0" is removed when signing libraries.
Fixes: 1cdd95a2a46d ("Support offline signing of TAs.") 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 ...
|
| 3ee44162 | 22-Mar-2019 |
Jerome Forissier <jerome.forissier@linaro.org> |
build: print CC line when .am-defines.s is generated
$O/include/generated/.am-defines.s is generated using the C compiler, so we should print a line when compiling, as follows:
CC out/arm-pl
build: print CC line when .am-defines.s is generated
$O/include/generated/.am-defines.s is generated using the C compiler, so we should print a line when compiling, as follows:
CC out/arm-plat-vexpress/core/include/generated/.asm-defines.s
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| ddba1831 | 01-Jul-2019 |
Jerome Forissier <jerome.forissier@linaro.org> |
Update revision for release tag 3.6.0-rc1
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> |
| d1911a85 | 23-May-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: load TAs using ldelf
Uses ldelf to load and relocate TAs instead of parsing and loading the ELFs in TEE Core. TA abort dumps, ASLR and ftrace are temporarily removed or disabled to be re-enabl
core: load TAs using ldelf
Uses ldelf to load and relocate TAs instead of parsing and loading the ELFs in TEE Core. TA abort dumps, ASLR and ftrace are temporarily removed or disabled to be re-enabled in following commits.
Loading dynamically linked TAs are from now on always supported and cannot be disabled via configuration flags. CFG_TA_DYNLINK is also removed as a configuration option.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 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 ...
|
| b02ae382 | 22-May-2019 |
Sumit Garg <sumit.garg@linaro.org> |
libutee: arm64: Add support for function tracing of user TAs
Function tracing (ftrace) is a useful debugging technique to dump function call graph for in-depth analysis of program execution and also
libutee: arm64: Add support for function tracing of user TAs
Function tracing (ftrace) is a useful debugging technique to dump function call graph for in-depth analysis of program execution and also to get useful information in case of any program abort.
In case of TA, this function graph information is dumped in a buffer kept in .bss section of corresponding instrumented TA. So this buffer can be dumped to normal world in case TA session closes or in case of any abort. Also size of this ftrace buffer is configurable per TA via following config option during TA compilation:
CFG_FTRACE_BUF_SIZE=2048
Function tracing is completely optional debugging feature which could be enabled via command line config option CFG_TA_FTRACE_SUPPORT=y.
Along with this user needs to add cflag: "-pg" to the files for whom function graph is to be generated. Typically for the whole TA, it should be compiled with CFG_TA_MCOUNT=y.
And in case user wants to set "-pg" for particular file, following should go in corresponding sub.mk:
cflags-<file-name>-y+=-pg
Also, to generate function graph for user mode libraries enable CFG_ULIBS_MCOUNT=y which will set "-pg" for all library files.
Currently this patch adds support for function tracing of 64-bit TAs only.
Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey960)
show more ...
|
| 735565db | 16-May-2019 |
Sumit Garg <sumit.garg@linaro.org> |
Rename CFG_ULIBS_GPROF to CFG_ULIBS_MCOUNT
CFG_ULIBS_GPROF builds the user mode libraries with -pg, which adds instrumentation to all functions in the form of a call to mcount(). This was historical
Rename CFG_ULIBS_GPROF to CFG_ULIBS_MCOUNT
CFG_ULIBS_GPROF builds the user mode libraries with -pg, which adds instrumentation to all functions in the form of a call to mcount(). This was historically used by gprof, but other tools can benefit from this instrumentation. Therefore, rename the config flag as well as a couple of source files to remove the reference to gprof.
Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey960)
show more ...
|
| a3fdd56c | 23-May-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
Link user libraries with 4K page size
Set the linker flag max-page-size to 4K when linking shared user libraries. This is used to avoid unnecessary large holes in the virtual memory map between segm
Link user libraries with 4K page size
Set the linker flag max-page-size to 4K when linking shared user libraries. This is used to avoid unnecessary large holes in the virtual memory map between segments with different attributes.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 7ea0c708 | 24-May-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
mk/cleandirs.mk: avoid print spurious empty lines
Fixes the macro do-rm-f from outputting spurious empty lines if supplied a large list of files.
Reviewed-by: Jerome Forissier <jerome@forissier.org
mk/cleandirs.mk: avoid print spurious empty lines
Fixes the macro do-rm-f from outputting spurious empty lines if supplied a large list of files.
Reviewed-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 59bef968 | 21-May-2019 |
Rouven Czerwinski <r.czerwinski@pengutronix.de> |
config.mk: fix CFG_OPTEE_REVISION_MINOR
The current release is 3.5.0, change the revision to match.
Fixes https://github.com/OP-TEE/optee_os/issues/3028
Signed-off-by: Rouven Czerwinski <r.czerwin
config.mk: fix CFG_OPTEE_REVISION_MINOR
The current release is 3.5.0, change the revision to match.
Fixes https://github.com/OP-TEE/optee_os/issues/3028
Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| c2ce4186 | 12-Apr-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
Introduce CFG_CORE_DUMP_OOM
Introduces CFG_CORE_DUMP_OOM which if y will print an error and dump the stack on memory allocation failures using malloc() and friends.
Reviewed-by: Jerome Forissier <j
Introduce CFG_CORE_DUMP_OOM
Introduces CFG_CORE_DUMP_OOM which if y will print an error and dump the stack on memory allocation failures using malloc() and friends.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 70aa7511 | 02-May-2019 |
Jerome Forissier <jerome.forissier@linaro.org> |
Error out if CFG_TA_GPROF_SUPPORT and CFG_ULIBS_SHARED are both enabled
The gprof sample buffer is currently allocated at link time by the TA linker script: ta/arch/arm/ta.ld.S. The size of the buff
Error out if CFG_TA_GPROF_SUPPORT and CFG_ULIBS_SHARED are both enabled
The gprof sample buffer is currently allocated at link time by the TA linker script: ta/arch/arm/ta.ld.S. The size of the buffer is a function of the total TA code size (.text segment). While this works fine for statically linked TAs, it is problematic when shared libraries are used, because in this case the total .text size is not known at link time. As a result, the pre-allocated buffer may be too small, resulting in the following error when the TA is initialized:
E/TA: __utee_gprof_init:159 gprof: could not allocate profiling buffer
One way to fix this problem is to allocate the buffer at run time, once all the shared libraries have been loaded. Since the TA loader is about to be reworked and moved to user space, let's wait for this to occur before implementing a long term solution. This commit just prohibits the problematic configuration in mk/config.mk.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Sumit Garg <sumit.garg@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 5c151b7e | 18-Apr-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: remove CFG_DYN_SHM_CAP
Removes the now obsolete CFG_DYN_SHM_CAP. CFG_CORE_DYN_SHM should be used instead to enable/disable support for dynamic shared memory.
Reviewed-by: Etienne Carriere <et
core: remove CFG_DYN_SHM_CAP
Removes the now obsolete CFG_DYN_SHM_CAP. CFG_CORE_DYN_SHM should be used instead to enable/disable support for dynamic shared memory.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 8aeb6c94 | 18-Apr-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: introduce CFG_CORE_RESERVED_SHM
Introduces CFG_CORE_RESERVED_SHM which if set to y enables reserved shared memory, else disables support for reserved shared memory.
Reviewed-by: Etienne Carri
core: introduce CFG_CORE_RESERVED_SHM
Introduces CFG_CORE_RESERVED_SHM which if set to y enables reserved shared memory, else disables support for reserved shared memory.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 37a6b717 | 18-Apr-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: introduce CFG_CORE_DYN_SHM
Introduces CFG_CORE_DYN_SHM which if set to y enables dynamic shared memory, else disables support for dynamic shared memory. In contrast with CFG_DYN_SHM_CAP it act
core: introduce CFG_CORE_DYN_SHM
Introduces CFG_CORE_DYN_SHM which if set to y enables dynamic shared memory, else disables support for dynamic shared memory. In contrast with CFG_DYN_SHM_CAP it actually removes the support instead of just omit reporting it.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 17888736 | 25-Apr-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: introduce CFG_CORE_HUK_SUBKEY_COMPAT
Adds CFG_CORE_HUK_SUBKEY_COMPAT which if set to 'y' makes huk_subkey_derive() produce RPMB and SSK keys identical to the legacy code.
Reviewed-by: Joakim
core: introduce CFG_CORE_HUK_SUBKEY_COMPAT
Adds CFG_CORE_HUK_SUBKEY_COMPAT which if set to 'y' makes huk_subkey_derive() produce RPMB and SSK keys identical to the legacy code.
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|