History log of /optee_os/lib/ (Results 451 – 475 of 877)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
e29072bd11-Sep-2019 Jerome Forissier <jerome@forissier.org>

Revert "compiler.h: introduce GCC version check"

This reverts commit fc78b3ffc59ef03e599ae952b4345f03f466f11c and
updates the comment in <compiler.h>.

It turns out not only GCC 8.x needs the workar

Revert "compiler.h: introduce GCC version check"

This reverts commit fc78b3ffc59ef03e599ae952b4345f03f466f11c and
updates the comment in <compiler.h>.

It turns out not only GCC 8.x needs the workaround. I tried 4.9, 6.2,
8.2, and 8.3 from various sources (Linaro or Ubuntu). If
__SECTION_FLAGS_RODATA is empty, this warning is always present:

CC out/arm-plat-vexpress/core/mm/fobj.o
{standard input}: Assembler messages:
{standard input}:402: Warning: setting incorrect section attributes for .rodata.__unpaged

The generated assembler file contains the "aw" flags:

$ grep '\.section.*\.rodata\.__unpaged' out/arm-plat-vexpress/core/mm/fobj.s
.section .rodata.__unpaged,"aw",%progbits

By reverting the above commit, we have:

$ grep '\.section.*\.rodata\.__unpaged' out/arm-plat-vexpress/core/mm/fobj.s
.section .rodata.__unpaged,"a",%progbits //,"aw",%progbits

...and the assembler does not warn anymore.

Signed-off-by: Jerome Forissier <jerome@forissier.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

fc78b3ff10-Sep-2019 Jerome Forissier <jerome@forissier.org>

compiler.h: introduce GCC version check

The macro __SECTION_FLAGS_RODATA introduced by commit fd1187725939 ("core:
force read-only flag on .rodata.* sections") is needed for GCC >= 8, so
it should d

compiler.h: introduce GCC version check

The macro __SECTION_FLAGS_RODATA introduced by commit fd1187725939 ("core:
force read-only flag on .rodata.* sections") is needed for GCC >= 8, so
it should depend on __GCC_VERSION. This prepares for Clang.

Signed-off-by: Jerome Forissier <jerome@forissier.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

2e48af9804-Sep-2019 Jens Wiklander <jens.wiklander@linaro.org>

util.h: add the macro ROUNDUP_OVERFLOW()

Adds the macro ROUNDUP_OVERFLOW() which rounds up like ROUNDUP() but also
checks the result for overflow and returns true on overflow.

Reviewed-by: Etienne

util.h: add the macro ROUNDUP_OVERFLOW()

Adds the macro ROUNDUP_OVERFLOW() which rounds up like ROUNDUP() but also
checks the result for overflow and returns true on overflow.

Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Jerome Forissier <jerome@forissier.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

02b0fca704-Sep-2019 Jerome Forissier <jerome@forissier.org>

libutils: bget_malloc.c: copy statistics using memcpy_unckecked()

When CFG_CORE_SANITIZE_KADDRESS=y, most OP-TEE files are built with
address sanitizer flags except bget_malloc.c. As a result, the m

libutils: bget_malloc.c: copy statistics using memcpy_unckecked()

When CFG_CORE_SANITIZE_KADDRESS=y, most OP-TEE files are built with
address sanitizer flags except bget_malloc.c. As a result, the memcpy()
function in memcpy.c is instrumented, whereas the malloc context
structure (malloc_ctx) in bget_malloc.c is not. This causes the
following panic:

$ xtest --stats --alloc

E/TC:0 0 Panic at core/kernel/asan.c:189 <check_access>
E/TC:0 0 Call stack:
E/TC:0 0 0x0e125c3d print_kernel_stack at optee_os/core/arch/arm/kernel/unwind_arm32.c:450
E/TC:0 0 0x0e13fcfb __do_panic at optee_os/core/kernel/panic.c:32 (discriminator 1)
E/TC:0 0 0x0e13e099 check_access at optee_os/core/kernel/asan.c:187 (discriminator 2)
E/TC:0 0 0x0e13e10f check_load at optee_os/core/kernel/asan.c:199
E/TC:0 0 0x0e13e187 __asan_load4_noabort at optee_os/core/kernel/asan.c:231
E/TC:0 0 0x0e185d15 memcpy at optee_os/lib/libutils/isoc/newlib/memcpy.c:112
E/TC:0 0 0x0e184a3f gen_malloc_get_stats at optee_os/lib/libutils/isoc/bget_malloc.c:234
[...]

Introduce memcpy_unchecked() (which evaluates to asan_memcpy_unchecked()
when ASAN is enabled and memcpy() otherwise) to fix the issue.

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 ...

53b7629f03-Sep-2019 Volodymyr Babchuk <volodymyr_babchuk@epam.com>

core: don't use __bss and __data attributes

Manual placement in .data or .bss section breaks GCC Address
Sanitizer, because it refuses to track variables, that are stored in
user sections. Even if t

core: don't use __bss and __data attributes

Manual placement in .data or .bss section breaks GCC Address
Sanitizer, because it refuses to track variables, that are stored in
user sections. Even if those sections are actually not user-defined,
but generic .bss and .data.

Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Jerome Forissier <jerome@forissier.org>
Tested-by: Jerome Forissier <jerome@forissier.org> (HiKey960, ASAN)
Tested-by: Jerome Forissier <jerome@forissier.org> (QEMU, GP, ASAN)

show more ...

d149209829-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 ...

0f8adafe29-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 ...

dc57b11028-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 ...


/optee_os/core/arch/arm/include/kernel/thread.h
/optee_os/core/arch/arm/include/tee/entry_fast.h
/optee_os/core/arch/arm/include/tee/entry_std.h
/optee_os/core/arch/arm/kernel/link_dummies.c
/optee_os/core/arch/arm/kernel/sub.mk
/optee_os/core/arch/arm/kernel/thread.c
/optee_os/core/arch/arm/kernel/thread_a32.S
/optee_os/core/arch/arm/kernel/thread_a64.S
/optee_os/core/arch/arm/kernel/thread_optee_smc.c
/optee_os/core/arch/arm/kernel/thread_optee_smc_a32.S
/optee_os/core/arch/arm/kernel/thread_optee_smc_a64.S
/optee_os/core/arch/arm/kernel/thread_private.h
/optee_os/core/arch/arm/mm/core_mmu_lpae.c
/optee_os/core/arch/arm/plat-bcm/main.c
/optee_os/core/arch/arm/plat-d02/main.c
/optee_os/core/arch/arm/plat-hikey/main.c
/optee_os/core/arch/arm/plat-hisilicon/main.c
/optee_os/core/arch/arm/plat-imx/main.c
/optee_os/core/arch/arm/plat-k3/main.c
/optee_os/core/arch/arm/plat-ls/main.c
/optee_os/core/arch/arm/plat-marvell/main.c
/optee_os/core/arch/arm/plat-mediatek/main.c
/optee_os/core/arch/arm/plat-poplar/main.c
/optee_os/core/arch/arm/plat-rcar/main.c
/optee_os/core/arch/arm/plat-rockchip/main.c
/optee_os/core/arch/arm/plat-rpi3/main.c
/optee_os/core/arch/arm/plat-sam/main.c
/optee_os/core/arch/arm/plat-sprd/main.c
/optee_os/core/arch/arm/plat-stm/main.c
/optee_os/core/arch/arm/plat-stm32mp1/main.c
/optee_os/core/arch/arm/plat-sunxi/main.c
/optee_os/core/arch/arm/plat-synquacer/main.c
/optee_os/core/arch/arm/plat-ti/main.c
/optee_os/core/arch/arm/plat-vexpress/main.c
/optee_os/core/arch/arm/plat-zynq7k/main.c
/optee_os/core/arch/arm/plat-zynqmp/main.c
/optee_os/core/arch/arm/tee/entry_fast.c
/optee_os/core/arch/arm/tee/entry_std.c
/optee_os/core/crypto.mk
/optee_os/core/include/kernel/interrupt.h
/optee_os/core/kernel/interrupt.c
/optee_os/core/lib/libtomcrypt/sub.mk
libmbedtls/core/sub.mk
/optee_os/scripts/sign.py
c96bced401-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 ...

ebef121c01-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 ...

791ee55c08-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 ...

757331fc21-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 ...

f93627d914-Aug-2019 Sumit Garg <sumit.garg@linaro.org>

ftrace: enable trace for utee_* assembly APIs

Enable function trace for utee_* syscall assembly APIs for better view
of user-space to kernel switching.

Suggested-by: Jerome Forissier <jerome.foriss

ftrace: enable trace for utee_* assembly APIs

Enable function trace for utee_* syscall assembly APIs for better view
of user-space to kernel switching.

Suggested-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>

show more ...

f5df167c09-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 ...

4486d58604-Jul-2019 Sumit Garg <sumit.garg@linaro.org>

libutee: add headers for user-space to access sysregs

User space may require to access system registers like generic timer
registers in case function tracing is enabled etc. So provide headers
for u

libutee: add headers for user-space to access sysregs

User space may require to access system registers like generic timer
registers in case function tracing is enabled etc. So provide headers
for user space to access sysregs.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

35bf263029-Jul-2019 Justin Chadwell <justin.chadwell@arm.com>

Remove unnecessary __aeabi functions

Some of the aeabi functions provided are undocumented and are not called
from anywhere. This patch removes them entirely.

Reviewed-by: Jens Wiklander <jens.wikl

Remove unnecessary __aeabi functions

Some of the aeabi functions provided are undocumented and are not called
from anywhere. This patch removes them entirely.

Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Justin Chadwell <justin.chadwell@arm.com>

show more ...


/optee_os/.shippable.yml
/optee_os/MAINTAINERS
/optee_os/core/arch/arm/include/kernel/user_ta.h
/optee_os/core/arch/arm/include/mm/mobj.h
/optee_os/core/arch/arm/kernel/tlb_helpers_a32.S
/optee_os/core/arch/arm/kernel/user_ta.c
/optee_os/core/arch/arm/kernel/vfp_a64.S
/optee_os/core/arch/arm/mm/core_mmu.c
/optee_os/core/arch/arm/mm/mobj.c
/optee_os/core/arch/arm/mm/tee_mmu.c
/optee_os/core/arch/arm/mm/tee_pager.c
/optee_os/core/arch/arm/plat-imx/conf.mk
/optee_os/core/arch/arm/plat-imx/config/imx6qdlsolo.h
/optee_os/core/arch/arm/plat-imx/drivers/imx_caam.c
/optee_os/core/arch/arm/plat-imx/drivers/imx_caam.h
/optee_os/core/arch/arm/plat-imx/drivers/imx_csu.c
/optee_os/core/arch/arm/plat-imx/drivers/imx_scu.c
/optee_os/core/arch/arm/plat-imx/drivers/sub.mk
/optee_os/core/arch/arm/plat-imx/imx-common.c
/optee_os/core/arch/arm/plat-imx/imx-regs.h
/optee_os/core/arch/arm/plat-imx/imx.h
/optee_os/core/arch/arm/plat-imx/main.c
/optee_os/core/arch/arm/plat-imx/platform_config.h
/optee_os/core/arch/arm/plat-imx/sub.mk
/optee_os/core/arch/arm/plat-ls/conf.mk
/optee_os/core/arch/arm/plat-ls/platform_config.h
/optee_os/core/arch/arm/pta/system.c
/optee_os/core/arch/arm/sm/sm_a32.S
/optee_os/core/arch/arm/tee/arch_svc_a32.S
/optee_os/core/arch/arm/tee/arch_svc_a64.S
/optee_os/core/include/mm/tee_mmu.h
/optee_os/core/include/mm/tee_mmu_types.h
/optee_os/core/tee/tee_ree_fs.c
/optee_os/ldelf/main.c
/optee_os/ldelf/ta_elf.c
/optee_os/ldelf/ta_elf.h
libutils/isoc/arch/arm/arm32_aeabi_divmod.c
/optee_os/scripts/gen_ldelf_hex.py
/optee_os/scripts/sign.py
/optee_os/scripts/ta_bin_to_c.py
/optee_os/ta/arch/arm/link.mk
/optee_os/ta/arch/arm/link_shlib.mk
/optee_os/ta/mk/build-user-ta.mk
/optee_os/ta/ta.mk
e3d56a5205-Jul-2019 Jerome Forissier <jerome.forissier@linaro.org>

libutils: import bcmp() from newlib

Recent versions of Clang (later than 8.0.0) may replace calls to
memcmp() by bcmp(). Therefore, provide an implementation of this
function to avoid unresolved sym

libutils: import bcmp() from newlib

Recent versions of Clang (later than 8.0.0) may replace calls to
memcmp() by bcmp(). Therefore, provide an implementation of this
function to avoid unresolved symbol errors.
The same issue was fixed in a similar way in the Linux kernel [1].

Link: [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5f074f3e192f10c9fade898b9b3b8812e3d83342
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

ff7c2da603-Apr-2019 Jerome Forissier <jerome.forissier@linaro.org>

Force alignment of assembler functions (FUNC and LOCAL_FUNC) to 4 bytes

The Clang assembler will not align all the functions containing arm32
code (as opposed to thumb) on 4-byte boundaries, contrar

Force alignment of assembler functions (FUNC and LOCAL_FUNC) to 4 bytes

The Clang assembler will not align all the functions containing arm32
code (as opposed to thumb) on 4-byte boundaries, contrary to GCC. For
example, with the current code, the syscall wrappers in libutee are
like so:

# GCC 8.2.1
$ arm-linux-gnueabihf-objdump -x utee_syscalls_a32.o | \
grep '\.text\.utee_.*\*\*' | head -3
3 .text.utee_panic 00000014 00000000 00000000 00000034 2**2
6 .text.utee_return 00000014 00000000 00000000 0000005c 2**2
9 .text.utee_log 00000014 00000000 00000000 00000078 2**2

# Clang 8.0.0
$ arm-linux-gnueabihf-objdump -x utee_syscalls_a32.o | \
grep '\.text\.utee_.*\*\*' | head -3
1 .text.utee_panic 00000014 00000000 00000000 00000034 2**0
4 .text.utee_return 00000014 00000000 00000000 0000005c 2**0
6 .text.utee_log 00000014 00000000 00000000 00000078 2**0

The bad alignment constraint can cause run time exceptions. Add a
".balign 4" to FUNC and LOCAL_FUNC to fix that.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

9de8272e25-Mar-2019 Jerome Forissier <jerome.forissier@linaro.org>

Remove deprecated ldm/stm instructions

Some uses of SP, PC and LR in the register list of Load/Store Multiple
instructions is forbidden (Thumb) or deprecated (ARM) as per the ARM
ARM DDI 0406 C.d. F

Remove deprecated ldm/stm instructions

Some uses of SP, PC and LR in the register list of Load/Store Multiple
instructions is forbidden (Thumb) or deprecated (ARM) as per the ARM
ARM DDI 0406 C.d. For the LDM instructions, SP should not be in the
list, and the list should not contain both PC and LR. See sections:

[A8.8.58] LDM/LDMIA/LDMFD (Thumb)
[A8.8.59] LDM/LDMIA/LDMFD (ARM)
[A8.8.60] LDMDA/LDMFA
[A8.8.61] LDMDB/LDMEA
[A8.8.62] LDMIB/LDMED

For the STM instructions, neither SP nor PC should be in the list. See
sections:

[A8.8.200] STM (STMIA, STMEA)
[A8.8.201] STMDA (STMED)
[A8.8.202] STMDB (STMFD)
[A8.8.203] STMIB (STMFA)

Clang warns on the deprecated constructs. Use ldr/str instead.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

b6d69a4325-Mar-2019 Jerome Forissier <jerome.forissier@linaro.org>

libutils: ctype.h: do not define functions as builtins

Our <ctype.h> defines a number of functions as macros that evaluate to
the builtin function of the same name, for instance:

#define isalpha(_

libutils: ctype.h: do not define functions as builtins

Our <ctype.h> defines a number of functions as macros that evaluate to
the builtin function of the same name, for instance:

#define isalpha(__c) __builtin_isalpha(__c)

There are two problems with this:

1. It gets in the way of the application developer and makes some
compiler flags irrelevant (-fno-builtin*, [1]).
2. Different compilers do not support the same set of builtin functions
so having the defines can result in build errors.

Therefore, user regular prototypes in <ctype.h>. Also build libutils
without the -ffreestanding flag because it implies -fno-builtin and
therefore may needlessly disable optimizations. The libutils
environment cannot be considered "free standing" since it implements
the standard header files with the expected semantics.

Our implementations of the <ctypes.h> functions (isalnum(), isalpha(),
etc.) are defined with the __builtin_ prefix. This is not needed and
is arguably wrong. Indeed, we want the functions in libutils to be
present without the prefix, which GCC happens to be doing regardless.
However, this __builtin_ prefix in the .c files makes things more
complicated to support Clang. Therefore, remove it.

Link: [1] https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html (-fno-builtin)
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

146a256b05-Jul-2019 Jerome Forissier <jerome.forissier@linaro.org>

libutils/newlib: sort sub.mk in alphabetical order

Sort "src-y" lines by alphabetical order.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@l

libutils/newlib: sort sub.mk in alphabetical order

Sort "src-y" lines by alphabetical order.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

d364213525-Mar-2019 Jerome Forissier <jerome.forissier@linaro.org>

libutils: asm.S: remove .func/.endfunc directives

The .func and .endfunc directives are ignored unless the file is
compiled with debugging enabled and --gstabs. Since we do not use
this debugging fo

libutils: asm.S: remove .func/.endfunc directives

The .func and .endfunc directives are ignored unless the file is
compiled with debugging enabled and --gstabs. Since we do not use
this debugging format, .func and .endfunc are effectively no-ops.

The Clang compiler does not recognize these directives. Therefore,
in preparation for Clang support, remove them.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

c96d709101-Jul-2019 Sumit Garg <sumit.garg@linaro.org>

ftrace: Enable support for 32 bit apps

By default 32 bit trusted applications are compiled in thumb mode but
thumb mode doesn't support function graph tracing due to missing frame
pointer support re

ftrace: Enable support for 32 bit apps

By default 32 bit trusted applications are compiled in thumb mode but
thumb mode doesn't support function graph tracing due to missing frame
pointer support required to trace function call chain. So rather compile
trusted applications in ARM mode in case function tracing is enabled.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>

show more ...

3dd0e94e18-Jun-2019 Jens Wiklander <jens.wiklander@linaro.org>

libutils: add trace_vprintf()

Adds the trace_vprintf() helper function.

Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

34db717212-Jun-2019 Jens Wiklander <jens.wiklander@linaro.org>

core: pta_system: support memory remap

Adds PTA_SYSTEM_REMAP to support changing virtual address of an already
established mapping in a TA.

Reviewed-by: Jerome Forissier <jerome.forissier@linaro.or

core: pta_system: support memory remap

Adds PTA_SYSTEM_REMAP to support changing virtual address of an already
established mapping in a TA.

Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

1...<<11121314151617181920>>...36