Oopenvela-robotoptee_os/util.h: avoid the IS_ALIGNED redefined error
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
Generate ELF Note for BTI in all arm64 asm files Add program property note section in the assembly files to ensure that when linking them, program property note section is generated in the final ELF. Signed-off-by: Ruchika Gupta <ruchika.gupta@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> | 4 年前 | |
Generate ELF Note for BTI in all arm64 asm files Add program property note section in the assembly files to ensure that when linking them, program property note section is generated in the final ELF. Signed-off-by: Ruchika Gupta <ruchika.gupta@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> | 4 年前 | |
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> | 5 年前 | |
Add SPDX license identifiers Adds one SPDX-License-Identifier line [1] to each source files that contains license text. Generated by [2]: spdxify.py --add-spdx optee_os/ The scancode tool [3] was used to double check the license matching code in the Python script. All the licenses detected by scancode are either detected by spdxify.py, or have no SPDX identifier, or are false matches. Link: [1] https://spdx.org/licenses/ Link: [2] https://github.com/jforissier/misc/blob/f7b56c8/spdxify.py Link: [3] https://github.com/nexB/scancode-toolkit Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Joakim Bech <joakim.bech@linaro.org> | 8 年前 | |
external/optee_os: fix the compiler extension attr redefined warning In file included from optee_os/lib/libutils/ext/include/string_ext.h:14, from optee_os/lib/libutee/tee_api.c:7: /home/guoshichao/work_profile/vela_os/vela_dev_n60_2/prebuilts/gcc/linux/arm/arm-none-eabi/include/sys/cdefs.h:360: note: this is the location of the previous definition 360 | #define __pure __attribute__((__pure__)) | In file included from optee_os/lib/libutee/include/tee_internal_api.h:14, from optee_os/lib/libutee/include/tee_api.h:9, from optee_os/lib/libutee/tee_api.c:8: optee_os/lib/libutils/ext/include/compiler.h:28: warning: "__aligned" redefined 28 | #define __aligned(x) __attribute__((aligned(x))) | In file included from optee_os/lib/libutils/ext/include/string_ext.h:14, from optee_os/lib/libutee/tee_api.c:7: /home/guoshichao/work_profile/vela_os/vela_dev_n60_2/prebuilts/gcc/linux/arm/arm-none-eabi/include/sys/cdefs.h:235: note: this is the location of the previous definition 235 | #define __aligned(x) __attribute__((__aligned__(x))) | In file included from optee_os/lib/libutee/include/tee_internal_api.h:14, from optee_os/lib/libutee/include/tee_api.h:9, from optee_os/lib/libutee/tee_api.c:8: optee_os/lib/libutils/ext/include/compiler.h:30: warning: "__noinline" redefined 30 | #define __noinline __attribute__((noinline)) | In file included from optee_os/lib/libutils/ext/include/string_ext.h:14, from optee_os/lib/libutee/tee_api.c:7: /home/guoshichao/work_profile/vela_os/vela_dev_n60_2/prebuilts/gcc/linux/arm/arm-none-eabi/include/sys/cdefs.h:373: note: this is the location of the previous definition 373 | #define __noinline __attribute__ ((__noinline__)) | In file included from optee_os/lib/libutee/include/tee_internal_api.h:14, from optee_os/lib/libutee/include/tee_api.h:9, from optee_os/lib/libutee/tee_api.c:8: optee_os/lib/libutils/ext/include/compiler.h:41: warning: "__section" redefined 41 | #define __section(x) __attribute__((section(x))) | In file included from optee_os/lib/libutils/ext/include/string_ext.h:14, from optee_os/lib/libutee/tee_api.c:7: /home/guoshichao/work_profile/vela_os/vela_dev_n60_2/prebuilts/gcc/linux/arm/arm-none-eabi/include/sys/cdefs.h:236: note: this is the location of the previous definition 236 | #define __section(x) __attribute__((__section__(x))) | Signed-off-by: guoshichao <guoshichao@xiaomi.com> | 3 个月前 | |
libutils: IS_ENABLED2() for _CFG_* switches Adds macro IS_ENABLED2() to be used for OP-TEE OS internal _CFG_* configuration switches to not conflict with IS_ENABLED() coding style rules inherited from Linux kernel coding style. Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> | 3 年前 | |
libutils: confine_array_index: add support for RISC-V Add a naive C implementation for RISC-V. Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: liushiwei <liushiwei@eswincomputing.com> Reviewed-by: chenchaokai <chenchaokai@eswincomputing.com> | 3 年前 | |
Basic fault mitigation routines Adds basic fault mitigation routines designed to help protecting from fault injection attacks on the hardware. This is by no means bullet proof, but it should at least improve the situation. These routines focus on verifying that a function has been called and that the returned value matches the result from the function. This is done by having a handshake between the caller and the callee where also the return value is transmitted in a separate channel. Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> | 3 年前 | |
core: add system wide mempool_default Adds system wide mempool_default for temporary large memory allocations. Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> | 7 年前 | |
core: add support for MTE Adds support for the Armv8.5-A Memory Tagging Extension with CFG_MEMTAG=y. A memtag.h API is introduced to handle this extension. If CFG_MEMTAG=n the API doesn't add any overhead and the behaviour is unchanged. With CFG_MEMTAG=y a check is performed to see if the platform can support MTE and the API is dynamically configured accordingly. This means that it's safe to have CFG_MEMTAG=y even for platforms not supporting MTE. There will be some minimal overhead then, but likely not noticeable. An entry is also added in the TEE_PROPSET_TEE_IMPLEMENTATION for a u32 property "org.trustedfirmware.optee.cpu.feat_memtag_implemented". The property is set to a non-zero value only if CFG_CORE_MEMTAG is configured and the underlying CPU supports FEAT_MTE. This commit still only uses the default tag with the value 0 resulting in unchanged pointers when accessing memory. However, all plumbing is in place allowing for instance tagging of the heap in a later commit. Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> | 4 年前 | |
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> | 5 年前 | |
Prevent unused warnings in speculation_barrier.h Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Joakim Bech <joakim.bech@linaro.org> | 8 年前 | |
libutils: prefix system header guard with 2 underscore chars Adds prefix "__" to standard header files implemented in libutils. This is applicable as these header guards macro are system macros. This change prevents conflicts with external component as faced with SCP-firmware [1] that implements wrapper headers with #include_next for assert.h and stdlib.h using ASSERT_H [2] and STDLIB_H [3] as header guards as in libutils. Prior this change did stdint.h both define STDINT_H and _STDINT_H but guards only upon STDINT_H. This change removes STDINT_H. Link: [1] https://github.com/ARM-software/SCP-firmware.git Link: [2] https://github.com/ARM-software/SCP-firmware/blob/v2.11.0/framework/include/assert.h#L8-L9 Link: [3] https://github.com/ARM-software/SCP-firmware/blob/v2.11.0/framework/include/stdlib.h#L8-L9 Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> | 3 年前 | |
libutils: prefix system header guard with 2 underscore chars Adds prefix "__" to standard header files implemented in libutils. This is applicable as these header guards macro are system macros. This change prevents conflicts with external component as faced with SCP-firmware [1] that implements wrapper headers with #include_next for assert.h and stdlib.h using ASSERT_H [2] and STDLIB_H [3] as header guards as in libutils. Prior this change did stdint.h both define STDINT_H and _STDINT_H but guards only upon STDINT_H. This change removes STDINT_H. Link: [1] https://github.com/ARM-software/SCP-firmware.git Link: [2] https://github.com/ARM-software/SCP-firmware/blob/v2.11.0/framework/include/assert.h#L8-L9 Link: [3] https://github.com/ARM-software/SCP-firmware/blob/v2.11.0/framework/include/stdlib.h#L8-L9 Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> | 3 年前 | |
lib: libutils: trace.c: make print_core_id() architecture-independent The function print_core_id() in is calling architecture-specific routines to retrieve the core id. It is more relevant to create a new abstract function trace_ext_get_core_id() in lib/libutee/trace_ext.c that needs to be implemented in the architecture-specific code. This is similar to print_thread_id() which calls trace_ext_get_thread_id() implemented in core/arch/arm/kernel/trace_ext.c Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com> Reviewed-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> | 4 年前 | |
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> | 7 年前 | |
libutils: prefix system header guard with 2 underscore chars Adds prefix "__" to standard header files implemented in libutils. This is applicable as these header guards macro are system macros. This change prevents conflicts with external component as faced with SCP-firmware [1] that implements wrapper headers with #include_next for assert.h and stdlib.h using ASSERT_H [2] and STDLIB_H [3] as header guards as in libutils. Prior this change did stdint.h both define STDINT_H and _STDINT_H but guards only upon STDINT_H. This change removes STDINT_H. Link: [1] https://github.com/ARM-software/SCP-firmware.git Link: [2] https://github.com/ARM-software/SCP-firmware/blob/v2.11.0/framework/include/assert.h#L8-L9 Link: [3] https://github.com/ARM-software/SCP-firmware/blob/v2.11.0/framework/include/stdlib.h#L8-L9 Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> | 3 年前 | |
optee_os/util.h: avoid the IS_ALIGNED redefined error Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com> | 3 个月前 |