History log of /optee_os/lib/libutils/ (Results 126 – 150 of 364)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
1796729928-Dec-2020 Jens Wiklander <jens.wiklander@linaro.org>

libutil: add hdr_size parameter to bget

Adds a hdr_size parameter to bget(), bgetz() and bgetr(). hdr_size must
be a multiple of BGET_HDR_QUANTUM. If hdr_size is larger than 0 the
buffer will be all

libutil: add hdr_size parameter to bget

Adds a hdr_size parameter to bget(), bgetz() and bgetr(). hdr_size must
be a multiple of BGET_HDR_QUANTUM. If hdr_size is larger than 0 the
buffer will be allocated so that the alignment constraints are fulfilled
after advancing hdr_size bytes into the returned buffer.

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

show more ...

cc5981b228-Dec-2020 Jens Wiklander <jens.wiklander@linaro.org>

libutil: add alignment parameter to bget

Adds alignment parameter to bget(), bgetz() and bgetr(). If alignment is
larger then 0 the returned buffer is guaranteed to have an address which
is a multip

libutil: add alignment parameter to bget

Adds alignment parameter to bget(), bgetz() and bgetr(). If alignment is
larger then 0 the returned buffer is guaranteed to have an address which
is a multiple of this value.

The algorithm is basically unchanged, in the way that the memory is
still allocated from the end of a free memory block. The difference is
in the core implementation in bget() where now alignment of the returned
memory is taken into account. If only allocating with the minimum
alignment the memory blocks are expected to be allocated in the same
pattern.

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

show more ...

27e8d08d27-Dec-2020 Jens Wiklander <jens.wiklander@linaro.org>

Introduce CFG_TA_BGET_TEST

Introduces CFG_TA_BGET_TEST which compiles the integrated bget test
suite together with the rest of bget. When enabled, the test entry point
is bget_main_test() in libutil

Introduce CFG_TA_BGET_TEST

Introduces CFG_TA_BGET_TEST which compiles the integrated bget test
suite together with the rest of bget. When enabled, the test entry point
is bget_main_test() in libutils.

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

show more ...

145ae44602-Dec-2020 Jens Wiklander <jens.wiklander@linaro.org>

Use barrier_read_cntpct() to read CNTPCT

Arm ARM quite clearly mentions [1] [2] that such reads must be preceded
by an ISB to forbid re-ordering.

[1] https://developer.arm.com/documentation/ddi0487

Use barrier_read_cntpct() to read CNTPCT

Arm ARM quite clearly mentions [1] [2] that such reads must be preceded
by an ISB to forbid re-ordering.

[1] https://developer.arm.com/documentation/ddi0487/fc/ page D13-2863
"Synchronization requirements for AArch64 System registers" and page
G8-6146 "Ordering of reads of System registers".
[2] https://developer.arm.com/documentation/ddi0406/cd/ page B3-1441
"Ordering of reads of system control registers"

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

show more ...


/optee_os/.checkpatch.conf
/optee_os/.shippable.yml
/optee_os/MAINTAINERS
/optee_os/core/arch/arm/include/arm.h
/optee_os/core/arch/arm/include/kernel/delay.h
/optee_os/core/arch/arm/include/kernel/early_ta.h
/optee_os/core/arch/arm/include/kernel/embedded_ts.h
/optee_os/core/arch/arm/include/kernel/ldelf_loader.h
/optee_os/core/arch/arm/include/kernel/pseudo_ta.h
/optee_os/core/arch/arm/include/kernel/secure_partition.h
/optee_os/core/arch/arm/include/kernel/stmm_sp.h
/optee_os/core/arch/arm/include/kernel/thread.h
/optee_os/core/arch/arm/include/kernel/user_ta.h
/optee_os/core/arch/arm/include/mm/core_mmu.h
/optee_os/core/arch/arm/include/mm/pgt_cache.h
/optee_os/core/arch/arm/kernel/abort.c
/optee_os/core/arch/arm/kernel/boot.c
/optee_os/core/arch/arm/kernel/early_ta.c
/optee_os/core/arch/arm/kernel/embedded_ts.c
/optee_os/core/arch/arm/kernel/kern.ld.S
/optee_os/core/arch/arm/kernel/ldelf_loader.c
/optee_os/core/arch/arm/kernel/link.mk
/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/secstor_ta.c
/optee_os/core/arch/arm/kernel/secure_partition.c
/optee_os/core/arch/arm/kernel/stmm_sp.c
/optee_os/core/arch/arm/kernel/sub.mk
/optee_os/core/arch/arm/kernel/tee_time_arm_cntpct.c
/optee_os/core/arch/arm/kernel/thread.c
/optee_os/core/arch/arm/kernel/thread_a32.S
/optee_os/core/arch/arm/kernel/thread_private.h
/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/mm/mobj_dyn_shm.c
/optee_os/core/arch/arm/mm/pgt_cache.c
/optee_os/core/arch/arm/mm/sub.mk
/optee_os/core/arch/arm/mm/tee_pager.c
/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/registers/imx6.h
/optee_os/core/arch/arm/plat-imx/registers/imx8m-crm.h
/optee_os/core/arch/arm/plat-imx/registers/imx8m.h
/optee_os/core/arch/arm/plat-mediatek/conf.mk
/optee_os/core/arch/arm/plat-mediatek/main.c
/optee_os/core/arch/arm/plat-mediatek/platform_config.h
/optee_os/core/arch/arm/plat-rcar/link.mk
/optee_os/core/arch/arm/plat-rockchip/platform.c
/optee_os/core/arch/arm/plat-rzg/conf.mk
/optee_os/core/arch/arm/plat-rzg/link.mk
/optee_os/core/arch/arm/plat-rzg/main.c
/optee_os/core/arch/arm/plat-rzg/platform_config.h
/optee_os/core/arch/arm/plat-rzg/sub.mk
/optee_os/core/arch/arm/plat-stm32mp1/scmi_server.c
/optee_os/core/arch/arm/plat-stm32mp1/stm32_util.h
/optee_os/core/arch/arm/tee/arch_svc.c
/optee_os/core/arch/arm/tee/svc_cache.c
/optee_os/core/crypto.mk
/optee_os/core/crypto/aes-cts.c
/optee_os/core/crypto/crypto.c
/optee_os/core/drivers/crypto/caam/acipher/caam_rsa.c
/optee_os/core/drivers/crypto/caam/utils/utils_mem.c
/optee_os/core/drivers/crypto/crypto_api/acipher/ecc.c
/optee_os/core/drivers/crypto/crypto_api/acipher/sub.mk
/optee_os/core/drivers/crypto/crypto_api/include/drvcrypt.h
/optee_os/core/drivers/crypto/crypto_api/include/drvcrypt_acipher.h
/optee_os/core/drivers/crypto/se050/adaptors/apis/apdu.c
/optee_os/core/drivers/crypto/se050/adaptors/apis/sss.c
/optee_os/core/drivers/crypto/se050/adaptors/apis/user.c
/optee_os/core/drivers/crypto/se050/adaptors/include/se050.h
/optee_os/core/drivers/crypto/se050/adaptors/include/se050_apdu_apis.h
/optee_os/core/drivers/crypto/se050/adaptors/include/se050_sss_apis.h
/optee_os/core/drivers/crypto/se050/adaptors/include/se050_user_apis.h
/optee_os/core/drivers/crypto/se050/adaptors/include/se050_utils.h
/optee_os/core/drivers/crypto/se050/adaptors/sub.mk
/optee_os/core/drivers/crypto/se050/adaptors/utils/info.c
/optee_os/core/drivers/crypto/se050/adaptors/utils/scp_config.c
/optee_os/core/drivers/crypto/se050/adaptors/utils/utils.c
/optee_os/core/drivers/crypto/se050/core/cipher.c
/optee_os/core/drivers/crypto/se050/core/ctr.c
/optee_os/core/drivers/crypto/se050/core/huk.c
/optee_os/core/drivers/crypto/se050/core/include/se050_cipher_algorithms.h
/optee_os/core/drivers/crypto/se050/core/rng.c
/optee_os/core/drivers/crypto/se050/core/rsa.c
/optee_os/core/drivers/crypto/se050/core/scp03.c
/optee_os/core/drivers/crypto/se050/core/storage.c
/optee_os/core/drivers/crypto/se050/core/sub.mk
/optee_os/core/drivers/crypto/se050/crypto.mk
/optee_os/core/drivers/crypto/se050/glue/i2c.c
/optee_os/core/drivers/crypto/se050/glue/user.c
/optee_os/core/drivers/crypto/se050/session.c
/optee_os/core/drivers/crypto/se050/sub.mk
/optee_os/core/drivers/crypto/sub.mk
/optee_os/core/drivers/imx_i2c.c
/optee_os/core/drivers/pl022_spi.c
/optee_os/core/drivers/tzc380.c
/optee_os/core/include/crypto/crypto.h
/optee_os/core/include/crypto/crypto_impl.h
/optee_os/core/include/keep.h
/optee_os/core/include/kernel/tee_ta_manager.h
/optee_os/core/include/kernel/tee_time.h
/optee_os/core/include/kernel/ts_manager.h
/optee_os/core/include/kernel/ts_store.h
/optee_os/core/include/kernel/user_mode_ctx.h
/optee_os/core/include/kernel/user_mode_ctx_struct.h
/optee_os/core/include/mm/vm.h
/optee_os/core/include/spi.h
/optee_os/core/kernel/tee_ta_manager.c
/optee_os/core/kernel/ts_manager.c
/optee_os/core/kernel/user_access.c
/optee_os/core/lib/libtomcrypt/acipher_helpers.h
/optee_os/core/lib/libtomcrypt/ecc.c
/optee_os/core/lib/libtomcrypt/rsa.c
/optee_os/core/lib/libtomcrypt/sm2-dsa.c
/optee_os/core/lib/libtomcrypt/sm2-pke.c
/optee_os/core/lib/libtomcrypt/src/pk/dh/dh_make_key.c
/optee_os/core/mm/sub.mk
/optee_os/core/mm/vm.c
/optee_os/core/pta/benchmark.c
/optee_os/core/pta/device.c
/optee_os/core/pta/gprof.c
/optee_os/core/pta/scp03.c
/optee_os/core/pta/sdp.c
/optee_os/core/pta/sub.mk
/optee_os/core/pta/system.c
/optee_os/core/sub.mk
/optee_os/core/tee/tee_obj.c
/optee_os/core/tee/tee_rpmb_fs.c
/optee_os/core/tee/tee_svc.c
/optee_os/core/tee/tee_svc_cryp.c
/optee_os/core/tee/tee_svc_storage.c
/optee_os/lib/libmbedtls/core/ecc.c
/optee_os/lib/libmbedtls/core/rsa.c
/optee_os/lib/libutee/include/arm_user_sysreg.h
/optee_os/lib/libutee/include/scp03_pta.h
/optee_os/lib/libutee/include/user_ta_header.h
/optee_os/lib/libutee/tee_api_arith_mpi.c
/optee_os/lib/libutee/tee_api_operations.c
ext/ftrace/ftrace.c
/optee_os/mk/cc-option.mk
/optee_os/mk/checkconf.mk
/optee_os/mk/config.mk
/optee_os/scripts/ts_bin_to_c.py
/optee_os/ta/pkcs11/include/pkcs11_ta.h
/optee_os/ta/pkcs11/src/entry.c
/optee_os/ta/pkcs11/src/object.c
/optee_os/ta/pkcs11/src/pkcs11_attributes.c
/optee_os/ta/pkcs11/src/pkcs11_helpers.c
/optee_os/ta/pkcs11/src/pkcs11_helpers.h
/optee_os/ta/pkcs11/src/pkcs11_token.c
/optee_os/ta/pkcs11/src/processing.c
/optee_os/ta/pkcs11/src/processing.h
/optee_os/ta/pkcs11/src/processing_aes.c
/optee_os/ta/pkcs11/src/processing_symm.c
/optee_os/ta/pkcs11/src/token_capabilities.c
00b3b9a231-Aug-2020 Jens Wiklander <jens.wiklander@linaro.org>

core: add generic struct ts_session

As a step in making room for Secure Partitions (SPs) running at S-EL0
add a Trusted Service (TS) abstraction. Both TAs and SPs is a TS.

Adds the generic struct t

core: add generic struct ts_session

As a step in making room for Secure Partitions (SPs) running at S-EL0
add a Trusted Service (TS) abstraction. Both TAs and SPs is a TS.

Adds the generic struct ts_session. All future sessions structs
(currently only struct tee_ta_session exists) should add this struct to
allow generic session operations.

With this struct comes new functions replacing previous struct
tee_ta_session oriented functions. The following functions are replaced
as:
tee_ta_get_current_session() -> ts_get_current_session()
tee_ta_push_current_session() -> ts_push_current_session()
tee_ta_pop_current_session() -> ts_pop_current_session()
tee_ta_get_calling_session() -> ts_get_calling_session()

ts_get_current_session() is changed compared to its predecessor to
panic() in case of failure to return a valid pointer.

A new function ts_get_current_session_may_fail() is added to handle an
eventual case where a return NULL session may be handled.

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

show more ...

a8d5919826-Oct-2020 Rouven Czerwinski <r.czerwinski@pengutronix.de>

libutils: strtoul.c: adjust license text to upstream

Adjust the license text in strtoul.c according to upstream commit "Use
remove-advertising-clause script to edit BSD licenses" [1].
With this, the

libutils: strtoul.c: adjust license text to upstream

Adjust the license text in strtoul.c according to upstream commit "Use
remove-advertising-clause script to edit BSD licenses" [1].
With this, the file also matches its SPDX License identifier correctly.

Link: [1]: https://sourceware.org/git/?p=newlib-cygwin.git;a=commit;h=9042d0ce65533a26fc3264206db5828d5692332c
Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
Acked-by: Jerome Forissier <jerome@forissier.org>
[jf: minor edits to commit message]
Signed-off-by: Jerome Forissier <jerome@forissier.org>

show more ...

762a555319-Oct-2020 Jens Wiklander <jens.wiklander@linaro.org>

Add alignment parameter to FUNC() and LOCAL_FUNC() macros

Adds a default alignment parameter to FUNC() and LOCAL_FUNC() assembly
macros. This is needed since the function macro also sets the sectio

Add alignment parameter to FUNC() and LOCAL_FUNC() macros

Adds a default alignment parameter to FUNC() and LOCAL_FUNC() assembly
macros. This is needed since the function macro also sets the section
of the function making any alignment directives before the function
macro useless.

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

36e784f613-Oct-2020 Volodymyr Babchuk <volodymyr_babchuk@epam.com>

libutils: provide empty __getauxval() implementation

Never version of libgcc are built with LSE implementation in mind. To
determine if LSE is available on platform it calls __getauxval(), so in
som

libutils: provide empty __getauxval() implementation

Never version of libgcc are built with LSE implementation in mind. To
determine if LSE is available on platform it calls __getauxval(), so in
some cases we can get undefined reference to __getauxval() error.

Prominent case is libgcc_eh.a library, which is used by C++ TAs. Exception
handler depends on atomic operations, so it tries to call
init_have_lse_atomics() first. This function in turn calls __getauxval(),
which causes linking error.

In the future we can make __getauxval() to return actual platform
capabilities.

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

show more ...


/optee_os/CHANGELOG.md
/optee_os/MAINTAINERS
/optee_os/core/arch/arm/include/kernel/early_ta.h
/optee_os/core/arch/arm/include/kernel/linker.h
/optee_os/core/arch/arm/include/kernel/thread.h
/optee_os/core/arch/arm/kernel/kern.ld.S
/optee_os/core/arch/arm/kernel/pseudo_ta.c
/optee_os/core/arch/arm/kernel/secure_partition.c
/optee_os/core/arch/arm/kernel/user_ta.c
/optee_os/core/arch/arm/plat-stm32mp1/conf.mk
/optee_os/core/arch/arm/plat-stm32mp1/drivers/stm32mp1_pwr.c
/optee_os/core/arch/arm/plat-stm32mp1/drivers/stm32mp1_pwr.h
/optee_os/core/arch/arm/plat-stm32mp1/scmi_server.c
/optee_os/core/arch/arm/plat-zynqmp/conf.mk
/optee_os/core/arch/arm/plat-zynqmp/platform_config.h
/optee_os/core/drivers/scmi-msg/base.c
/optee_os/core/drivers/scmi-msg/base.h
/optee_os/core/drivers/scmi-msg/clock.h
/optee_os/core/drivers/scmi-msg/common.h
/optee_os/core/drivers/scmi-msg/entry.c
/optee_os/core/drivers/scmi-msg/reset_domain.c
/optee_os/core/drivers/scmi-msg/reset_domain.h
/optee_os/core/drivers/scmi-msg/voltage_domain.c
/optee_os/core/drivers/scmi-msg/voltage_domain.h
/optee_os/core/include/drivers/scmi-msg.h
/optee_os/core/include/dt-bindings/regulator/st,stm32mp15-regulator.h
/optee_os/core/include/kernel/tee_ta_manager.h
/optee_os/core/include/tee/tee_obj.h
/optee_os/core/kernel/tee_ta_manager.c
/optee_os/core/tee/tee_obj.c
/optee_os/core/tee/tee_rpmb_fs.c
/optee_os/core/tee/tee_svc_cryp.c
/optee_os/core/tee/tee_svc_storage.c
ext/arch/arm/auxval.c
ext/arch/arm/sub.mk
/optee_os/mk/config.mk
/optee_os/scripts/pem_to_pub_c.py
/optee_os/scripts/sign_encrypt.py
/optee_os/scripts/ta_bin_to_c.py
d658309608-Oct-2020 Jerome Forissier <jerome@forissier.org>

libutils: arm: add .cantunwind to __gnu_mcount_nc()

The __gnu_mcount_nc() function lacks proper annotation as registers are
pushed onto the stack. The unwind table information for this symbol is
the

libutils: arm: add .cantunwind to __gnu_mcount_nc()

The __gnu_mcount_nc() function lacks proper annotation as registers are
pushed onto the stack. The unwind table information for this symbol is
therefore incorrect and stack unwinding may fail in spectacular ways.
For example, xtest 1007 enters an infinite loop as ldelf tries to unwind
the call stack when the TA panics:

# Platform: QEMU
(buildhost)$ make CFG_FTRACE_SUPPORT=y CFLAGS_ta_arm32=-pg run
(qemu)$ xtest 1007
...
E/TC:? 0 TA panicked with code 0xbeef
E/LD: Status of TA 5b9e0e40-2636-11e1-ad9e-0002a5d5c51b
E/LD: arch: arm
E/LD: region 0: va 0x00102000 pa 0x0e300000 size 0x002000 flags rw-s (ldelf)
E/LD: region 1: va 0x00104000 pa 0x0e302000 size 0x00c000 flags r-xs (ldelf)
E/LD: region 2: va 0x00110000 pa 0x0e30e000 size 0x001000 flags rw-s (ldelf)
E/LD: region 3: va 0x00111000 pa 0x0e30f000 size 0x004000 flags rw-s (ldelf)
E/LD: region 4: va 0x00115000 pa 0x0e313000 size 0x001000 flags r--s
E/LD: region 5: va 0x00116000 pa 0x0e426000 size 0x003000 flags rw-s (stack)
E/LD: region 6: va 0x00149000 pa 0x00001000 size 0x02b000 flags r-xs [0] .ta_head .text .plt .rodata .gnu.hash .ARM.extab .ARM.exidx .dynsym .dynstr .hash
E/LD: region 7: va 0x00174000 pa 0x0002c000 size 0x0e7000 flags rw-s [0] .dynamic .tdata .tbss .got .rel.got .rel.plt .data .init_array .bss .rel.dyn
E/LD: region 8: va 0x00291000 pa 0x00000000 size 0x00b000 flags r-xs [1] .hash .gnu.hash .dynsym .dynstr .rel.dyn .rel.plt .plt .text .rodata .ARM.extab .ARM.exidx
E/LD: region 9: va 0x0029c000 pa 0x0000a000 size 0x002000 flags rw-s [1] .tdata .tbss .init_array .dynamic .got .data .bss
E/LD: [0] 5b9e0e40-2636-11e1-ad9e-0002a5d5c51b @ 0x00149000 (out-br/build/optee_test_ext-1.0/ta/os_test/out/5b9e0e40-2636-11e1-ad9e-0002a5d5c51b.elf)
E/LD: [1] ffd2bded-ab7d-4988-95ee-e4962fff7154 @ 0x00291000 (out-br/build/optee_test_ext-1.0/ta/os_test_lib/out/libos_test.so)
E/LD: Call stack:
E/LD: 0x0029481c _utee_panic at optee_os/lib/libutee/arch/arm/utee_syscalls_a32.S:51
E/LD: 0x002944fc TEE_Panic at optee_os/lib/libutee/tee_api_panic.c:24
E/LD: 0x0014c494 ta_entry_panic at out-br/build/optee_test_ext-1.0/ta/os_test/os_test.c:787
E/LD: 0x00293574 __gnu_mcount_nc at optee_os/lib/libutils/ext/arch/arm/mcount_a32.S:44
E/LD: 0x00293574 __gnu_mcount_nc at optee_os/lib/libutils/ext/arch/arm/mcount_a32.S:44
E/LD: 0x00293574 __gnu_mcount_nc at optee_os/lib/libutils/ext/arch/arm/mcount_a32.S:44
[repeats indefinitely]

The bug is triggered by commit 3513f961cda0 ("arm32: fold
UNWIND(.fnstart/.fnend) into the FUNC macros"). Prior to that commit,
the unwind entry for __gnu_mcount_nc() was "0x1 [cantunwind]", probably
because the function had no .fnstart/.fnend directive.

This commit adds a .cantunwind directive to restore the previous
behavior: unwinding stops at __gnu_mcount_nc(). Since the ftrace code
overwrites LR on the stack, it seems there is no simple way to produce
correct and comprehensive stack dumps short of introducing an unwind
helper function with a knowledge of the ftrace transformation, similar
to what ftrace_return() does.

At least with this patch the unwinding code does not fail.

Fixes: 3513f961cda0 ("arm32: fold UNWIND(.fnstart/.fnend) into the FUNC macros")
Signed-off-by: Jerome Forissier <jerome@forissier.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

919a5a6806-Oct-2020 Jerome Forissier <jerome@forissier.org>

Use fallthrough pseudo-keyword in switch/case statements

Use fallthrough; in switch/case statements. Imported libraries
(libtomcrypt, libmbedtls) are not modified to minimize differences with
upstre

Use fallthrough pseudo-keyword in switch/case statements

Use fallthrough; in switch/case statements. Imported libraries
(libtomcrypt, libmbedtls) are not modified to minimize differences with
upstream.

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

show more ...

0887ca5f06-Oct-2020 Jerome Forissier <jerome@forissier.org>

libutils: compiler.h: introduce fallthrough pseudo-keyword

Adds the fallthrough pseudo-keyword to be used in switch/case
statements. Tested with GCC 6.2.1, 7.2.1, 8.2.1, 8.3.0, 9.2.1 and Clang
9.0.1

libutils: compiler.h: introduce fallthrough pseudo-keyword

Adds the fallthrough pseudo-keyword to be used in switch/case
statements. Tested with GCC 6.2.1, 7.2.1, 8.2.1, 8.3.0, 9.2.1 and Clang
9.0.1 and 10.0.0.

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

show more ...

355fa09524-Sep-2020 Jorge Ramirez-Ortiz <jorge@foundries.io>

libutils: do not redefine ARRAY_SIZE

Do not redefine ARRAY_SIZE if it is already defined

Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
Reviewed-by: Etienne Carriere <etienne.carriere@lina

libutils: do not redefine ARRAY_SIZE

Do not redefine ARRAY_SIZE if it is already defined

Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Jerome Forissier <jerome@forissier.org>

show more ...

9b0773cb11-Sep-2020 Jerome Forissier <jerome@forissier.org>

libutils: fix memset(), memcpy(), memmove() with -O3

When libutils is built with optimization -O3 (make CFG_CC_OPT_LEVEL=3),
memset() may cause infinite recursion. This bug was observed with GCC
8.3

libutils: fix memset(), memcpy(), memmove() with -O3

When libutils is built with optimization -O3 (make CFG_CC_OPT_LEVEL=3),
memset() may cause infinite recursion. This bug was observed with GCC
8.3 with QEMUv8. The reason is, at this optimization level the compiler
may decide to replace loops with calls to memset(), which is obviously
not valid when the loop is in the memset function itself. This behavior
can be turned off with -fno-tree-loop-distribute-patterns.

Therefore, add the appropriate build flag to memset.c. Note that a
similar fix was introduced in upstream newlib [1] but since it depends
on the newlib build script to detect compiler support, the patch is not
directly applicable. Instead $(call cc-option,...) is used here.

Although I have not observed any issue with memcpy() and memmove(),
upstream did apply the compiler flag to these functions too [1], [2],
which seems quite reasonable so do the same here.

Link: [1] https://github.com/bminor/newlib/commit/10e4d79a191f07999bc94b21535fba5d7c04f419
Link: [2] https://github.com/bminor/newlib/commit/82dfae9ab0734b9946321590162dc6021057fec1
Signed-off-by: Jerome Forissier <jerome@forissier.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

ebc961da11-Sep-2020 Jerome Forissier <jerome@forissier.org>

libutils: memset(): add -O2 only if optimization is -Os

Commit 5b2aaa117eee ("libutee: optimize memcpy() for speed") added -O2
to memset.c to exclude the slower implementation which would be selecte

libutils: memset(): add -O2 only if optimization is -Os

Commit 5b2aaa117eee ("libutee: optimize memcpy() for speed") added -O2
to memset.c to exclude the slower implementation which would be selected
when level is -Os (in which case __OPTIMIZE_SIZE__ is defined).

Since the optimization level can now be selected globally with
CFG_CC_OPT_LEVEL, -O2 should not be forced unconditionally or it could
actually reduce the desired level (when CFG_CC_OPT_LEVEL=3).

Therefore, add -O2 only if the global optimization is -Os.

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

show more ...

0bdc823304-Sep-2020 Khoa Hoang <admin@khoahoang.com>

core: thread: add compiler barrier to thread_set_exceptions()

With compiler optimizer enable (-O2) compiler generate invalid code
for thread_get_id_may_fail(). The curr_thread read got re-order
afte

core: thread: add compiler barrier to thread_set_exceptions()

With compiler optimizer enable (-O2) compiler generate invalid code
for thread_get_id_may_fail(). The curr_thread read got re-order
after exceptions unmask.

Signed-off-by: Khoa Hoang <admin@khoahoang.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

3513f96103-Sep-2020 Jerome Forissier <jerome@forissier.org>

arm32: fold UNWIND(.fnstart/.fnend) into the FUNC macros

This change applies to arm32 assembler sources.

Instead of using UNWIND(.fnstart) after FUNC or LOCAL_FUNC and
UNWIND(.fnend) before END_FUN

arm32: fold UNWIND(.fnstart/.fnend) into the FUNC macros

This change applies to arm32 assembler sources.

Instead of using UNWIND(.fnstart) after FUNC or LOCAL_FUNC and
UNWIND(.fnend) before END_FUNC, let's fold these statements into the
FUNC macros.

The .fnstart/.fnend directives mark the start and end of a function
with an unwind table entry (.ARM.exidx) and therefore a function
without them has no entry and cannot be unwound. This means that a
stack dump (on abort or panic) would stop when reaching such a
function.

As a result of this patch, a small number of functions now have an
entry in the unwind table when they had none before (the functions
which were using FUNC or LOCAL_FUNC but had no .fnstart/.fnend). It was
almost always a bug and this pacth only increases the size of the
.ARM.exidx section by a few bytes (tested on QEMU).

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


/optee_os/core/arch/arm/kernel/cache_helpers_a32.S
/optee_os/core/arch/arm/kernel/entry_a32.S
/optee_os/core/arch/arm/kernel/misc_a32.S
/optee_os/core/arch/arm/kernel/spin_lock_a32.S
/optee_os/core/arch/arm/kernel/thread_a32.S
/optee_os/core/arch/arm/kernel/thread_optee_smc_a32.S
/optee_os/core/arch/arm/kernel/thread_spmc_a32.S
/optee_os/core/arch/arm/kernel/tlb_helpers_a32.S
/optee_os/core/arch/arm/kernel/tz_ssvce_pl310_a32.S
/optee_os/core/arch/arm/kernel/vfp_a32.S
/optee_os/core/arch/arm/plat-hisilicon/hi3519av100_plat_init.S
/optee_os/core/arch/arm/plat-imx/a7_plat_init.S
/optee_os/core/arch/arm/plat-imx/a9_plat_init.S
/optee_os/core/arch/arm/plat-imx/pm/psci-cpuidle-imx7.S
/optee_os/core/arch/arm/plat-imx/pm/psci-suspend-imx7.S
/optee_os/core/arch/arm/plat-ls/plat_init.S
/optee_os/core/arch/arm/plat-rockchip/core_pos_a32.S
/optee_os/core/arch/arm/plat-rockchip/plat_init.S
/optee_os/core/arch/arm/plat-rzn1/a7_plat_init.S
/optee_os/core/arch/arm/plat-stm/tz_a9init.S
/optee_os/core/arch/arm/plat-stm32mp1/reset.S
/optee_os/core/arch/arm/plat-sunxi/plat_init.S
/optee_os/core/arch/arm/plat-ti/a9_plat_init.S
/optee_os/core/arch/arm/plat-vexpress/juno_core_pos_a32.S
/optee_os/core/arch/arm/plat-zynq7k/plat_init.S
/optee_os/core/arch/arm/sm/pm_a32.S
/optee_os/core/arch/arm/sm/psci-helper.S
/optee_os/core/arch/arm/sm/sm_a32.S
/optee_os/core/arch/arm/tee/arch_svc_a32.S
/optee_os/lib/libutee/arch/arm/utee_syscalls_a32.S
ext/include/asm.S
isoc/arch/arm/arm32_aeabi_divmod_a32.S
isoc/arch/arm/arm32_aeabi_ldivmod_a32.S
/optee_os/ta/arch/arm/ta_entry_a32.S
827be46c03-Sep-2020 Jerome Forissier <jerome@forissier.org>

arm32: move the UNWIND() macro to <asm.S>

All the users of the UNWIND() macro include <asm.S> already, which is
therefore a good place to define this macro. Let's move it from
<kernel/unwind.h> to <

arm32: move the UNWIND() macro to <asm.S>

All the users of the UNWIND() macro include <asm.S> already, which is
therefore a good place to define this macro. Let's move it from
<kernel/unwind.h> to <asm.S>, remove a couple of duplicates in
assembler files, and drop the useless includes.

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


/optee_os/core/arch/arm/include/kernel/unwind.h
/optee_os/core/arch/arm/kernel/cache_helpers_a32.S
/optee_os/core/arch/arm/kernel/entry_a32.S
/optee_os/core/arch/arm/kernel/misc_a32.S
/optee_os/core/arch/arm/kernel/spin_lock_a32.S
/optee_os/core/arch/arm/kernel/thread_a32.S
/optee_os/core/arch/arm/kernel/thread_optee_smc_a32.S
/optee_os/core/arch/arm/kernel/thread_spmc_a32.S
/optee_os/core/arch/arm/kernel/tlb_helpers_a32.S
/optee_os/core/arch/arm/kernel/tz_ssvce_pl310_a32.S
/optee_os/core/arch/arm/kernel/unwind_arm32.c
/optee_os/core/arch/arm/kernel/vfp_a32.S
/optee_os/core/arch/arm/plat-hisilicon/hi3519av100_plat_init.S
/optee_os/core/arch/arm/plat-imx/a7_plat_init.S
/optee_os/core/arch/arm/plat-imx/a9_plat_init.S
/optee_os/core/arch/arm/plat-imx/pm/psci-cpuidle-imx7.S
/optee_os/core/arch/arm/plat-imx/pm/psci-suspend-imx7.S
/optee_os/core/arch/arm/plat-ls/plat_init.S
/optee_os/core/arch/arm/plat-rockchip/core_pos_a32.S
/optee_os/core/arch/arm/plat-rockchip/plat_init.S
/optee_os/core/arch/arm/plat-rzn1/a7_plat_init.S
/optee_os/core/arch/arm/plat-stm/tz_a9init.S
/optee_os/core/arch/arm/plat-stm32mp1/reset.S
/optee_os/core/arch/arm/plat-sunxi/plat_init.S
/optee_os/core/arch/arm/plat-ti/a9_plat_init.S
/optee_os/core/arch/arm/plat-vexpress/juno_core_pos_a32.S
/optee_os/core/arch/arm/plat-zynq7k/plat_init.S
/optee_os/core/arch/arm/sm/pm_a32.S
/optee_os/core/arch/arm/sm/psci-helper.S
/optee_os/core/arch/arm/sm/sm_a32.S
/optee_os/core/arch/arm/tee/arch_svc_a32.S
/optee_os/lib/libutee/arch/arm/utee_syscalls_a32.S
ext/include/asm.S
isoc/arch/arm/arm32_aeabi_divmod_a32.S
isoc/arch/arm/arm32_aeabi_ldivmod_a32.S
/optee_os/ta/arch/arm/ta_entry_a32.S
e6f0133403-Sep-2020 Jerome Forissier <jerome@forissier.org>

core: remove stack dump macros and multiple log levels

Of the various xPRINT_STACK() macros (x in {E,I,D,F}), only
EPRINT_STACK() is used. Let's simplify the code by removing the macros
altogether a

core: remove stack dump macros and multiple log levels

Of the various xPRINT_STACK() macros (x in {E,I,D,F}), only
EPRINT_STACK() is used. Let's simplify the code by removing the macros
altogether and calling print_kernel_stack() instead. Since only the
TRACE_ERROR is used, the 'level' argument to print_kernel_stack(),
print_stack_arm32() and print_stack_arm64() is removed too.

In addition to simplifying the code, these changes will allow the
consolidation of the stack unwinding code between core and ldelf.

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


/optee_os/.shippable.yml
/optee_os/CHANGELOG.md
/optee_os/MAINTAINERS
/optee_os/core/arch/arm/include/kernel/thread.h
/optee_os/core/arch/arm/include/kernel/unwind.h
/optee_os/core/arch/arm/kernel/abort.c
/optee_os/core/arch/arm/kernel/boot.c
/optee_os/core/arch/arm/kernel/rpc_io_i2c.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/mm/core_mmu.c
/optee_os/core/arch/arm/mm/tee_mmu.c
/optee_os/core/arch/arm/plat-ls/main.c
/optee_os/core/arch/arm/plat-rzn1/a7_plat_init.S
/optee_os/core/arch/arm/plat-rzn1/conf.mk
/optee_os/core/arch/arm/plat-rzn1/link.mk
/optee_os/core/arch/arm/plat-rzn1/main.c
/optee_os/core/arch/arm/plat-rzn1/platform_config.h
/optee_os/core/arch/arm/plat-rzn1/psci.c
/optee_os/core/arch/arm/plat-rzn1/rzn1_regauth.h
/optee_os/core/arch/arm/plat-rzn1/rzn1_tz.h
/optee_os/core/arch/arm/plat-rzn1/sm_platform_handler.c
/optee_os/core/arch/arm/plat-rzn1/sub.mk
/optee_os/core/arch/arm/plat-vexpress/conf.mk
/optee_os/core/arch/arm/tee/arch_svc.c
/optee_os/core/drivers/ns16550.c
/optee_os/core/include/drivers/ns16550.h
/optee_os/core/include/tee/tee_obj.h
/optee_os/core/include/tee/tee_pobj.h
/optee_os/core/kernel/panic.c
/optee_os/core/kernel/tpm.c
/optee_os/core/tee/socket.c
/optee_os/core/tee/tadb.c
/optee_os/core/tee/tee_fs_rpc.c
/optee_os/core/tee/tee_pobj.c
/optee_os/core/tee/tee_svc_storage.c
/optee_os/ldelf/sub.mk
/optee_os/ldelf/ta_elf_rel.c
/optee_os/ldelf/tlsdesc_rel_a64.S
/optee_os/lib/libutee/include/elf_common.h
/optee_os/lib/libutee/tee_api_arith_mpi.c
ext/include/trace.h
isoc/bget_malloc.c
/optee_os/ta/pkcs11/include/pkcs11_ta.h
/optee_os/ta/pkcs11/src/attributes.c
/optee_os/ta/pkcs11/src/attributes.h
/optee_os/ta/pkcs11/src/entry.c
/optee_os/ta/pkcs11/src/object.c
/optee_os/ta/pkcs11/src/persistent_token.c
/optee_os/ta/pkcs11/src/pkcs11_attributes.c
/optee_os/ta/pkcs11/src/pkcs11_attributes.h
/optee_os/ta/pkcs11/src/pkcs11_helpers.c
/optee_os/ta/pkcs11/src/pkcs11_helpers.h
/optee_os/ta/pkcs11/src/pkcs11_token.c
/optee_os/ta/pkcs11/src/pkcs11_token.h
/optee_os/ta/pkcs11/src/processing.c
/optee_os/ta/pkcs11/src/processing.h
/optee_os/ta/pkcs11/src/processing_aes.c
/optee_os/ta/pkcs11/src/processing_symm.c
/optee_os/ta/pkcs11/src/sub.mk
/optee_os/ta/pkcs11/src/token_capabilities.c
/optee_os/ta/pkcs11/src/token_capabilities.h
64df747c17-Aug-2020 Etienne Carriere <etienne.carriere@linaro.org>

libutils: embed AEABI personality routines upon CFG_UNWIND

Fix a TA build issue found when CFG_UNWIND=n. This issue produces a
build error trace like the below:

.../toolchains/aarch32/bin/arm-linux

libutils: embed AEABI personality routines upon CFG_UNWIND

Fix a TA build issue found when CFG_UNWIND=n. This issue produces a
build error trace like the below:

.../toolchains/aarch32/bin/arm-linux-gnueabihf-ld.bfd: .../toolchains/aarch32/bin/../lib/gcc/arm-linux-gnueabihf/8.3.0/libgcc_eh.a(unwind-arm.o): in function `__aeabi_unwind_cpp_pr0':
/tmp/dgboter/bbs/rhev-vm8--rhe6x86_64/buildbot/rhe6x86_64--arm-linux-gnueabihf/build/src/gcc/libgcc/config/arm/unwind-arm.c:494: multiple definition of `__aeabi_unwind_cpp_pr0'; .../optee_os/out/arm/export-ta_arm32/lib/libutils.a(aeabi_unwind.o): .../optee_os/lib/libutils/ext/arch/arm/aeabi_unwind.c:9: first defined here
.../optee_os/out/arm/export-ta_arm32/mk/link.mk:109: recipe for target 'out/5b9e0e40-2636-11e1-ad9e-0002a5d5c51b.elf' failed

I don't understand why toolchain support for __aeabi_unwind_cpp_pr0()
conflicts with the libutils implementation only when CFG_UNWIND=n. Yet
the current change works around the issue.

Fixes: https://github.com/OP-TEE/optee_test/issues/440
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Jerome Forissier <jerome@forissier.org>
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...

e2f03e0704-Jun-2020 Jerome Forissier <jerome@forissier.org>

core: add stack overflow detection

This commit introduces CFG_CORE_DEBUG_CHECK_STACKS to check the stack
limits using compiler instrumentation (-finstrument-functions). When
enabled, the C compiler

core: add stack overflow detection

This commit introduces CFG_CORE_DEBUG_CHECK_STACKS to check the stack
limits using compiler instrumentation (-finstrument-functions). When
enabled, the C compiler will insert entry and exit hooks in all
functions in the TEE core. On entry, the stack pointer is checked and
if an overflow is detected, panic() is called.

How is this helpful since we have stack canaries already?
1. When a dead canary is found, the call stack will give no indication
of the root cause of the corruption which may have happened quite some
time before. Running the test case again with a debugger attached and a
watchpoint on the canary is not always an option.
2. The system may corrupt the stack and hang in an exception handler
before the first canary check, for instance, during boot when the
temporary stack is used. This code will likely catch such issues, too.

The downside is increased stack usage and a significant runtime overhead
which is why this feature should be enabled only for troubleshooting.

Signed-off-by: Jerome Forissier <jerome@forissier.org>
Tested-by: Jerome Forissier <jerome@forissier.org> (QEMU, QEMUv8)
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...


/optee_os/core/arch/arm/arm.mk
/optee_os/core/arch/arm/cpu/cortex-a15.mk
/optee_os/core/arch/arm/cpu/cortex-a5.mk
/optee_os/core/arch/arm/cpu/cortex-a7.mk
/optee_os/core/arch/arm/cpu/cortex-a9.mk
/optee_os/core/arch/arm/cpu/cortex-armv8-0.mk
/optee_os/core/arch/arm/include/arm32.h
/optee_os/core/arch/arm/include/arm64.h
/optee_os/core/arch/arm/include/kernel/spinlock.h
/optee_os/core/arch/arm/include/kernel/thread.h
/optee_os/core/arch/arm/include/mm/mobj.h
/optee_os/core/arch/arm/kernel/asm-defines.c
/optee_os/core/arch/arm/kernel/boot.c
/optee_os/core/arch/arm/kernel/entry_a32.S
/optee_os/core/arch/arm/kernel/entry_a64.S
/optee_os/core/arch/arm/kernel/pseudo_ta.c
/optee_os/core/arch/arm/kernel/rpc_io_i2c.c
/optee_os/core/arch/arm/kernel/spin_lock_debug.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/unwind_arm32.c
/optee_os/core/arch/arm/kernel/unwind_arm64.c
/optee_os/core/arch/arm/mm/mobj_dyn_shm.c
/optee_os/core/arch/arm/mm/mobj_ffa.c
/optee_os/core/arch/arm/plat-stm32mp1/nsec-service/stm32mp1_smc.h
/optee_os/core/arch/arm/plat-vexpress/conf.mk
/optee_os/core/core.mk
/optee_os/core/drivers/stm32_bsec.c
/optee_os/core/include/drivers/stm32_bsec.h
/optee_os/core/include/kernel/rpc_io_i2c.h
/optee_os/core/include/optee_rpc_cmd.h
/optee_os/core/kernel/assert.c
/optee_os/ldelf/dl.c
/optee_os/ldelf/ftrace.c
/optee_os/ldelf/main.c
/optee_os/ldelf/ta_elf.c
/optee_os/ldelf/ta_elf.h
/optee_os/ldelf/ta_elf_rel.c
/optee_os/lib/libdl/dlfcn.c
/optee_os/lib/libutee/arch/arm/sub.mk
/optee_os/lib/libutee/arch/arm/tcb.c
/optee_os/lib/libutee/arch/arm/user_ta_entry.c
/optee_os/lib/libutee/include/arm64_user_sysreg.h
/optee_os/lib/libutee/include/elf.h
/optee_os/lib/libutee/include/elf32.h
/optee_os/lib/libutee/include/elf64.h
/optee_os/lib/libutee/include/elf_common.h
/optee_os/lib/libutee/include/link.h
/optee_os/lib/libutee/include/user_ta_header.h
ext/include/compiler.h
/optee_os/mk/clang.mk
/optee_os/mk/compile.mk
/optee_os/mk/config.mk
/optee_os/mk/gcc.mk
/optee_os/scripts/checkpatch_inc.sh
/optee_os/ta/arch/arm/link.mk
/optee_os/ta/mk/ta_dev_kit.mk
/optee_os/typedefs.checkpatch
405a507221-Jul-2020 Jerome Forissier <jerome@forissier.org>

libutils: add simplified fputc(), fputs(), fwrite(), write()

Preparing for C++ support in TAs.

Adds a few <stdio.h> functions to libutils:

fputc() fputs() fwrite() write()

The proposed implem

libutils: add simplified fputc(), fputs(), fwrite(), write()

Preparing for C++ support in TAs.

Adds a few <stdio.h> functions to libutils:

fputc() fputs() fwrite() write()

The proposed implementations are limited in the sense that they only
accept writing to stdout or stderr. The output goes directly to the
secure console and no difference is made between stdout and stderr.

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

show more ...

f35d131b21-Jul-2020 Jerome Forissier <jerome@forissier.org>

libutils: add sprintf()

Preparing for C++ support in TAs.

Implement sprintf() in libutils.

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

libutils: add sprintf()

Preparing for C++ support in TAs.

Implement sprintf() in libutils.

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

show more ...


/optee_os/.shippable.yml
/optee_os/core/arch/arm/arm.mk
/optee_os/core/arch/arm/include/arm.h
/optee_os/core/arch/arm/include/ffa.h
/optee_os/core/arch/arm/include/kernel/boot.h
/optee_os/core/arch/arm/include/kernel/thread.h
/optee_os/core/arch/arm/include/mm/mobj.h
/optee_os/core/arch/arm/include/optee_ffa.h
/optee_os/core/arch/arm/include/sm/psci.h
/optee_os/core/arch/arm/include/sm/sm.h
/optee_os/core/arch/arm/kernel/asm-defines.c
/optee_os/core/arch/arm/kernel/boot.c
/optee_os/core/arch/arm/kernel/entry_a32.S
/optee_os/core/arch/arm/kernel/entry_a64.S
/optee_os/core/arch/arm/kernel/link.mk
/optee_os/core/arch/arm/kernel/sub.mk
/optee_os/core/arch/arm/kernel/thread.c
/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/kernel/thread_spmc.c
/optee_os/core/arch/arm/kernel/thread_spmc_a32.S
/optee_os/core/arch/arm/kernel/thread_spmc_a64.S
/optee_os/core/arch/arm/kernel/unwind_arm32.c
/optee_os/core/arch/arm/mm/mobj_ffa.c
/optee_os/core/arch/arm/mm/sub.mk
/optee_os/core/arch/arm/plat-amlogic/conf.mk
/optee_os/core/arch/arm/plat-amlogic/main.c
/optee_os/core/arch/arm/plat-bcm/conf.mk
/optee_os/core/arch/arm/plat-bcm/main.c
/optee_os/core/arch/arm/plat-d02/conf.mk
/optee_os/core/arch/arm/plat-d02/main.c
/optee_os/core/arch/arm/plat-hikey/conf.mk
/optee_os/core/arch/arm/plat-hikey/main.c
/optee_os/core/arch/arm/plat-hisilicon/conf.mk
/optee_os/core/arch/arm/plat-hisilicon/main.c
/optee_os/core/arch/arm/plat-hisilicon/psci.c
/optee_os/core/arch/arm/plat-imx/conf.mk
/optee_os/core/arch/arm/plat-imx/drivers/imx_csu.c
/optee_os/core/arch/arm/plat-imx/main.c
/optee_os/core/arch/arm/plat-imx/pm/cpuidle-imx7d.c
/optee_os/core/arch/arm/plat-imx/pm/pm-imx7.c
/optee_os/core/arch/arm/plat-imx/pm/psci.c
/optee_os/core/arch/arm/plat-k3/conf.mk
/optee_os/core/arch/arm/plat-k3/main.c
/optee_os/core/arch/arm/plat-ls/conf.mk
/optee_os/core/arch/arm/plat-ls/main.c
/optee_os/core/arch/arm/plat-marvell/conf.mk
/optee_os/core/arch/arm/plat-marvell/main.c
/optee_os/core/arch/arm/plat-mediatek/conf.mk
/optee_os/core/arch/arm/plat-mediatek/main.c
/optee_os/core/arch/arm/plat-poplar/conf.mk
/optee_os/core/arch/arm/plat-poplar/main.c
/optee_os/core/arch/arm/plat-rcar/conf.mk
/optee_os/core/arch/arm/plat-rcar/main.c
/optee_os/core/arch/arm/plat-rockchip/conf.mk
/optee_os/core/arch/arm/plat-rockchip/main.c
/optee_os/core/arch/arm/plat-rpi3/conf.mk
/optee_os/core/arch/arm/plat-rpi3/main.c
/optee_os/core/arch/arm/plat-sam/conf.mk
/optee_os/core/arch/arm/plat-sam/main.c
/optee_os/core/arch/arm/plat-sprd/conf.mk
/optee_os/core/arch/arm/plat-sprd/main.c
/optee_os/core/arch/arm/plat-stm/conf.mk
/optee_os/core/arch/arm/plat-stm/main.c
/optee_os/core/arch/arm/plat-stm32mp1/conf.mk
/optee_os/core/arch/arm/plat-stm32mp1/main.c
/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/psci.c
/optee_os/core/arch/arm/plat-synquacer/conf.mk
/optee_os/core/arch/arm/plat-synquacer/main.c
/optee_os/core/arch/arm/plat-ti/conf.mk
/optee_os/core/arch/arm/plat-ti/main.c
/optee_os/core/arch/arm/plat-uniphier/conf.mk
/optee_os/core/arch/arm/plat-uniphier/main.c
/optee_os/core/arch/arm/plat-vexpress/conf.mk
/optee_os/core/arch/arm/plat-vexpress/fvp_spmc_pm.c
/optee_os/core/arch/arm/plat-vexpress/main.c
/optee_os/core/arch/arm/plat-vexpress/sub.mk
/optee_os/core/arch/arm/plat-zynq7k/conf.mk
/optee_os/core/arch/arm/plat-zynq7k/main.c
/optee_os/core/arch/arm/plat-zynqmp/conf.mk
/optee_os/core/arch/arm/plat-zynqmp/main.c
/optee_os/core/arch/arm/sm/pm.c
/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/arch/arm/tee/sub.mk
/optee_os/core/drivers/stm32_etzpc.c
/optee_os/core/include/optee_msg.h
/optee_os/core/include/tee/tee_fs_rpc.h
/optee_os/core/kernel/sub.mk
/optee_os/core/sub.mk
/optee_os/core/tee/socket.c
/optee_os/core/tee/sub.mk
/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/ldelf/ta_elf_rel.c
/optee_os/ldelf/unwind_arm32.c
/optee_os/lib/libutee/tee_api_operations.c
ext/include/printk.h
ext/snprintk.c
isoc/include/stdio.h
isoc/sprintf.c
isoc/sub.mk
/optee_os/mk/config.mk
/optee_os/mk/lib.mk
/optee_os/mk/subdir.mk
/optee_os/scripts/symbolize.py
/optee_os/ta/arch/arm/link.mk
/optee_os/ta/arch/arm/link_shlib.mk
/optee_os/ta/arch/arm/ta.ld.S
/optee_os/ta/arch/arm/ta_entry_a32.S
/optee_os/ta/ta.mk
93aade0f09-Jul-2020 Jerome Forissier <jerome@forissier.org>

core: mempool: use recursive mutex

The mempool code can be simplified by using a recursive mutex.

Signed-off-by: Jerome Forissier <jerome@forissier.org>
Reviewed-by: Etienne Carriere <etienne.carri

core: mempool: use recursive mutex

The mempool code can be simplified by using a recursive mutex.

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

64fd5a9209-Jul-2020 Jerome Forissier <jerome@forissier.org>

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

Adds atomic functions operating on the 'short int' type.

Signed-off-by: Jerome Forissier <jerome@forissier.org>
Reviewed-by: Etienne Carriere <et

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

Adds atomic functions operating on the 'short int' type.

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

f86aa9e109-Jul-2020 Jerome Forissier <jerome@forissier.org>

core: make thread ID a short int

Changes thread_get_id() and thread_get_id_may_fail() to return 'short
int' instead of 'int'. That is, 16 bits instead of 32 on all supported
architectures which is m

core: make thread ID a short int

Changes thread_get_id() and thread_get_id_may_fail() to return 'short
int' instead of 'int'. That is, 16 bits instead of 32 on all supported
architectures which is more than enough since the largest thread ID
value is (CFG_NUM_THREADS - 1). Note, struct wait_queue_elem::handle
is already a short int.

trace_ext_get_thread_id() is not changed (still returns an int) because
it is part of the TA API and modifying it would needlessly introduce
incompatibilities.

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

12345678910>>...15