History log of /optee_os/lib/libutils/ (Results 201 – 225 of 364)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
b1f3797d06-Feb-2019 Volodymyr Babchuk <vlad.babchuk@gmail.com>

bget: fix nex_ pool building with disabled stats

gen_malloc_reset_stats() and gen_malloc_get_stats()
are only available when BufStats is defined.

Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmai

bget: fix nex_ pool building with disabled stats

gen_malloc_reset_stats() and gen_malloc_get_stats()
are only available when BufStats is defined.

Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

8cd8a62906-Feb-2019 Jens Wiklander <jens.wiklander@linaro.org>

Remove memalign()

Removes the unused memalign() function. Usage of this function will
cause severe fragmentation of the heap.

Another problem is with the implementation which is added on top of bge

Remove memalign()

Removes the unused memalign() function. Usage of this function will
cause severe fragmentation of the heap.

Another problem is with the implementation which is added on top of bget
while still depending heavily on internals of bget. The implementation was
somewhat buggy since it can sometimes can cause:
E/TC:0 0 assertion 'bn->prevfree == 0' failed at lib/libutils/isoc/bget_malloc.c
:423 <create_free_block>
E/TC:0 0 Panic at core/kernel/assert.c:28 <_assert_break>

Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Volodymyr Babchuk <vlad.babchuk@gmail.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

b2dd874705-Feb-2019 Jens Wiklander <jens.wiklander@linaro.org>

Fix alignment of data for mempool_alloc_pool()

Prior to this patch was _TEE_MathAPI_Init() in
lib/libutee/tee_api_arith_mpi.c supplying a data buffer which was only 4
byte aligned while mempool_allo

Fix alignment of data for mempool_alloc_pool()

Prior to this patch was _TEE_MathAPI_Init() in
lib/libutee/tee_api_arith_mpi.c supplying a data buffer which was only 4
byte aligned while mempool_alloc_pool() requires the alignment of long.
This will work in 32-bit mode, but could lead to alignment problem in
64-bit mode. The same problem can happen with
lib/libutee/tee_api_arith_mpa.c, but so far it has remained hidden.

Incorrect alignment can result in errors like:
E/TA: assertion '!((vaddr_t)data & (POOL_ALIGN - 1))' failed at lib/libutils/ext/mempool.c:134 in mempool_alloc_pool()

This fix introduces MEMPOOL_ALIGN which specifies required alignment of
data supplied to mempool_alloc_pool().

Fixes: 062e3d01c039 ("ta: switch to to mbedtls for bignum")
Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
Tested-by: Joakim Bech <joakim.bech@linaro.org> (QEMU v8)
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

1131d3c518-Dec-2018 Volodymyr Babchuk <vlad.babchuk@gmail.com>

libutils: add nex_strdup() function

This is the same as strdup() but it uses nex_malloc(), so
it can be used in nexus part of OP-TEE.

Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com>
Revie

libutils: add nex_strdup() function

This is the same as strdup() but it uses nex_malloc(), so
it can be used in nexus part of OP-TEE.

Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

c211d0a406-Feb-2018 Volodymyr Babchuk <vlad.babchuk@gmail.com>

virt: tag variables with __nex_data and __nex_bss

Variables that are needed by OP-TEE nexus will be moved
to nexus memory.

Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com>
Acked-by: Jens W

virt: tag variables with __nex_data and __nex_bss

Variables that are needed by OP-TEE nexus will be moved
to nexus memory.

Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

15216d4d06-Feb-2018 Volodymyr Babchuk <vlad.babchuk@gmail.com>

virt: add nexus memory area

This patch is the first in series of patches that split OP-TEE RW memory
into two regions: nexus memory and TEE memory. Nexus memory will
be always mapped and it will be

virt: add nexus memory area

This patch is the first in series of patches that split OP-TEE RW memory
into two regions: nexus memory and TEE memory. Nexus memory will
be always mapped and it will be used to store all data that is
vital for OP-TEE core and is not bound to virtual guests.

TEE memory is a memory that holds data specific for certain guest.
There will be TEE memory bank for every guest and it will be mapped
into OP-TEE address space only during call from that guest.

This patch adds nexus memory and moves stacks into it. Also
it provides __nex_bss and __nex_data macros, so one can easily set right
section for a variable.

Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

386fc26405-Feb-2018 Volodymyr Babchuk <vlad.babchuk@gmail.com>

bget_malloc: add nex_malloc pool

If virtualization enabled, this pool will be used to allocate
memory for OP-TEE nexus needs.
Without virtualization, generic malloc pool will be used.

Signed-off-by

bget_malloc: add nex_malloc pool

If virtualization enabled, this pool will be used to allocate
memory for OP-TEE nexus needs.
Without virtualization, generic malloc pool will be used.

Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

741b437f05-Feb-2018 Volodymyr Babchuk <vlad.babchuk@gmail.com>

bget_malloc: hold all malloc state in malloc_ctx structure

This patch moves all bget_malloc.c state into malloc_ctx structure.
malloc_lock.c is removed because spinlock now is also stored in
malloc_

bget_malloc: hold all malloc state in malloc_ctx structure

This patch moves all bget_malloc.c state into malloc_ctx structure.
malloc_lock.c is removed because spinlock now is also stored in
malloc_ctx.

Multiple malloc pools can be used now.

Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

7539e8c331-Jan-2019 PeiKan Tsai <mark1990301@gmail.com>

bget: Check for size overflow

Check size overflow to avoid size <= 0 which may be caused by
calculation "size += sizeof(struct bhead)" and
"size = (size + (SizeQuant - 1)) & (~(SizeQuant - 1))".

Si

bget: Check for size overflow

Check size overflow to avoid size <= 0 which may be caused by
calculation "size += sizeof(struct bhead)" and
"size = (size + (SizeQuant - 1)) & (~(SizeQuant - 1))".

Signed-off-by: Peikan Tsai <mark1990301@gmail.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

b6bc49ca17-Jan-2019 Sumit Garg <sumit.garg@linaro.org>

trace: fix core id print if in non-atomic context

Make "?" print repetitive equivalent to number of digits needed to display
core id rather than extra spaces as it causes symbolize.py script parsing

trace: fix core id print if in non-atomic context

Make "?" print repetitive equivalent to number of digits needed to display
core id rather than extra spaces as it causes symbolize.py script parsing
failure for call stack addresses in case number of cores is greater than
10.

Also change symbolize.py to detect repetitive "?".

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

60b3990416-Jan-2019 Jens Wiklander <jens.wiklander@linaro.org>

mempool: fix race in get_pool()

Fixes a race in get_pool() which could leave the pool with zero refences
but still owned by the last thread using the pool.

Some performance number on Hikey with def

mempool: fix race in get_pool()

Fixes a race in get_pool() which could leave the pool with zero refences
but still owned by the last thread using the pool.

Some performance number on Hikey with default configuration:
github/master (edbb89f, before this commit):

4006 real 1m 41.11s
4007 real 1m 14.51s
4008 real 0m 0.13s
4009 real 1m 5.68s

Revert "mempool: optimize reference counting", before this commit:
4006 real 3m 27.78s
4007 real 0m 50.03s
4008 real 0m 0.13s
4009 real 2m 24.07s

With this commit, two runs:
4006 real 1m 37.51s
4007 real 0m 56.67s
4008 real 0m 0.09s
4009 real 1m 3.18s

4006 real 1m 37.61s
4007 real 0m 35.32s
4008 real 0m 0.13s
4009 real 1m 3.15s

Numbers are gathered with this script:
for a in 4006 4007 4008 4009 ; do \
echo -n $a " " >> time.txt ;\
time -o time.txt.tmp xtest -l 15 $a || break ;\
grep real time.txt.tmp >> time.txt
done
cat time.txt

Reviewed-by: Volodymyr Babchuk <vlad.babchuk@gmail.com>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

9133478716-Jan-2019 Jens Wiklander <jens.wiklander@linaro.org>

atomic.h: add atomic_{load,store}_int()

Adds atomic_load_int() and atomic_store_int().

Reviewed-by: Volodymyr Babchuk <vlad.babchuk@gmail.com>
Acked-by: Jerome Forissier <jerome.forissier@linaro.or

atomic.h: add atomic_{load,store}_int()

Adds atomic_load_int() and atomic_store_int().

Reviewed-by: Volodymyr Babchuk <vlad.babchuk@gmail.com>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


/optee_os/.shippable.yml
/optee_os/MAINTAINERS
/optee_os/Makefile
/optee_os/README.md
/optee_os/core/arch/arm/arm.mk
/optee_os/core/arch/arm/dts/stm32mp157-pinctrl.dtsi
/optee_os/core/arch/arm/dts/stm32mp157c-ed1.dts
/optee_os/core/arch/arm/dts/stm32mp157c-ev1.dts
/optee_os/core/arch/arm/dts/stm32mp157c.dtsi
/optee_os/core/arch/arm/include/arm64.h
/optee_os/core/arch/arm/include/kernel/delay.h
/optee_os/core/arch/arm/include/kernel/generic_boot.h
/optee_os/core/arch/arm/include/kernel/pseudo_ta.h
/optee_os/core/arch/arm/include/kernel/timer.h
/optee_os/core/arch/arm/include/kernel/user_ta.h
/optee_os/core/arch/arm/include/mm/core_memprot.h
/optee_os/core/arch/arm/kernel/delay.c
/optee_os/core/arch/arm/kernel/generic_boot.c
/optee_os/core/arch/arm/kernel/pseudo_ta.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_private.h
/optee_os/core/arch/arm/kernel/timer_a64.c
/optee_os/core/arch/arm/mm/core_mmu.c
/optee_os/core/arch/arm/mm/mobj.c
/optee_os/core/arch/arm/plat-d02/conf.mk
/optee_os/core/arch/arm/plat-hikey/conf.mk
/optee_os/core/arch/arm/plat-imx/conf.mk
/optee_os/core/arch/arm/plat-imx/imx-regs.h
/optee_os/core/arch/arm/plat-imx/main.c
/optee_os/core/arch/arm/plat-imx/sub.mk
/optee_os/core/arch/arm/plat-k3/conf.mk
/optee_os/core/arch/arm/plat-ls/conf.mk
/optee_os/core/arch/arm/plat-ls/main.c
/optee_os/core/arch/arm/plat-ls/platform_config.h
/optee_os/core/arch/arm/plat-marvell/conf.mk
/optee_os/core/arch/arm/plat-mediatek/conf.mk
/optee_os/core/arch/arm/plat-poplar/conf.mk
/optee_os/core/arch/arm/plat-rcar/conf.mk
/optee_os/core/arch/arm/plat-rockchip/conf.mk
/optee_os/core/arch/arm/plat-rpi3/conf.mk
/optee_os/core/arch/arm/plat-sam/conf.mk
/optee_os/core/arch/arm/plat-sprd/conf.mk
/optee_os/core/arch/arm/plat-stm/conf.mk
/optee_os/core/arch/arm/plat-stm32mp1/conf.mk
/optee_os/core/arch/arm/plat-stm32mp1/drivers/stm32mp1_rcc.c
/optee_os/core/arch/arm/plat-stm32mp1/drivers/stm32mp1_rcc.h
/optee_os/core/arch/arm/plat-stm32mp1/drivers/sub.mk
/optee_os/core/arch/arm/plat-stm32mp1/link.mk
/optee_os/core/arch/arm/plat-stm32mp1/main.c
/optee_os/core/arch/arm/plat-stm32mp1/platform_config.h
/optee_os/core/arch/arm/plat-stm32mp1/pm/psci.c
/optee_os/core/arch/arm/plat-stm32mp1/pm/sub.mk
/optee_os/core/arch/arm/plat-stm32mp1/scripts/stm32image.py
/optee_os/core/arch/arm/plat-stm32mp1/stm32_util.h
/optee_os/core/arch/arm/plat-stm32mp1/sub.mk
/optee_os/core/arch/arm/plat-sunxi/conf.mk
/optee_os/core/arch/arm/plat-synquacer/conf.mk
/optee_os/core/arch/arm/plat-synquacer/main.c
/optee_os/core/arch/arm/plat-synquacer/platform_config.h
/optee_os/core/arch/arm/plat-synquacer/rng_pta.c
/optee_os/core/arch/arm/plat-synquacer/rng_pta.h
/optee_os/core/arch/arm/plat-synquacer/rng_pta_client.h
/optee_os/core/arch/arm/plat-synquacer/sub.mk
/optee_os/core/arch/arm/plat-ti/conf.mk
/optee_os/core/arch/arm/plat-vexpress/conf.mk
/optee_os/core/arch/arm/plat-zynq7k/conf.mk
/optee_os/core/arch/arm/plat-zynqmp/conf.mk
/optee_os/core/arch/arm/pta/benchmark.c
/optee_os/core/arch/arm/pta/device.c
/optee_os/core/arch/arm/pta/sub.mk
/optee_os/core/arch/arm/tee/arch_svc.c
/optee_os/core/arch/arm/tee/entry_fast.c
/optee_os/core/crypto.mk
/optee_os/core/drivers/gic.c
/optee_os/core/drivers/imx_wdog.c
/optee_os/core/drivers/stm32_uart.c
/optee_os/core/include/console.h
/optee_os/core/include/crypto/crypto.h
/optee_os/core/include/drivers/serial.h
/optee_os/core/include/drivers/stm32_uart.h
/optee_os/core/include/dt-bindings/clock/stm32mp1-clks.h
/optee_os/core/include/dt-bindings/gpio/gpio.h
/optee_os/core/include/dt-bindings/interrupt-controller/arm-gic.h
/optee_os/core/include/dt-bindings/interrupt-controller/irq.h
/optee_os/core/include/dt-bindings/pinctrl/stm32-pinfunc.h
/optee_os/core/include/dt-bindings/reset/stm32mp1-resets.h
/optee_os/core/include/io.h
/optee_os/core/include/kernel/dt.h
/optee_os/core/include/kernel/pm.h
/optee_os/core/kernel/console.c
/optee_os/core/kernel/dt.c
/optee_os/core/kernel/pm.c
/optee_os/core/kernel/sub.mk
/optee_os/core/lib/libtomcrypt/include/tomcrypt_custom.h
/optee_os/core/lib/libtomcrypt/include/tomcrypt_hash.h
/optee_os/core/lib/libtomcrypt/src/hashes/sha2/sha512_256.c
/optee_os/core/lib/libtomcrypt/src/hashes/sha2/sub.mk
/optee_os/core/lib/libtomcrypt/src/tee_ltc_provider.c
/optee_os/core/sub.mk
/optee_os/core/tee/sub.mk
/optee_os/core/tee/tee_svc_storage.c
/optee_os/documentation/dt-bindings/README.txt
/optee_os/documentation/porting_guidelines.md
/optee_os/lib/libmbedtls/include/mbedtls_config_uta.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/bignum.h
/optee_os/lib/libmbedtls/mbedtls/library/bignum.c
/optee_os/lib/libutee/arch/arm/utee_syscalls_asm.S
/optee_os/lib/libutee/include/pta_device.h
/optee_os/lib/libutee/include/tee_syscall_numbers.h
/optee_os/lib/libutee/include/user_ta_header.h
/optee_os/lib/libutee/sub.mk
/optee_os/lib/libutee/tee_api_arith_mpa.c
/optee_os/lib/libutee/tee_api_arith_mpi.c
ext/include/atomic.h
/optee_os/mk/aosp_optee.mk
/optee_os/mk/config.mk
/optee_os/scripts/checkpatch_inc.sh
/optee_os/scripts/gen_hashed_bin.py
/optee_os/scripts/gen_ld_sects.py
/optee_os/ta/avb/entry.c
/optee_os/ta/avb/include/ta_avb.h
/optee_os/ta/mk/build-user-ta.mk
/optee_os/ta/mk/ta_dev_kit.mk
/optee_os/ta/ta.mk
/optee_os/typedefs.checkpatch
e7d51f4212-Nov-2018 Jens Wiklander <jens.wiklander@linaro.org>

mempool: add mempool_calloc()

Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

b31756b315-Nov-2018 Jerome Forissier <jerome.forissier@linaro.org>

lib.mk: centralize profiling flag (-pg)

Code cleanup, no functional change. This commit avoids the duplication of
the -pg flag in the library makefiles.

Signed-off-by: Jerome Forissier <jerome.fori

lib.mk: centralize profiling flag (-pg)

Code cleanup, no functional change. This commit avoids the duplication of
the -pg flag in the library makefiles.

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

show more ...


/optee_os/.travis.yml
/optee_os/core/arch/arm/include/kernel/thread.h
/optee_os/core/arch/arm/include/mm/mobj.h
/optee_os/core/arch/arm/kernel/ree_fs_ta.c
/optee_os/core/arch/arm/kernel/tee_time.c
/optee_os/core/arch/arm/kernel/thread.c
/optee_os/core/arch/arm/kernel/user_ta.c
/optee_os/core/arch/arm/kernel/wait_queue.c
/optee_os/core/arch/arm/pta/benchmark.c
/optee_os/core/arch/arm/pta/gprof.c
/optee_os/core/arch/arm/tee/pta_socket.c
/optee_os/core/core.mk
/optee_os/core/include/kernel/msg_param.h
/optee_os/core/include/optee_msg.h
/optee_os/core/include/optee_rpc_cmd.h
/optee_os/core/include/tee/tee_fs_rpc.h
/optee_os/core/include/tee/uuid.h
/optee_os/core/kernel/msg_param.c
/optee_os/core/lib/libtomcrypt/include/tomcrypt_custom.h
/optee_os/core/lib/libtomcrypt/include/tomcrypt_macros.h
/optee_os/core/lib/libtomcrypt/include/tomcrypt_pkcs.h
/optee_os/core/lib/libtomcrypt/src/mpi_desc.c
/optee_os/core/lib/libtomcrypt/src/pk/rsa/rsa_sign_hash.c
/optee_os/core/lib/libtomcrypt/src/pk/rsa/rsa_verify_hash.c
/optee_os/core/lib/libtomcrypt/src/sub.mk
/optee_os/core/lib/libtomcrypt/src/tee_ltc_provider.c
/optee_os/core/lib/zlib/inflate.c
/optee_os/core/tee/fs_htree.c
/optee_os/core/tee/tadb.c
/optee_os/core/tee/tee_fs_rpc.c
/optee_os/core/tee/tee_ree_fs.c
/optee_os/core/tee/tee_rpmb_fs.c
/optee_os/core/tee/tee_svc_cryp.c
/optee_os/documentation/extensions/crypto_rsassa_pkcs1_v1_5.md
/optee_os/documentation/extensions/extensions.md
/optee_os/lib/libmbedtls/include/mbedtls_config_kernel.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/bignum.h
/optee_os/lib/libmbedtls/mbedtls/library/bignum.c
/optee_os/lib/libmbedtls/sub.mk
/optee_os/lib/libmpa/sub.mk
/optee_os/lib/libutee/include/tee_api_defines.h
/optee_os/lib/libutee/include/tee_api_defines_extensions.h
/optee_os/lib/libutee/sub.mk
/optee_os/lib/libutee/tee_api_operations.c
sub.mk
/optee_os/mk/config.mk
/optee_os/mk/lib.mk
/optee_os/scripts/gen_hashed_bin.py
/optee_os/scripts/gen_ld_sects.py
/optee_os/scripts/mem_usage.py
/optee_os/scripts/pem_to_pub_c.py
/optee_os/scripts/sign.py
/optee_os/scripts/symbolize.py
/optee_os/scripts/ta_bin_to_c.py
/optee_os/scripts/tee_bin_parser.py
b69b86b608-Nov-2018 Jens Wiklander <jens.wiklander@linaro.org>

mempool: report max memory usage

Adds CFG_MEMPOOL_REPORT_LAST_OFFSET which if set to y causes mempool to
report each time the maximum amount of memory has increased. This helps
to determine required

mempool: report max memory usage

Adds CFG_MEMPOOL_REPORT_LAST_OFFSET which if set to y causes mempool to
report each time the maximum amount of memory has increased. This helps
to determine required size of a mempool.

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

show more ...

d4f909c008-Nov-2018 Jens Wiklander <jens.wiklander@linaro.org>

mempool: optimize reference counting

Optimizes reference counting in mempool by using refcount_inc() and
refcount_dec() in order to be able to avoid using the mutex in the quick
case.

Reviewed-by:

mempool: optimize reference counting

Optimizes reference counting in mempool by using refcount_inc() and
refcount_dec() in order to be able to avoid using the mutex in the quick
case.

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

show more ...

b54b9a9809-Nov-2018 Jens Wiklander <jens.wiklander@linaro.org>

mempool: add out of memory message

Adds a helpful message when a memory allocation with mempool_alloc()
fails. If this occurs it's because the memory pool size isn't tuned
properly with regards to t

mempool: add out of memory message

Adds a helpful message when a memory allocation with mempool_alloc()
fails. If this occurs it's because the memory pool size isn't tuned
properly with regards to the user of the pool.

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

show more ...

3f58e4ec05-Nov-2018 Ovidiu Mihalachi <ovidiu_mihalachi@mentor.com>

trace levels: Redefine TRACE_MIN level to 0

The global `trace_level` session-wise indicator which is set by
`trace_set_level()` [1], could get a wrong value in case of an
input `level` set to 0, mea

trace levels: Redefine TRACE_MIN level to 0

The global `trace_level` session-wise indicator which is set by
`trace_set_level()` [1], could get a wrong value in case of an
input `level` set to 0, meaning that all logs need to be disabled
by user define `CFG_TEE_TA_LOG_LEVEL=0` when building TA applications.

This inconsistency is caused by a rather wrong value of `TRACE_MIN`
low boundary value set to 1. According to [1] `trace level` will be
set to `TRACE_MAX` (4) in case input level is smaller than `TRACE_MIN`
and larger than `TRACE_MAX`.
In the scenario when the needed log level is 0, `trace level` would be
set to `TRACE_MAX` and will cause a lot of flow log level information
dumped by trace functions/macros that are using `trace_printf()`
primitive.

This patch sets the `TRACE_MIN` to 0 in order to assure a proper trace
level setting and completely disable all logs in case
`CFG_TEE_TA_LOG_LEVEL=0`.

[1]
void trace_set_level(int level)
{
if (((int)level >= TRACE_MIN) && (level <= TRACE_MAX))
trace_level = level;
else
trace_level = TRACE_MAX;
}

Acked-by: Christoph Gellner <cgellner@de.adit-jv.com>
Signed-off-by: Ovidiu Mihalachi <ovidiu_mihalachi@mentor.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...

7445d9ac13-Nov-2018 Jerome Forissier <jerome.forissier@linaro.org>

Move __early_ta from <compiler.h> to <kernel/early_ta.h>

The __early_ta macro is used only in C files generated by
scripts/ta_bin_to_c.py. There is no reason to have it defined in a widely
used head

Move __early_ta from <compiler.h> to <kernel/early_ta.h>

The __early_ta macro is used only in C files generated by
scripts/ta_bin_to_c.py. There is no reason to have it defined in a widely
used header like <compiler.h>.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...

fd11877212-Nov-2018 Jerome Forissier <jerome.forissier@linaro.org>

core: force read-only flag on .rodata.* sections

This commit fixes a warning with GCC 8.2 that did not occur with GCC 6.2:

$ make out/arm-plat-vexpress/core/arch/arm/kernel/user_ta.o
CHK ou

core: force read-only flag on .rodata.* sections

This commit fixes a warning with GCC 8.2 that did not occur with GCC 6.2:

$ make out/arm-plat-vexpress/core/arch/arm/kernel/user_ta.o
CHK out/arm-plat-vexpress/conf.mk
CHK out/arm-plat-vexpress/include/generated/conf.h
CHK out/arm-plat-vexpress/core/include/generated/asm-defines.h
CC out/arm-plat-vexpress/core/arch/arm/kernel/user_ta.o
{standard input}: Assembler messages:
{standard input}:4087: Warning: setting incorrect section attributes for .rodata.__unpaged

The message is printed as the assembler processes this code fragment,
generated by the C compiler:

.section .rodata.__unpaged,"aw"

The older compiler (GCC 6.2) would generate instead:

.section .rodata.__unpaged,"a",%progbits

The problem with .rodata.__unpaged,"aw" is that the "w" (writeable) flag
is not consistent with the section name (.rodata.*), which by convention
is supposed to be read-only.

- The section name (".rodata.__unpaged") is given by our macro:
__rodata_unpaged.
- The "w" flag is added by GCC, not sure why exactly. One reason [1] is
when a relocatable binary is being generated and the structure contains
relocatable data. But, we are not explicitly asking for a relocatable
binary, so this might as well be a bug or counter-intuitive feature of
the compiler.

Anyway, to avoid the warning, we need to fix the section flags. The
section type (%progbits) is optional, it is deduced from the section name
by default. %progbits indicates that the section contains data (i.e., is
not empty).

Link: [1] https://gcc.gnu.org/ml/gcc/2004-05/msg01016.html
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> (HiKey960)
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...

b38854bd09-Nov-2018 Bryan O'Donoghue <bryan.odonoghue@linaro.org>

libutils: Import strtoul from newlib

This patch imports strtoul from newlib which the latest version of libfdt
depends on.

Some modification of the original source is required to do this,
specifica

libutils: Import strtoul from newlib

This patch imports strtoul from newlib which the latest version of libfdt
depends on.

Some modification of the original source is required to do this,
specifically:

This is an import of the newlib 1.19.0 version of strtoul dropping

- Headers and prototypes for re-entrancy

- Any reliance on errno

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...

9fdd6c3c10-Nov-2018 Bryan O'Donoghue <bryan.odonoghue@linaro.org>

libutils: isoc: implement isalpha(), isspace() and isupper()

This patch implements isalpha(), isspace() and isupper() which are
dependencies for a subsequent patch which brings in strtoul from newli

libutils: isoc: implement isalpha(), isspace() and isupper()

This patch implements isalpha(), isspace() and isupper() which are
dependencies for a subsequent patch which brings in strtoul from newlib.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...

da1d55f309-Nov-2018 Bryan O'Donoghue <bryan.odonoghue@linaro.org>

libutils: Import strrchr from newlib

libfdt 1.4.7 depends on strrchr, this patch imports the same from newlib.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Etienne Carr

libutils: Import strrchr from newlib

libfdt 1.4.7 depends on strrchr, this patch imports the same from newlib.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...

5810998e15-Oct-2018 Jerome Forissier <jerome.forissier@linaro.org>

libutils: sys/queue.h: add STAILQ_FOREACH_SAFE()

Import macro STAILQ_FOREACH_SAFE from FreeBSD.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Joakim Bech <joakim.bech@l

libutils: sys/queue.h: add STAILQ_FOREACH_SAFE()

Import macro STAILQ_FOREACH_SAFE from FreeBSD.

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

show more ...


/optee_os/CHANGELOG.md
/optee_os/core/arch/arm/arm.mk
/optee_os/core/arch/arm/include/kernel/thread.h
/optee_os/core/arch/arm/include/kernel/unwind.h
/optee_os/core/arch/arm/include/kernel/vfp.h
/optee_os/core/arch/arm/include/mm/mobj.h
/optee_os/core/arch/arm/kernel/abort.c
/optee_os/core/arch/arm/kernel/delay.c
/optee_os/core/arch/arm/kernel/kern.ld.S
/optee_os/core/arch/arm/kernel/otp_stubs.c
/optee_os/core/arch/arm/kernel/ree_fs_ta.c
/optee_os/core/arch/arm/kernel/thread.c
/optee_os/core/arch/arm/kernel/thread_private.h
/optee_os/core/arch/arm/kernel/unwind_arm32.c
/optee_os/core/arch/arm/kernel/unwind_arm64.c
/optee_os/core/arch/arm/kernel/unwind_private.h
/optee_os/core/arch/arm/kernel/user_ta.c
/optee_os/core/arch/arm/kernel/vfp.c
/optee_os/core/arch/arm/mm/mobj.c
/optee_os/core/arch/arm/plat-hikey/platform_config.h
/optee_os/core/arch/arm/plat-imx/conf.mk
/optee_os/core/arch/arm/plat-ls/main.c
/optee_os/core/arch/arm/plat-ti/main.c
/optee_os/core/arch/arm/plat-vexpress/conf.mk
/optee_os/core/arch/arm/pta/benchmark.c
/optee_os/core/arch/arm/pta/gprof.c
/optee_os/core/arch/arm/pta/sub.mk
/optee_os/core/arch/arm/tee/entry_std.c
/optee_os/core/arch/arm/tee/pta_socket.c
/optee_os/core/drivers/imx_uart.c
/optee_os/core/drivers/imx_wdog.c
/optee_os/core/include/kernel/msg_param.h
/optee_os/core/include/kernel/tee_common_otp.h
/optee_os/core/include/tee/tee_fs_rpc.h
/optee_os/core/kernel/msg_param.c
/optee_os/core/tee/tadb.c
/optee_os/core/tee/tee_fs_rpc.c
/optee_os/core/tee/tee_fs_rpc_cache.c
/optee_os/core/tee/tee_rpmb_fs.c
/optee_os/documentation/porting_guidelines.md
/optee_os/documentation/secure_storage.md
/optee_os/lib/libutee/base64.c
isoc/include/sys/queue.h
/optee_os/scripts/checkpatch.sh
/optee_os/scripts/symbolize.py
bde8a25002-Oct-2018 Joakim Bech <joakim.bech@linaro.org>

pager: enable BestFit allocation when using the pager

When running xtest 6018 we have got panics because of
TEE_ERROR_OUT_OF_MEMORY errors when trying to allocate memory (using
malloc and calloc). T

pager: enable BestFit allocation when using the pager

When running xtest 6018 we have got panics because of
TEE_ERROR_OUT_OF_MEMORY errors when trying to allocate memory (using
malloc and calloc). The reason for this seems to be a fragmented heap
when running with the pager enabled. By enabling the BestFit algorithm
in bget we have seen a much improved use of the heap with a lot less
fragmentation. We have been running xtest on QEMU v8 and HiKey 6220 and
the performance difference seems to be negligible.

Fixes: https://github.com/OP-TEE/optee_os/issues/2580

Signed-off-by: Joakim Bech <joakim.bech@linaro.org>
Tested-by: Joakim Bech <joakim.bech@linaro.org> (HiKey 6220, QEMU v8)
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


/optee_os/.shippable.yml
/optee_os/.travis.yml
/optee_os/MAINTAINERS
/optee_os/README.md
/optee_os/core/arch/arm/arm.mk
/optee_os/core/arch/arm/include/arm32.h
/optee_os/core/arch/arm/include/arm32_macros.S
/optee_os/core/arch/arm/include/arm64.h
/optee_os/core/arch/arm/include/mm/mobj.h
/optee_os/core/arch/arm/include/sm/sm.h
/optee_os/core/arch/arm/kernel/abort.c
/optee_os/core/arch/arm/kernel/arm32_gicv3_sysreg.txt
/optee_os/core/arch/arm/kernel/arm32_sysreg.txt
/optee_os/core/arch/arm/kernel/asm-defines.c
/optee_os/core/arch/arm/kernel/generic_boot.c
/optee_os/core/arch/arm/kernel/generic_entry_a32.S
/optee_os/core/arch/arm/kernel/pseudo_ta.c
/optee_os/core/arch/arm/kernel/ree_fs_ta.c
/optee_os/core/arch/arm/kernel/thread_a32.S
/optee_os/core/arch/arm/kernel/user_ta.c
/optee_os/core/arch/arm/mm/core_mmu.c
/optee_os/core/arch/arm/mm/mobj.c
/optee_os/core/arch/arm/plat-imx/conf.mk
/optee_os/core/arch/arm/plat-imx/config/imx6sx.h
/optee_os/core/arch/arm/plat-imx/platform_config.h
/optee_os/core/arch/arm/plat-imx/pm/psci.c
/optee_os/core/arch/arm/plat-ls/conf.mk
/optee_os/core/arch/arm/plat-ls/platform_config.h
/optee_os/core/arch/arm/plat-ls/sub.mk
/optee_os/core/arch/arm/plat-rpi3/platform_config.h
/optee_os/core/arch/arm/plat-sunxi/conf.mk
/optee_os/core/arch/arm/plat-sunxi/main.c
/optee_os/core/arch/arm/plat-sunxi/platform_config.h
/optee_os/core/arch/arm/plat-sunxi/sub.mk
/optee_os/core/arch/arm/plat-ti/a9_plat_init.S
/optee_os/core/arch/arm/pta/benchmark.c
/optee_os/core/arch/arm/pta/core_self_tests.c
/optee_os/core/arch/arm/sm/pm_a32.S
/optee_os/core/arch/arm/sm/sm.c
/optee_os/core/arch/arm/sm/sm_a32.S
/optee_os/core/arch/arm/tee/entry_std.c
/optee_os/core/drivers/gic.c
/optee_os/core/include/io.h
/optee_os/core/include/optee_msg.h
/optee_os/core/kernel/dt.c
/optee_os/core/kernel/tee_misc.c
/optee_os/core/lib/libtomcrypt/src/sub.mk
/optee_os/core/tee/tadb.c
/optee_os/core/tee/tee_cryp_utl.c
/optee_os/documentation/build_system.md
/optee_os/documentation/porting_guidelines.md
/optee_os/lib/libmpa/sub.mk
isoc/bget.c
/optee_os/mk/aosp_optee.mk
/optee_os/mk/cleanvars.mk
/optee_os/mk/compile.mk
/optee_os/mk/config.mk
/optee_os/scripts/arm32_sysreg.py
/optee_os/scripts/symbolize.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

12345678910>>...15