| 889fb568 | 14-Dec-2021 |
Jerome Forissier <jerome@forissier.org> |
core: add delimited area in .text to store data
A few variables such as boot_mmu_config are stored within the .text section of tee.elf, because they need to be reachable from the identity mapping wh
core: add delimited area in .text to store data
A few variables such as boot_mmu_config are stored within the .text section of tee.elf, because they need to be reachable from the identity mapping which covers a subset of .text. Having them here however is a problem when one wants to measure (hash) the .text section because the runtime content may be different from the content in the tee.elf. In order to workaround this issue, allocate an area in the .text section to gather the data that are modified at boot time. Symbols tagged with .identity_map.data will be stored there. Two delimiters are introduced: __text_data_start and __text_data_end.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Acked-by: Sumit Garg <sumit.garg@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| d3a996cf | 01-Dec-2021 |
Jerome Forissier <jerome@forissier.org> |
kernel/linker.h: export __text_end
Add __text_end to <kernel/linker.h>. Can be used for example to compute a hash of the TEE executable code in a remote attestation scenario.
Signed-off-by: Jerome
kernel/linker.h: export __text_end
Add __text_end to <kernel/linker.h>. Can be used for example to compute a hash of the TEE executable code in a remote attestation scenario.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Acked-by: Sumit Garg <sumit.garg@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 528dabb2 | 08-Mar-2022 |
Jerome Forissier <jerome@forissier.org> |
core: suppress text relocation on stack_tmp_export
stack_tmp_export is a pointer so it is associated with a dynamic relocation when position-independent code is generated (ASLR). Moreover, this symb
core: suppress text relocation on stack_tmp_export
stack_tmp_export is a pointer so it is associated with a dynamic relocation when position-independent code is generated (ASLR). Moreover, this symbol is in the .identity_map section, which is part of .text after the final link. To get rid of this TEXTREL, remove stack_tmp_export and compute the corresponding value in assembly instead from stack_tmp and constants defined in core/arch/arm/kernel/asm-defines.c.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 64b74def | 30-Dec-2021 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: provide dummy mobj_reg_shm_get_by_cookie()
Provides a dummy static inlined mobj_reg_shm_get_by_cookie() returning NULL in case CFG_CORE_DYN_SHM=n.
Reviewed-by: Jerome Forissier <jerome@foriss
core: provide dummy mobj_reg_shm_get_by_cookie()
Provides a dummy static inlined mobj_reg_shm_get_by_cookie() returning NULL in case CFG_CORE_DYN_SHM=n.
Reviewed-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 33d42c6e | 01-Mar-2022 |
Jelle Sels <jelle.sels@arm.com> |
core: Add support for DEVICE_nGnRnE
Currently OP-TEE only allows non-cached memory to be mapped as ATTR_DEVICE_nGnRE/Device. This patch adds support for ATTR_DEVICE_nGnRnE/Strongly-ordered.
Signed-
core: Add support for DEVICE_nGnRnE
Currently OP-TEE only allows non-cached memory to be mapped as ATTR_DEVICE_nGnRE/Device. This patch adds support for ATTR_DEVICE_nGnRnE/Strongly-ordered.
Signed-off-by: Jelle Sels <jelle.sels@arm.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| f950bedc | 01-Mar-2022 |
Jelle Sels <jelle.sels@arm.com> |
core: Add mattr_is_cached()
mattr_is_cached() can be used to determine if the mattr is cached or not.
Signed-off-by: Jelle Sels <jelle.sels@arm.com> Reviewed-by: Jens Wiklander <jens.wiklander@lina
core: Add mattr_is_cached()
mattr_is_cached() can be used to determine if the mattr is cached or not.
Signed-off-by: Jelle Sels <jelle.sels@arm.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 8b427282 | 01-Mar-2022 |
Jelle Sels <jelle.sels@arm.com> |
core: change TEE_MATTR_CACHE_ to TEE_MATTR_MEM_TYPE_
Some extra memory types will be added. This patch renames all TEE_MATTR_CACHE_ defines to TEE_MATTR_MEM_TYPE_. This will make the next patches ea
core: change TEE_MATTR_CACHE_ to TEE_MATTR_MEM_TYPE_
Some extra memory types will be added. This patch renames all TEE_MATTR_CACHE_ defines to TEE_MATTR_MEM_TYPE_. This will make the next patches easier to understand.
Signed-off-by: Jelle Sels <jelle.sels@arm.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 839dadc2 | 02-Mar-2022 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add description for get_aslr_seed()
Adds a comment describing get_aslr_seed().
Reviewed-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> |
| f3f9432f | 10-Feb-2022 |
Clément Léger <clement.leger@bootlin.com> |
drivers: rtc: add RTC API
This API allows to interact with a RTC registered as the system RTC.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@l
drivers: rtc: add RTC API
This API allows to interact with a RTC registered as the system RTC.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Clément Léger <clement.leger@bootlin.com>
show more ...
|
| 569d17b0 | 19-Nov-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
drivers: stm32_rstctrl reset controller for stm32mp1 platforms
Implement stm32 platforms reset controller device, embedded upon CFG_STM32_RSTCTRL=y.
The drivers exposes its reset controls to the dt
drivers: stm32_rstctrl reset controller for stm32mp1 platforms
Implement stm32 platforms reset controller device, embedded upon CFG_STM32_RSTCTRL=y.
The drivers exposes its reset controls to the dt_driver provider and with stm32mp1 platform legacy reset control API function: stm32_reset_assert(), stm32_reset_deassert() and stm32_reset_assert_deassert_mcu().
This change also removes source file stm32mp1_rcc.c that has moved to drivers/rstctrl/stm32_rstctrl.c but stm32_rcc_base() definition which is moved into to platform main.c.
Acked-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 60801696 | 15-Feb-2022 |
Volodymyr Babchuk <volodymyr_babchuk@epam.com> |
plat: arm: refactor GIC initialization
All platforms (except STM32MP1) follow the same pattern during GIC initialization: get virtual addresses for distributor (and optionally, for CPU interface), c
plat: arm: refactor GIC initialization
All platforms (except STM32MP1) follow the same pattern during GIC initialization: get virtual addresses for distributor (and optionally, for CPU interface), check that they are not NULL, call either gic_init() or gic_init_base_addr().
We can move most of this logic into gic_init_base_addr(), while platform-specific code will supply only base physical addresses for distributor and CPU interface. This will simplify and align platform code.
ST32MP1 had more complex logic, as it used io_pa_or_va_secure() to get MMIO range addresses. However, as main_init_gic() called assert(cpu_mmu_enabled()), there is no sense in using io_pa_or_va_secure(), because we already ensured that VA will be always used. Thus assert() call was moved to gic_init_base_addr(), and STM32MP1 were aligned with other platforms.
Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 453d8327 | 14-Feb-2022 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: change return type for tee_entry_std() TEE_Result
Changes the return type for the function tee_entry_std() to TEE_Result in order to make it independent of optee_smc.h. tee_entry_std() is also
core: change return type for tee_entry_std() TEE_Result
Changes the return type for the function tee_entry_std() to TEE_Result in order to make it independent of optee_smc.h. tee_entry_std() is also called from yielding_call_with_arg() and it doesn't make sense for that function to return values based on the SMC ABI.
With this we're doing an ABI change for FF-A, but that should not make a difference for the driver since that only test for 0 or !0. In addition if !0 is returned the communication has broken down completely so there not much left to recover from. Note that this patch does not require changes in the Linux kernel driver.
Acked-by: Marouene Boubakri <marouene.boubakri@nxp.com> Acked-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 70eacc45 | 28-Dec-2021 |
Marouene Boubakri <marouene.boubakri@nxp.com> |
core: kernel: move boot.h to core/include/kernel
Move boot.h from core/arch/arm/include/kernel/ to core/include/kernel to avoid duplicating it in arch folder if we build for a new architecture.
Sig
core: kernel: move boot.h to core/include/kernel
Move boot.h from core/arch/arm/include/kernel/ to core/include/kernel to avoid duplicating it in arch folder if we build for a new architecture.
Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| d8ba4bae | 08-Feb-2022 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: split core/arch/arm/mm/core_mmu.c
Splits core/arch/arm/mm/core_mmu.c into one generic and one architecture specific file.
Acked-by: Jerome Forissier <jerome@forissier.org> Acked-by: Marouene
core: split core/arch/arm/mm/core_mmu.c
Splits core/arch/arm/mm/core_mmu.c into one generic and one architecture specific file.
Acked-by: Jerome Forissier <jerome@forissier.org> Acked-by: Marouene Boubakri <marouene.boubakri@nxp.com> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| c02edd30 | 08-Feb-2022 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: split core_mmu_private.h
Splits core_mmu_private.h into <mm/core_mmu_arch.h> and <mm/core_mmu.h>
Reviewed-by: Jerome Forissier <jerome@forissier.org> Acked-by: Marouene Boubakri <marouene.bou
core: split core_mmu_private.h
Splits core_mmu_private.h into <mm/core_mmu_arch.h> and <mm/core_mmu.h>
Reviewed-by: Jerome Forissier <jerome@forissier.org> Acked-by: Marouene Boubakri <marouene.boubakri@nxp.com> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 8c260e80 | 08-Feb-2022 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: split core/arch/arm/include/mm/core_mmu.h
Splits core/arch/arm/include/mm/core_mmu.h into one generic and one architecture specific file.
Reviewed-by: Jerome Forissier <jerome@forissier.org>
core: split core/arch/arm/include/mm/core_mmu.h
Splits core/arch/arm/include/mm/core_mmu.h into one generic and one architecture specific file.
Reviewed-by: Jerome Forissier <jerome@forissier.org> Acked-by: Marouene Boubakri <marouene.boubakri@nxp.com> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| e26b8354 | 17-Jan-2022 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add support for SPMC at EL3
Adds support for SPMC at EL3 with CFG_CORE_EL3_SPMC. This is from OP-TEE point of view almost identical to CFG_CORE_SEL2_SPMC with SPMC at S-EL2.
The previously S-
core: add support for SPMC at EL3
Adds support for SPMC at EL3 with CFG_CORE_EL3_SPMC. This is from OP-TEE point of view almost identical to CFG_CORE_SEL2_SPMC with SPMC at S-EL2.
The previously S-EL2 specific functions mobj_ffa_sel2_spmc_new() and mobj_ffa_sel2_spmc_delete() are renamed to mobj_ffa_spmc_new() and mobj_ffa_spmc_delete() respectively since they are no longer reserved to used only with SPMC at S-EL2.
Reviewed-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| cb60bce4 | 14-Jan-2022 |
Clément Léger <clement.leger@bootlin.com> |
drivers: wdt: add SMC handler for arm-smc-wdt Linux driver
Add SMC handler to handle SMC coming from Linux arm-smc-wdt driver. This function is meant to be called in sm_platform_handler() since CFG_
drivers: wdt: add SMC handler for arm-smc-wdt Linux driver
Add SMC handler to handle SMC coming from Linux arm-smc-wdt driver. This function is meant to be called in sm_platform_handler() since CFG_WDT_SM_HANDLER_ID is going to be defined by the platforms.
Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Clément Léger <clement.leger@bootlin.com>
show more ...
|
| 011a8f96 | 14-Jan-2022 |
Clément Léger <clement.leger@bootlin.com> |
drivers: wdt: add watchdog interface
Add necessary code to register a system watchdog. This watchdog will then used for generic watchdog usage using a new simple watchdog interface. This interface w
drivers: wdt: add watchdog interface
Add necessary code to register a system watchdog. This watchdog will then used for generic watchdog usage using a new simple watchdog interface. This interface will be used by SMC handler which will allow handling SMC coming from the arm-smc-wdt compatible driver present in Linux.
Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Clément Léger <clement.leger@bootlin.com>
show more ...
|
| bd6c9770 | 01-Feb-2022 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: split core/include/kernel/thread_private.h
Splits core/include/kernel/thread_private.h into one generic and one architecture specific file.
Reviewed-by: Jerome Forissier <jerome@forissier.org
core: split core/include/kernel/thread_private.h
Splits core/include/kernel/thread_private.h into one generic and one architecture specific file.
Reviewed-by: Jerome Forissier <jerome@forissier.org> Acked-by: Marouene Boubakri <marouene.boubakri@nxp.com> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 891569af | 01-Feb-2022 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: move thread_defs.h into thread.h
Moves the defines in core/arch/arm/include/kernel/thread_defs.h into core/include/kernel/thread.h.
Reviewed-by: Jerome Forissier <jerome@forissier.org> Acked-
core: move thread_defs.h into thread.h
Moves the defines in core/arch/arm/include/kernel/thread_defs.h into core/include/kernel/thread.h.
Reviewed-by: Jerome Forissier <jerome@forissier.org> Acked-by: Marouene Boubakri <marouene.boubakri@nxp.com> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| ca825890 | 01-Feb-2022 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: split core/arch/arm/kernel/thread.c
Splits core/arch/arm/kernel/thread.c into one generic and one architecture specific file.
Acked-by: Jerome Forissier <jerome@forissier.org> Acked-by: Marou
core: split core/arch/arm/kernel/thread.c
Splits core/arch/arm/kernel/thread.c into one generic and one architecture specific file.
Acked-by: Jerome Forissier <jerome@forissier.org> Acked-by: Marouene Boubakri <marouene.boubakri@nxp.com> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 5d9ddca6 | 01-Feb-2022 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: split core/arch/arm/include/kernel/thread.h
Splits core/arch/arm/include/kernel/thread.h into one generic and one architecture specific file.
Reviewed-by: Jerome Forissier <jerome@forissier.o
core: split core/arch/arm/include/kernel/thread.h
Splits core/arch/arm/include/kernel/thread.h into one generic and one architecture specific file.
Reviewed-by: Jerome Forissier <jerome@forissier.org> Acked-by: Marouene Boubakri <marouene.boubakri@nxp.com> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 555bde4b | 01-Feb-2022 |
Jens Wiklander <jens.wiklander@linaro.org> |
core/include/kernel/asan.h: include <compiler.h>
Each .h (and .c) file should include their needed .h files so add this missing include.
Reviewed-by: Jerome Forissier <jerome@forissier.org> Acked-b
core/include/kernel/asan.h: include <compiler.h>
Each .h (and .c) file should include their needed .h files so add this missing include.
Reviewed-by: Jerome Forissier <jerome@forissier.org> Acked-by: Marouene Boubakri <marouene.boubakri@nxp.com> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| f8c3938b | 30-Jul-2021 |
Clément Léger <clement.leger@bootlin.com> |
plat-sam: pm: add support for setting suspend mode
PSCI allows entering platform suspend with SYSTEM_SUSPEND call which is meant to enter the system in its deepest power state. sama5d2 platform supp
plat-sam: pm: add support for setting suspend mode
PSCI allows entering platform suspend with SYSTEM_SUSPEND call which is meant to enter the system in its deepest power state. sama5d2 platform supports multiple suspend power states. Currently, Linux supports the atmel.pm_modes command line option which allows to select this suspend state. Since Linux uses PSCI SYSTEM_SUSPEND to enter suspend mode, we are not able to pass information (such as done for CPU_SUSPEND). In order to select the mode that will be entered by SYSTEM_SUSPEND from normal world and thus select the desired suspend state, SMCs are added to allow selecting and getting this power mode.
Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Clément Léger <clement.leger@bootlin.com>
show more ...
|