| #
34d244bf |
| 19-Jan-2022 |
Clément Léger <clement.leger@bootlin.com> |
delay: allow udelay() function to work without generic timers
sama5d2 processor is missing the optional ARM generic timers extension. In order to allow using the udelay function, add a function base
delay: allow udelay() function to work without generic timers
sama5d2 processor is missing the optional ARM generic timers extension. In order to allow using the udelay function, add a function based on a wait loop. This support needs plat_get_freq() to be implemented by the platform code and CFG_CORE_HAS_GENERIC_TIMER should be set to 'n'.
Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Clément Léger <clement.leger@bootlin.com>
show more ...
|
| #
5aaab9c0 |
| 22-Apr-2021 |
Jerome Forissier <jerome@forissier.org> |
core: asm: use WEAK_FUNC rather than FUNC + .weak
Some functions are defined in assembler with the FUNC macro (which contains a .global directive) followed by a .weak directive to make them weak sym
core: asm: use WEAK_FUNC rather than FUNC + .weak
Some functions are defined in assembler with the FUNC macro (which contains a .global directive) followed by a .weak directive to make them weak symbols. While this works fine with GCC and Clang up to 11.0.0, Clang 12.0.0 emits a warning:
AS out/arm/core/arch/arm/kernel/misc_a32.o core/arch/arm/kernel/misc_a32.S:58:1: warning: get_core_pos_mpidr changed binding to STB_WEAK .weak get_core_pos_mpidr ^
Fix this by using the newly introduced WEAK_FUNC macro.
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 ...
|
| #
3513f961 |
| 03-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 ...
|
| #
827be46c |
| 03-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 ...
|
| #
170e9084 |
| 15-Oct-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add support for CFG_CORE_ASLR
Adds support for CFG_CORE_ASLR to load TEE Core at a random address. ASLR makes the exploitation of memory corruption vulnerabilities more difficult.
Paging is c
core: add support for CFG_CORE_ASLR
Adds support for CFG_CORE_ASLR to load TEE Core at a random address. ASLR makes the exploitation of memory corruption vulnerabilities more difficult.
Paging is currently not supported with CFG_CORE_ASLR=y.
Acked-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
8be2de1a |
| 23-Sep-2019 |
Imre Kis <imre.kis@arm.com> |
core: Add support for multi-threaded MPIDR values
If the MT bit is set the affinities are shifted in the MPIDR register so the get_core_pos_mpidr function needs to be modified accordingly. This is n
core: Add support for multi-threaded MPIDR values
If the MT bit is set the affinities are shifted in the MPIDR register so the get_core_pos_mpidr function needs to be modified accordingly. This is necessary to make OP-TEE to be able to run on multi-threaded systems. The number of threads/core can be modified by the CFG_CORE_THREAD_SHIFT makefile parameter. The default value is the existing single threaded mode.
Signed-off-by: Imre Kis <imre.kis@arm.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
46daafa9 |
| 28-Mar-2019 |
Jerome Forissier <jerome.forissier@linaro.org> |
Move .weak directive after the symbol definition
Clang ignores the .weak directive if it appears before the symbol is defined. Fix the few places where it happens.
Signed-off-by: Jerome Forissier <
Move .weak directive after the symbol definition
Clang ignores the .weak directive if it appears before the symbol is defined. Fix the few places where it happens.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
dc0f4ec2 |
| 16-May-2018 |
Etienne Carriere <etienne.carriere@st.com> |
Remove license notice from STMicroelectronics files
Since a while the source files license info are defined by SPDX identifiers. We can safely remove the verbose license text from the files that are
Remove license notice from STMicroelectronics files
Since a while the source files license info are defined by SPDX identifiers. We can safely remove the verbose license text from the files that are owned by either only STMicroelectronics or only both Linaro and STMicroelectronics.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
af8e0424 |
| 11-Jan-2018 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: assert foreign interrupts are masked in get_core_pos()
This change modifies get_core_pos() so that calling the routine from C source asserts the foreign interrupts are masked when the function
core: assert foreign interrupts are masked in get_core_pos()
This change modifies get_core_pos() so that calling the routine from C source asserts the foreign interrupts are masked when the function is called, preventing a cpu migration while reading current core position.
There is no assertion of foreign interrupt masking for such calls to get_core_pos() from assembly sources.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| #
1bb92983 |
| 15-Dec-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
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] wa
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>
show more ...
|
| #
00da26ec |
| 19-Sep-2017 |
Andrew F. Davis <afd@ti.com> |
core: Make core_pos more generic
The function core_pos() assumes 4 cores per cluster, this may not be true for all platforms. Define CFG_CORE_CLUSTER_SHIFT to be =log2(cores/cluster) and allow setti
core: Make core_pos more generic
The function core_pos() assumes 4 cores per cluster, this may not be true for all platforms. Define CFG_CORE_CLUSTER_SHIFT to be =log2(cores/cluster) and allow setting this from platform config.
Signed-off-by: Andrew F. Davis <afd@ti.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| #
30372800 |
| 15-Sep-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: introduce get_core_pos_mpidr()
Adds size_t get_core_pos_mpidr(uint32_t mpidr); which translates from mpdir to core position, like get_core_pos() does for the calling core.
get_core_pos_mpidr(
core: introduce get_core_pos_mpidr()
Adds size_t get_core_pos_mpidr(uint32_t mpidr); which translates from mpdir to core position, like get_core_pos() does for the calling core.
get_core_pos_mpidr() a weak function to allow platforms to override the implementation.
get_core_pos() now uses get_core_pos_mpidr() internally to calculate the core position without using any stack.
With get_core_pos_mpidr() all the platform specific implementations of get_core_pos() has been replaced with get_core_pos_mpidr() and get_core_pos() is not weak any longer to avoid unexpected runtime errors in out of tree rebased platforms.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU v8) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
923c1f34 |
| 06-Dec-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: stack unwinding
Adds support for stack unwinding, currently only done for fatal aborts from kernel mode if CFG_CORE_UNWIND = y
The ARMv7/Aarch32 implementation uses -funwind-tables to generat
core: stack unwinding
Adds support for stack unwinding, currently only done for fatal aborts from kernel mode if CFG_CORE_UNWIND = y
The ARMv7/Aarch32 implementation uses -funwind-tables to generate frame unwinding information which is quite large. Enabling stack unwinding currently consumes ~8 KiB. The code to parse the frame unwind information is imported from FreeBSD.
The Aarch64 implementation takes advantage of the frame pointer and has minimal overhead. The core code to unwind the stack is imported from FreeBSD.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey 32/64) Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU, FVP) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
adec1721 |
| 21-Apr-2015 |
Pascal Brand <pascal.brand@st.com> |
Pager: update abort dump
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Pascal Brand <pascal.brand@linaro.org> (STM platform) Signed-off-by: Pascal Brand <pascal.brand@st.com>
|
| #
abe38974 |
| 09-Mar-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
Rename arm32 architecture to arm
Renames arm32 directories to arm.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU) Reviewed-by
Rename arm32 architecture to arm
Renames arm32 directories to arm.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU) Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested-by: Pascal Brand <pascal.brand@linaro.org> (QEMU platform)
show more ...
|