History log of /optee_os/core/ (Results 2051 – 2075 of 6495)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
fdb6691419-Dec-2022 Marouene Boubakri <marouene.boubakri@nxp.com>

core: riscv: implement thread management routines in thread_arch.c

This commit implements an initial thread management for RISC-V. It covers
the following routines:

- Exceptions un/masking
- Trap h

core: riscv: implement thread management routines in thread_arch.c

This commit implements an initial thread management for RISC-V. It covers
the following routines:

- Exceptions un/masking
- Trap handling, including syscalls handling.
- Thread allocation, execution, suspension, freeing with slight changes
to set RISC-V registers such as CSRs.
- RPC.

Pending routines:
- Floatting point support F/D/Q/L extensions and software FP.
- Abort mode.

Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

992b72f106-Jan-2023 Marouene Boubakri <marouene.boubakri@nxp.com>

core: riscv: provide abort.c

Initial implementation of abort handler for RISC-V.

Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

9b1a3bbe19-Dec-2022 Marouene Boubakri <marouene.boubakri@nxp.com>

core: riscv: add thread manager assembly code in thread_rv.S

This commit implements:
- An entry point of trap handler in non-vectored mode.
- thread_unwind_user_mode() and thread_exit_user_mode()
to

core: riscv: add thread manager assembly code in thread_rv.S

This commit implements:
- An entry point of trap handler in non-vectored mode.
- thread_unwind_user_mode() and thread_exit_user_mode()
to return from U-Mode.
- __thread_enter_user_mode() to jump to U-Mode from S-Mode or M-Mode.
- thread_std_smc_entry(), thread_resume() and thread_rpc().

Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

346358fb03-Jan-2023 Marouene Boubakri <marouene.boubakri@nxp.com>

core: riscv: riscv.h: bind registers to their ABI names

For better readability of code, allow using register ABI names
in ASM sources to match registers declarations in C files.

Signed-off-by: Maro

core: riscv: riscv.h: bind registers to their ABI names

For better readability of code, allow using register ABI names
in ASM sources to match registers declarations in C files.

Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

2727b64319-Dec-2022 Marouene Boubakri <marouene.boubakri@nxp.com>

core: riscv: asm-defines.c: create and populate with thread-related defines

Create core/arch/riscv/kernel/asm-defines.c and add defines for thread_ctx,
thread_core_local, thread_ctx_regs, thread_use

core: riscv: asm-defines.c: create and populate with thread-related defines

Create core/arch/riscv/kernel/asm-defines.c and add defines for thread_ctx,
thread_core_local, thread_ctx_regs, thread_user_mode_rec, thread_trap_regs
and thread_scall_regs.

Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

5014653519-Dec-2022 Marouene Boubakri <marouene.boubakri@nxp.com>

core: riscv: kernel: add several modifications to thread_arch.h

This commits:
- Adds 4 trampoline registers to thread_core_local to store arguments of
__thread_enter_user_mode before jumping to U-Mo

core: riscv: kernel: add several modifications to thread_arch.h

This commits:
- Adds 4 trampoline registers to thread_core_local to store arguments of
__thread_enter_user_mode before jumping to U-Mode to be restored later
after exiting U-Mode.
- Populates thread_trap_regs with all registers available on RV 64/32,
this holds the trap frame for trap handling.
- Populates thread_ctx_regs with general purpose registers.
- Makes generic definition of THREAD_EXCP_FOREIGN_INTR and
THREAD_EXCP_NATIVE_INTR to work both on S-Mode and M-Mode.
- Adds prototypes for Soft FP (to be implemented later) and RPC caches.

Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

a5a2cd1919-Dec-2022 Marouene Boubakri <marouene.boubakri@nxp.com>

core: riscv: kernel: add thread_private_arch.h

Declares stacks sizes, thread_user_mode_rec structure to restore
context after exiting from U-Mode. It also adds prototypes for
thread_rv.s and thread_

core: riscv: kernel: add thread_private_arch.h

Declares stacks sizes, thread_user_mode_rec structure to restore
context after exiting from U-Mode. It also adds prototypes for
thread_rv.s and thread_arch.c

Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

cbaab38828-Dec-2022 Marouene Boubakri <marouene.boubakri@nxp.com>

core: riscv: riscv.h: define generic CSRs to handle traps

Added xSTATUS and xIE related fields and flags for traps
handling.

Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com>
Acked-by: J

core: riscv: riscv.h: define generic CSRs to handle traps

Added xSTATUS and xIE related fields and flags for traps
handling.

Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

643a058219-Dec-2022 Marouene Boubakri <marouene.boubakri@nxp.com>

core: riscv: riscv_macros.S: add load_xregs and save_xregs macros

Introduce helper macros to load/store a range registers from/to a base
register at a given offset. It uses LDR and STR macros define

core: riscv: riscv_macros.S: add load_xregs and save_xregs macros

Introduce helper macros to load/store a range registers from/to a base
register at a given offset. It uses LDR and STR macros defined in riscv.h
for respectively RV32 and RV64. Offsets are shifted by RISCV_XLEN_BYTES.

Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

76551de308-Nov-2022 Jens Wiklander <jens.wiklander@linaro.org>

plat-vexpress: add support for hafnium interrupt controller

Enables support for the Hafnium interrupt controller if configured with
CFG_CORE_HAFNIUM_INTC=y.

Acked-by: Jerome Forissier <jerome.foris

plat-vexpress: add support for hafnium interrupt controller

Enables support for the Hafnium interrupt controller if configured with
CFG_CORE_HAFNIUM_INTC=y.

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>

show more ...

a060205208-Nov-2022 Jens Wiklander <jens.wiklander@linaro.org>

core: add driver for hafnium interrupt controller

Adds a driver for the paravirtualized interrupt controller provided by
Hafnium at S-EL2. The driver is enabled with CFG_CORE_HAFNIUM_INTC=y.

The in

core: add driver for hafnium interrupt controller

Adds a driver for the paravirtualized interrupt controller provided by
Hafnium at S-EL2. The driver is enabled with CFG_CORE_HAFNIUM_INTC=y.

The interrupt controller is limited compared to the GIC and only works
with interrupt ids which are already added in the SP manifest or as
predefined reserved interrupt ids.

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>

show more ...

087c9fbb08-Nov-2022 Jens Wiklander <jens.wiklander@linaro.org>

core: add CFG_CORE_IRQ_IS_NATIVE_INTR

Adds CFG_CORE_IRQ_IS_NATIVE_INTR to configure how native and foreign are
signalled.
Selects if IRQ is used to signal native interrupt
if CFG_CORE_IRQ_IS_NATIVE_

core: add CFG_CORE_IRQ_IS_NATIVE_INTR

Adds CFG_CORE_IRQ_IS_NATIVE_INTR to configure how native and foreign are
signalled.
Selects if IRQ is used to signal native interrupt
if CFG_CORE_IRQ_IS_NATIVE_INTR == y:
IRQ signals a native interrupt pending
FIQ signals a foreign non-secure interrupt or a managed exit pending
else: (vice versa)
IRQ signals a foreign non-secure interrupt or a managed exit pending
FIQ signals a native interrupt pending

CFG_CORE_IRQ_IS_NATIVE_INTR replaces the places in the code where
CFG_ARM_GICV3 was used to configure how FIQ and IRQ was treated.

CFG_CORE_IRQ_IS_NATIVE_INTR is automatically configured according to
CFG_ARM_GICV3 if CFG_GIC == y. This prepares for other interrupt
controllers where it doesn't make sense to use CFG_ARM_GICV3.

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>

show more ...

bcfcc2c502-Nov-2022 Jens Wiklander <jens.wiklander@linaro.org>

plat-vexpress: S-EL2 SPMC: update for hafnium

Updates needed to run with Hafnium as S-EL2 SPMC on QEMU. GIC and
reserved (static) shared is not supported, so disable it for
CFG_CORE_SEL2_SPMC=y.

Wi

plat-vexpress: S-EL2 SPMC: update for hafnium

Updates needed to run with Hafnium as S-EL2 SPMC on QEMU. GIC and
reserved (static) shared is not supported, so disable it for
CFG_CORE_SEL2_SPMC=y.

With S-EL2 on QEMU some secure memory must be set aside for Hafnium.
Since this depends on how Hafnium is compiled etc don't assume which
address range can be used by OP-TEE, instead leave that as an open
configuration option.

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>

show more ...

bc09bb5303-Nov-2022 Jens Wiklander <jens.wiklander@linaro.org>

core: arm: add thread_hvc()

Adds thread_hvc() which is the same as thread_smc() except that it uses
the HVC instruction instead of the SMC instruction. This is useful where
an SPMC at S-EL2 expects

core: arm: add thread_hvc()

Adds thread_hvc() which is the same as thread_smc() except that it uses
the HVC instruction instead of the SMC instruction. This is useful where
an SPMC at S-EL2 expects and HVC instead of SMC for certain functions.

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>

show more ...

b80243af02-Nov-2022 Jens Wiklander <jens.wiklander@linaro.org>

core: mobj_ffa_add_pages_at() trust addresses from SPMC

mobj_ffa_add_pages_at() checks that a supplied physical address is
non-secure. This check is not needed with an SPMC at S-EL2 as we can
trust

core: mobj_ffa_add_pages_at() trust addresses from SPMC

mobj_ffa_add_pages_at() checks that a supplied physical address is
non-secure. This check is not needed with an SPMC at S-EL2 as we can
trust that to only provide verified addresses. So disable the check for
non-secure memory in that case, this has also the advantage that OP-TEE
no longer need to know the valid ranges of non-secure memory.

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>

show more ...

7f127d4223-May-2022 Jens Wiklander <jens.wiklander@linaro.org>

core: arm: S-EL1 SPMC: fix handling of fragmented memory descriptors

Prior to this commit there was a misunderstanding of how fragmented
memory descriptors are handled. FFA_MEM_SHARE returned FFA_SU

core: arm: S-EL1 SPMC: fix handling of fragmented memory descriptors

Prior to this commit there was a misunderstanding of how fragmented
memory descriptors are handled. FFA_MEM_SHARE returned FFA_SUCCESS even
when another fragment was expected. FFA_MEM_FRAG_TX returned
FFA_MEM_FRAG_RX even after the last fragment was received.

Fix this by only return FFA_SUCCESS from FFA_MEM_SHARE if the entire
descriptor has been received. If only the first fragment has been
received return FFA_MEM_FRAG_RX instead. Only return FFA_MEM_FRAG_RX
from FFA_MEM_FRAG_TX if further fragments are expected. Return
FFA_SUCCESS from FFA_MEM_FRAG_RX when then entire descriptor has been
received.

Fixes: 1b302ac09816 ("core: enable FF-A with SPM Core at S-EL1")
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>

show more ...

f1f431c721-Nov-2022 Jens Wiklander <jens.wiklander@linaro.org>

core: arm: S-EL1 SPMC: boot ABI update

Updates the boot ABI for S-EL1 SPMC to align better with other SPMCs,
like Hafnium, but also with the non-FF-A configuration.

Register usage:
X0 - TOS FW conf

core: arm: S-EL1 SPMC: boot ABI update

Updates the boot ABI for S-EL1 SPMC to align better with other SPMCs,
like Hafnium, but also with the non-FF-A configuration.

Register usage:
X0 - TOS FW config [1] address, if not NULL
X2 - System DTB, if not NULL

Adds check in the default get_aslr_seed() to see if the system DTB is
present before trying to read kaslr-seed from secure-chosen.

Note that this is an incompatible change and requires corresponding
change in TF-A ("feat(qemu): update abi between spmd and spmc") [2].

[1] A TF-A concept: TOS_FW_CONFIG - Trusted OS Firmware configuration
file. Used by Trusted OS (BL32), that is, OP-TEE in this case
Link: [2] https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/commit/?id=25ae7ad1878244f78206cc7c91f7bdbd267331a1

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

show more ...

66d7380a25-Jan-2023 Gatien Chevallier <gatien.chevallier@foss.st.com>

dts: stm32: remove unused pin description for uart8

Uart8 was removed. Removes unused pin description for this peripheral.

Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
Acked-by:

dts: stm32: remove unused pin description for uart8

Uart8 was removed. Removes unused pin description for this peripheral.

Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...

3f9d692c25-Jan-2023 Gatien Chevallier <gatien.chevallier@foss.st.com>

dts: stm32: fix indentation and remove unused uart8 for STM32MP135F-DK

Removes uart8 node as it is unused.

Fixes indentation issue for reserved-memory node.

Signed-off-by: Gatien Chevallier <gatie

dts: stm32: fix indentation and remove unused uart8 for STM32MP135F-DK

Removes uart8 node as it is unused.

Fixes indentation issue for reserved-memory node.

Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...

98c3626818-Jan-2023 Gatien Chevallier <gatien.chevallier@foss.st.com>

drivers: stm32_rng: make stm32_rng_read() static

Reading a random number should be done via the generic API.

Makes stm32_rng_read() static as it is unused in other files and remove
stm32_rng.h, whi

drivers: stm32_rng: make stm32_rng_read() static

Reading a random number should be done via the generic API.

Makes stm32_rng_read() static as it is unused in other files and remove
stm32_rng.h, which is now empty.

Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...

27f3087b18-Jan-2023 Gatien Chevallier <gatien.chevallier@foss.st.com>

drivers: stm32_rng: override plat_rng_init() if hardware RNG

Avoids useless operations by overriding plat_rng_init() and do nothing.

Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>

drivers: stm32_rng: override plat_rng_init() if hardware RNG

Avoids useless operations by overriding plat_rng_init() and do nothing.

Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...

3e64c63518-Jan-2023 Gatien Chevallier <gatien.chevallier@foss.st.com>

drivers: stm32_rng: implement late seed error detection

As per STM32MP1x specification, rare seed error conditions must be
considered when random value read from DR register is zero.

Signed-off-by:

drivers: stm32_rng: implement late seed error detection

As per STM32MP1x specification, rare seed error conditions must be
considered when random value read from DR register is zero.

Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...

2989354918-Jan-2023 Gatien Chevallier <gatien.chevallier@foss.st.com>

drivers: stm32_rng: pm callbacks

Implements power management (suspend/resume) functions in stm32_rng
driver.

Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
Reviewed-by: Etienne Ca

drivers: stm32_rng: pm callbacks

Implements power management (suspend/resume) functions in stm32_rng
driver.

Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...

3c75230018-Jan-2023 Gatien Chevallier <gatien.chevallier@foss.st.com>

drivers: stm32_rng: support clock error detection

Adds clock error detection configuration when the clock-error-detect
property is set in the RNG node in the device tree.

Signed-off-by: Gatien Chev

drivers: stm32_rng: support clock error detection

Adds clock error detection configuration when the clock-error-detect
property is set in the RNG node in the device tree.

Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...

091ef00518-Jan-2023 Gatien Chevallier <gatien.chevallier@foss.st.com>

drivers: stm32_rng: support conditional reset

Implements a RNG variant error concealment named conditional reset
that requires a software sequence before RNG being able to deliver
again random bytes

drivers: stm32_rng: support conditional reset

Implements a RNG variant error concealment named conditional reset
that requires a software sequence before RNG being able to deliver
again random bytes. It is supported by STM32MP13

RNG peripherals that are supporting conditional reset can dynamically
customize their configuration. Adds support for RNG clock frequency
restraint and NIST configuration.

Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...

1...<<81828384858687888990>>...260