| 6ded7852 | 03-Dec-2021 |
Jerome Forissier <jerome@forissier.org> |
core: arm64: suppress text relocations in thread_optee_smc_a64.S
The readjust_pc macro in thread_optee_smc_a64.S relies on loading the address of a local label (1111f:) from the literal pool, knowin
core: arm64: suppress text relocations in thread_optee_smc_a64.S
The readjust_pc macro in thread_optee_smc_a64.S relies on loading the address of a local label (1111f:) from the literal pool, knowing that this address is modified when relocations are applied. It is a way of converting PC addresses from the identity map to the "normal" VA space, i.e. the one to which ASLR has been applied. However, this approach creates a relocation inside the .text section (TEXTREL) which is generally undesirable.
Replace the mechanism with a load using the 'adr' instruction, which obtains an address in the identity map, then add the ASLR offset found in the boot_mmu_config structure. This gets rid of 8 text relocations.
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 ...
|
| 89d99135 | 12-Jan-2022 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add OPTEE_FFA_SEC_CAP_ARG_OFFSET
Adds the secure capability OPTEE_FFA_SEC_CAP_ARG_OFFSET to indicate that OP-TEE with FF-A can support an argument struct at a non-zero offset into a passed sha
core: add OPTEE_FFA_SEC_CAP_ARG_OFFSET
Adds the secure capability OPTEE_FFA_SEC_CAP_ARG_OFFSET to indicate that OP-TEE with FF-A can support an argument struct at a non-zero offset into a passed shared memory object.
Acked-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| feb290a5 | 02-Nov-2021 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add OPTEE_SMC_CALL_WITH_RPC_ARG
Adds OPTEE_SMC_CALL_WITH_RPC_ARG and OPTEE_SMC_CALL_WITH_REGD_ARG where the struct optee_msg_arg to be used for RPC is appended in the memory following the norm
core: add OPTEE_SMC_CALL_WITH_RPC_ARG
Adds OPTEE_SMC_CALL_WITH_RPC_ARG and OPTEE_SMC_CALL_WITH_REGD_ARG where the struct optee_msg_arg to be used for RPC is appended in the memory following the normal argument struct optee_msg_arg. OPTEE_SMC_CALL_WITH_REGD_ARG only works with registered shared memory, a cookie and an offset is used instead a physical address.
The presence OPTEE_SMC_CALL_WITH_RPC_ARG and OPTEE_SMC_CALL_WITH_REGD_ARG is indicated by the new OPTEE_SMC_SEC_CAP_RPC_ARG bit returned by OPTEE_SMC_EXCHANGE_CAPABILITIES. OPTEE_SMC_EXCHANGE_CAPABILITIES also reports the number of arguments that the RPC argument struct must have room for.
OPTEE_SMC_CALL_WITH_RPC_ARG, OPTEE_SMC_CALL_WITH_ARG and OPTEE_SMC_CALL_WITH_REGD_ARG can be used interleaved.
Acked-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| dab608c0 | 15-Feb-2022 |
Clement Faure <clement.faure@nxp.com> |
core: imx: add missing imx6 SoC IDs to soc_is_imx6()
Add the following SoC IDs to soc_is_imx6() - SOC_MX6SL - SOC_MX6SLL - SOC_MX6D
Fixes: 16e73240d ("core: imx: add CSU module") Signed-off-by:
core: imx: add missing imx6 SoC IDs to soc_is_imx6()
Add the following SoC IDs to soc_is_imx6() - SOC_MX6SL - SOC_MX6SLL - SOC_MX6D
Fixes: 16e73240d ("core: imx: add CSU module") Signed-off-by: Clement Faure <clement.faure@nxp.com> Acked-by: Jerome Forissier <jerome@forissier.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 ...
|
| 0f6bd1dd | 16-Feb-2022 |
Clément Léger <clement.leger@bootlin.com> |
plat-sam: enable RTC support
Enable RTC API, RTC PTA and Atmel RTC driver for sama5d2.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
plat-sam: enable RTC support
Enable RTC API, RTC PTA and Atmel RTC driver for sama5d2.
Acked-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 ...
|
| 1352a5fe | 16-Feb-2022 |
Clément Léger <clement.leger@bootlin.com> |
dts: sama5d2: set RTC as secure
The RTC on sama5d2 is actually securing both RSTC, WDT and RTC register access. Enable secure mode for the RTC to ensure the WDT register accesses are secured.
Acked
dts: sama5d2: set RTC as secure
The RTC on sama5d2 is actually securing both RSTC, WDT and RTC register access. Enable secure mode for the RTC to ensure the WDT register accesses are secured.
Acked-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 ...
|
| 2f35a7bc | 23-Feb-2022 |
Etienne Carriere <etienne.carriere@linaro.org> |
drivers: rstctrl: remove stm32_rstctrl legacy API functions
Removes stm32mp1 reset controllers legacy platform API functions and moves declaration of stm32mp_rcc_reset_id_to_rstctrl() next to the de
drivers: rstctrl: remove stm32_rstctrl legacy API functions
Removes stm32mp1 reset controllers legacy platform API functions and moves declaration of stm32mp_rcc_reset_id_to_rstctrl() next to the declaration of the remaining platform helper function related to reset controllers: stm32mp_nsec_can_access_reset().
Acked-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 29560614 | 23-Nov-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
plat-stm32mp1: scmi_server: use rstctrl resources
Change stm32mp1 SCMI server implementation to use rstctrl framework to handle reset controllers.
Acked-by: Jerome Forissier <jerome@forissier.org>
plat-stm32mp1: scmi_server: use rstctrl resources
Change stm32mp1 SCMI server implementation to use rstctrl framework to handle reset controllers.
Acked-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
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 ...
|
| ab875342 | 10-Feb-2022 |
Volodymyr Babchuk <volodymyr_babchuk@epam.com> |
plar: rcar: add initial support for Gen4
RCar Gen4 is the next generation of Renesas automotive chips. Currently only RCar S4 on board Spider is available. This platform has 8 CortexA55 cores with G
plar: rcar: add initial support for Gen4
RCar Gen4 is the next generation of Renesas automotive chips. Currently only RCar S4 on board Spider is available. This platform has 8 CortexA55 cores with GICv3.
This is patch adds minimal support, so not all Gen4 features are available. Namely, ROM API is not supported right now, so HW RNG and ASLR are disabled. Also, ATF does not provide DTB, so non-secure DDR ranges are hardcoded.
Apart from that, depending on external configuration, initial bootloader can use two different UARTs as console: either SCIF3 or HSCIF0. Thus, CFG_RCAR_UART is introduced.
Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 68c56642 | 10-Feb-2022 |
Volodymyr Babchuk <volodymyr_babchuk@epam.com> |
plat: rcar: enable GIC support
Enable GIC support in the same as it is done in other platforms.
Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com> Acked-by: Jens Wiklander <jens.wiklande
plat: rcar: enable GIC support
Enable GIC support in the same as it is done in other platforms.
Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 15a5e39d | 16-Feb-2022 |
Marc Kleine-Budde <mkl@pengutronix.de> |
plat-imx: Add SA settings for i.MX7DS
The Secure Access register configures the access mode for non-TrustZone aware DMA masters. To ensure that no DMA master can read the secure memory for OP-TEE, w
plat-imx: Add SA settings for i.MX7DS
The Secure Access register configures the access mode for non-TrustZone aware DMA masters. To ensure that no DMA master can read the secure memory for OP-TEE, we set access for all masters except the ARM CP15 register to non-secure only and lock the settings afterwards.
Acked-by: Clement Faure <clement.faure@nxp.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
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 ...
|
| 45800c40 | 23-Dec-2020 |
Sahil Malhotra <sahil.malhotra@nxp.com> |
core: ls: fix GIC offset for ls1043a rev1 and rev1.1
GIC offsets are different on ls1043a depending of the SoC revision 1 or 1.1
Signed-off-by: Sahil Malhotra <sahil.malhotra@nxp.com> Signed-off-by
core: ls: fix GIC offset for ls1043a rev1 and rev1.1
GIC offsets are different on ls1043a depending of the SoC revision 1 or 1.1
Signed-off-by: Sahil Malhotra <sahil.malhotra@nxp.com> Signed-off-by: Clement Faure <clement.faure@nxp.com> Acked-by: Jerome Forissier <jerome@forissier.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 0b983b2e | 16-Apr-2021 |
Clement Faure <clement.faure@nxp.com> |
core: ls: remove CAAM endianness definitions from conf.mk
Remove CAAM endianness definition (CFG_CAAM_LITTLE_ENDIAN and CFG_CAAM_BIG_ENDIAN) from conf.mk as it is already defined in crypto_conf.mk
core: ls: remove CAAM endianness definitions from conf.mk
Remove CAAM endianness definition (CFG_CAAM_LITTLE_ENDIAN and CFG_CAAM_BIG_ENDIAN) from conf.mk as it is already defined in crypto_conf.mk
Signed-off-by: Clement Faure <clement.faure@nxp.com> Acked-by: Jerome Forissier <jerome@forissier.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| e752c173 | 11-Feb-2022 |
Chia-Wei Wang <chiawei_wang@aspeedtech.com> |
crypto/aspeed: ast2600: Add HACE HW hash support
Aspeed AST2600 Hash and Crypto Engine (HACE) is designated to accelerate the throughput of hash and symmetric encryption/decryption.
This patch adds
crypto/aspeed: ast2600: Add HACE HW hash support
Aspeed AST2600 Hash and Crypto Engine (HACE) is designated to accelerate the throughput of hash and symmetric encryption/decryption.
This patch adds the driver support for AST2600 HACE to provide HW-assisted hash for the SHA family. The initial driver structure for Aspeed crypto engines is also constructed.
Signed-off-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com> Acked-by: Jerome Forissier <jerome@forissier.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 ...
|
| aac71369 | 14-Feb-2022 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: move NOTIF_VALUE_DO_BOTTOM_HALF assert to thread_optee_smc.c
Moves the compile assertion that NOTIF_VALUE_DO_BOTTOM_HALF matches OPTEE_SMC_ASYNC_NOTIF_VALUE_DO_BOTTOM_HALF in core/kernel/notif
core: move NOTIF_VALUE_DO_BOTTOM_HALF assert to thread_optee_smc.c
Moves the compile assertion that NOTIF_VALUE_DO_BOTTOM_HALF matches OPTEE_SMC_ASYNC_NOTIF_VALUE_DO_BOTTOM_HALF in core/kernel/notif.c to core/arch/arm/kernel/thread_optee_smc.c to keep dependencies to optee_smc.h in architecture specific code.
Acked-by: Marouene Boubakri <marouene.boubakri@nxp.com> Reviewed-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| fc5e0894 | 31-Dec-2021 |
Marouene Boubakri <marouene.boubakri@nxp.com> |
core: mm: move tee_mm.c to core/mm
Move tee_mm.c from core/arch/arm/mm to core/mm to reuse it with new architectures.
Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com> Reviewed-by: Etien
core: mm: move tee_mm.c to core/mm
Move tee_mm.c from core/arch/arm/mm to core/mm to reuse it with new architectures.
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 ...
|
| 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 ...
|