History log of /optee_os/core/arch/riscv/ (Results 1 – 25 of 262)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
a3097fa114-Nov-2025 Randolph Lin <randolph@andestech.com>

core: riscv: spinlock.S: use REGOFF for stack push and pop

In __cpu_spin_lock(), using STR/LDR and RISCV_XLEN_BYTES, it seems
that it wants to adopt the RV64 or RV32 environment, but missing the
shi

core: riscv: spinlock.S: use REGOFF for stack push and pop

In __cpu_spin_lock(), using STR/LDR and RISCV_XLEN_BYTES, it seems
that it wants to adopt the RV64 or RV32 environment, but missing the
shift byte for differ environmnt. therefore remove the const value and
using REGOFF() macro to fit the RV32/RV64 environment.

Signed-off-by: Randolph Lin <randolph@andestech.com>
Reviewed-by: Marouene Boubakri <marouene.boubakri@nxp.com>

show more ...


/optee_os/.github/workflows/ci.yml
/optee_os/.github/workflows/notify.yml
/optee_os/.github/workflows/stales.yml
/optee_os/CHANGELOG.md
/optee_os/MAINTAINERS
/optee_os/core/arch/arm/crypto/aes-gcm-ce.c
/optee_os/core/arch/arm/dts/stm32mp21-st-scmi-cfg.dtsi
/optee_os/core/arch/arm/dts/stm32mp211.dtsi
/optee_os/core/arch/arm/dts/stm32mp23-st-scmi-cfg.dtsi
/optee_os/core/arch/arm/dts/stm32mp231.dtsi
/optee_os/core/arch/arm/dts/stm32mp233.dtsi
/optee_os/core/arch/arm/dts/stm32mp235.dtsi
/optee_os/core/arch/arm/dts/stm32mp235f-dk-ca35tdcid-rcc.dtsi
/optee_os/core/arch/arm/dts/stm32mp235f-dk-ca35tdcid-resmem.dtsi
/optee_os/core/arch/arm/dts/stm32mp235f-dk-ca35tdcid-rif.dtsi
/optee_os/core/arch/arm/dts/stm32mp235f-dk.dts
/optee_os/core/arch/arm/dts/stm32mp23xc.dtsi
/optee_os/core/arch/arm/dts/stm32mp23xf.dtsi
/optee_os/core/arch/arm/dts/stm32mp25-st-scmi-cfg.dtsi
/optee_os/core/arch/arm/dts/stm32mp251.dtsi
/optee_os/core/arch/arm/dts/stm32mp257f-dk.dts
/optee_os/core/arch/arm/include/ffa.h
/optee_os/core/arch/arm/include/kernel/secure_partition.h
/optee_os/core/arch/arm/include/kernel/spmc_sp_handler.h
/optee_os/core/arch/arm/include/kernel/thread_private_arch.h
/optee_os/core/arch/arm/include/kernel/thread_spmc.h
/optee_os/core/arch/arm/include/optee_ffa.h
/optee_os/core/arch/arm/include/sm/optee_smc.h
/optee_os/core/arch/arm/kernel/secure_partition.c
/optee_os/core/arch/arm/kernel/spmc_sp_handler.c
/optee_os/core/arch/arm/kernel/stmm_sp.c
/optee_os/core/arch/arm/kernel/thread_spmc.c
/optee_os/core/arch/arm/mm/mobj_ffa.c
/optee_os/core/arch/arm/plat-automotive_rd/conf.mk
/optee_os/core/arch/arm/plat-automotive_rd/main.c
/optee_os/core/arch/arm/plat-automotive_rd/platform_config.h
/optee_os/core/arch/arm/plat-automotive_rd/rd1ae_core_pos.S
/optee_os/core/arch/arm/plat-automotive_rd/sub.mk
/optee_os/core/arch/arm/plat-imx/conf.mk
/optee_os/core/arch/arm/plat-imx/registers/imx95.h
/optee_os/core/arch/arm/plat-k3/conf.mk
/optee_os/core/arch/arm/plat-qcom/conf.mk
/optee_os/core/arch/arm/plat-qcom/main.c
/optee_os/core/arch/arm/plat-qcom/platform_config.h
/optee_os/core/arch/arm/plat-qcom/sub.mk
/optee_os/core/arch/arm/plat-rockchip/conf.mk
/optee_os/core/arch/arm/plat-rockchip/platform_config.h
/optee_os/core/arch/arm/plat-rockchip/platform_rk3588.c
/optee_os/core/arch/arm/plat-rpi5/conf.mk
/optee_os/core/arch/arm/plat-rpi5/main.c
/optee_os/core/arch/arm/plat-rpi5/platform_config.h
/optee_os/core/arch/arm/plat-rpi5/sub.mk
/optee_os/core/arch/arm/plat-stm32mp1/drivers/stm32mp1_syscfg.c
/optee_os/core/arch/arm/plat-stm32mp1/stm32_util.h
/optee_os/core/arch/arm/plat-stm32mp2/conf.mk
/optee_os/core/arch/arm/plat-telechips/scripts/tcmktool.py
/optee_os/core/arch/arm/plat-ti/main.c
/optee_os/core/arch/arm/tee/entry_fast.c
kernel/spinlock.S
/optee_os/core/crypto/aes-gcm.c
/optee_os/core/drivers/crypto/ele/ele.c
/optee_os/core/drivers/firewall/stm32_rifsc.c
/optee_os/core/drivers/gpio/gpio.c
/optee_os/core/drivers/imx/mu/imx_mu_8ulp_9x.c
/optee_os/core/drivers/imx/mu/sub.mk
/optee_os/core/drivers/qcom_geni_uart.c
/optee_os/core/drivers/regulator/regulator.c
/optee_os/core/drivers/regulator/regulator_dt.c
/optee_os/core/drivers/regulator/regulator_fixed.c
/optee_os/core/drivers/regulator/regulator_gpio.c
/optee_os/core/drivers/rockchip_otp.c
/optee_os/core/drivers/stm32_gpio.c
/optee_os/core/drivers/stm32_i2c.c
/optee_os/core/drivers/stm32_rtc.c
/optee_os/core/drivers/stm32_tamp.c
/optee_os/core/drivers/sub.mk
/optee_os/core/include/drivers/gpio.h
/optee_os/core/include/drivers/imx_mu.h
/optee_os/core/include/drivers/qcom_geni_uart.h
/optee_os/core/include/drivers/regulator.h
/optee_os/core/include/drivers/rockchip_otp.h
/optee_os/core/include/drivers/stm32_i2c.h
/optee_os/core/include/drivers/stm32mp_dt_bindings.h
/optee_os/core/include/kernel/boot.h
/optee_os/core/include/mm/mobj.h
/optee_os/core/include/optee_msg.h
/optee_os/core/kernel/console.c
/optee_os/core/kernel/ree_fs_ta.c
/optee_os/core/kernel/transfer_list.c
/optee_os/core/lib/libtomcrypt/src/pk/rsa/rsa_verify_hash.c
/optee_os/core/mm/core_mmu.c
/optee_os/core/mm/mobj.c
/optee_os/core/mm/mobj_dyn_shm.c
/optee_os/core/mm/vm.c
/optee_os/core/pta/device.c
/optee_os/core/pta/tests/dt_driver_test.c
/optee_os/core/tee/entry_std.c
/optee_os/core/tee/fs_htree.c
/optee_os/lib/libmbedtls/mbedtls/ChangeLog
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/bignum.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/build_info.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/dhm.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/ecdh.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/ecdsa.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/ecjpake.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/ecp.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/lms.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/pk.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/platform_util.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/rsa.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/ssl.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/ssl_cookie.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/ssl_ticket.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/x509.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/x509_crt.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/x509_csr.h
/optee_os/lib/libmbedtls/mbedtls/include/psa/crypto.h
/optee_os/lib/libmbedtls/mbedtls/include/psa/crypto_extra.h
/optee_os/lib/libmbedtls/mbedtls/library/aesni.c
/optee_os/lib/libmbedtls/mbedtls/library/asn1write.c
/optee_os/lib/libmbedtls/mbedtls/library/base64.c
/optee_os/lib/libmbedtls/mbedtls/library/cipher.c
/optee_os/lib/libmbedtls/mbedtls/library/cipher_invasive.h
/optee_os/lib/libmbedtls/mbedtls/library/cipher_wrap.c
/optee_os/lib/libmbedtls/mbedtls/library/cipher_wrap.h
/optee_os/lib/libmbedtls/mbedtls/library/common.h
/optee_os/lib/libmbedtls/mbedtls/library/lmots.c
/optee_os/lib/libmbedtls/mbedtls/library/lms.c
/optee_os/lib/libmbedtls/mbedtls/library/pem.c
/optee_os/lib/libmbedtls/mbedtls/library/psa_crypto.c
/optee_os/lib/libmbedtls/mbedtls/library/psa_crypto_mac.c
/optee_os/lib/libmbedtls/mbedtls/library/psa_crypto_slot_management.c
/optee_os/lib/libmbedtls/mbedtls/library/ssl_misc.h
/optee_os/lib/libmbedtls/mbedtls/library/ssl_msg.c
/optee_os/lib/libmbedtls/mbedtls/library/ssl_tls.c
/optee_os/lib/libmbedtls/mbedtls/library/ssl_tls12_client.c
/optee_os/lib/libmbedtls/mbedtls/library/ssl_tls12_server.c
/optee_os/lib/libmbedtls/mbedtls/library/ssl_tls13_keys.c
/optee_os/lib/libmbedtls/mbedtls/library/ssl_tls13_keys.h
/optee_os/lib/libmbedtls/mbedtls/library/version_features.c
/optee_os/lib/libmbedtls/mbedtls/library/x509_create.c
/optee_os/lib/libmbedtls/mbedtls/library/x509write_crt.c
/optee_os/lib/libmbedtls/mbedtls/library/x509write_csr.c
/optee_os/lib/libutee/user_ta_entry.c
/optee_os/mk/config.mk
/optee_os/mk/macros.mk
/optee_os/scripts/ci-host-cleanup.sh
/optee_os/scripts/gen_ldelf_hex.py
/optee_os/scripts/notify_maintainers.py
/optee_os/ta/pkcs11/src/processing_rsa.c
/optee_os/ta/remoteproc/src/remoteproc_core.c
8e17e07215-Jul-2025 Marouene Boubakri <marouene.boubakri@nxp.com>

core: riscv: add build config for MPXY/RPMI support

Enable compilation of MPXY/RPMI support by introducing the build
option `CFG_RISCV_SBI_MPXY_RPMI`.

This commit:
- Adds sbi_mpxy_rpmi.c to the bui

core: riscv: add build config for MPXY/RPMI support

Enable compilation of MPXY/RPMI support by introducing the build
option `CFG_RISCV_SBI_MPXY_RPMI`.

This commit:
- Adds sbi_mpxy_rpmi.c to the build when the option is enabled
- Forces `CFG_RISCV_SBI_MPXY` when MPXY/RPMI is selected
- Enables CFG_RISCV_SBI_MPXY_RPMI in plat-virt by default

Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com>
Reviewed-by: Alvin Chang <alvinga@andestech.com>

show more ...

26e3e52d15-Jul-2025 Marouene Boubakri <marouene.boubakri@nxp.com>

core: riscv: add initial RPMI/MPXY integration support

This commit introduces infrastructure to support RPMI communication via
the SBI MPXY extension. MPXY allows supervisor software to send and
rec

core: riscv: add initial RPMI/MPXY integration support

This commit introduces infrastructure to support RPMI communication via
the SBI MPXY extension. MPXY allows supervisor software to send and
receive RPMI messages through M-mode firmware acting as a proxy.

Functions added by this commit are sufficient to implement the
RequestForward service group.

Support for asynchronous events, notifications, and MSI-based message
delivery will be added in future commits.

Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com>
Reviewed-by: Alvin Chang <alvinga@andestech.com>

show more ...

8020e39215-Jul-2025 Marouene Boubakri <marouene.boubakri@nxp.com>

riscv: sbi_mpxy_rpmi.h: add RPMI protocol-specific definitions for MPXY

Introduce sbi_mpxy_rpmi.h, a header defining RPMI message protocol
attributes and message types specific to the MPXY SBI exten

riscv: sbi_mpxy_rpmi.h: add RPMI protocol-specific definitions for MPXY

Introduce sbi_mpxy_rpmi.h, a header defining RPMI message protocol
attributes and message types specific to the MPXY SBI extension.
This includes enums for attribute and message type identifiers, a
unified RPMI message structure, and helper initializers to simplify
message construction.

These definitions serve as the interface between supervisor-level RPMI
clients and the underlying MPXY transport.

Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com>
Reviewed-by: Alvin Chang <alvinga@andestech.com>

show more ...

693e294029-Jun-2025 Marouene Boubakri <marouene.boubakri@nxp.com>

riscv: rpmi.h: add defines of RISC-V RPMI messaging protocol

The RPMI messaging protocol includes all the RPMI messages exchanged
over a RPMI transport channel.

*NOTE*: The RISC-V RPMI specificatio

riscv: rpmi.h: add defines of RISC-V RPMI messaging protocol

The RPMI messaging protocol includes all the RPMI messages exchanged
over a RPMI transport channel.

*NOTE*: The RISC-V RPMI specification is not yet ratified
as a full standard. This is based on the v0.99 draft released during
May–June 2025 The draft is frozen and in public review.

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

show more ...

00eea92415-Jul-2025 Marouene Boubakri <marouene.boubakri@nxp.com>

core: riscv: introduce CFG_RISCV_SBI_MPXY flag for MPXY SBI support

Add a new build-time configuration flag CFG_RISCV_SBI_MPXY to enable
compilation of MPXY SBI extension support in OP-TEE. When ena

core: riscv: introduce CFG_RISCV_SBI_MPXY flag for MPXY SBI support

Add a new build-time configuration flag CFG_RISCV_SBI_MPXY to enable
compilation of MPXY SBI extension support in OP-TEE. When enabled, this
automatically forces CFG_RISCV_SBI to ensure the SBI infrastructure is
included.

Also update the build system to conditionally compile sbi_mpxy.c based
on this flag.

Enable CFG_RISCV_SBI_MPXY by default for the virt platform.

Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com>
Reviewed-by: Yu-Chien Peter Lin <peter.lin@sifive.com>
Reviewed-by: Alvin Chang <alvinga@andestech.com>

show more ...

30feb38a29-Jun-2025 Marouene Boubakri <marouene.boubakri@nxp.com>

core: riscv: implement MPXY SBI extension

Introduce support for the MPXY SBI extension (EID #0x4D505859),
which enables supervisor software to exchange messages through
an abstract SBI interface dec

core: riscv: implement MPXY SBI extension

Introduce support for the MPXY SBI extension (EID #0x4D505859),
which enables supervisor software to exchange messages through
an abstract SBI interface decoupled from any specific protocol.

MPXY allows setting up per-hart shared memory for transferring
messages between the supervisor and an SBI implementation.
It serves as a generic backend to build messaging clients,
while being agnostic of message protocol semantics.

This step provides the foundation for future inter-domain
message exchange.

Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com>
Reviewed-by: Yu-Chien Peter Lin <peter.lin@sifive.com>
Reviewed-by: Alvin Chang <alvinga@andestech.com>

show more ...

93b4dfda14-Jul-2025 Marouene Boubakri <marouene.boubakri@nxp.com>

core: riscv: include: misc_arch.h: include stdint.h for uint32_t type

Added <stdint.h> to ensure types like uint32_t are correctly defined,
resolving implicit type issues when including this header.

core: riscv: include: misc_arch.h: include stdint.h for uint32_t type

Added <stdint.h> to ensure types like uint32_t are correctly defined,
resolving implicit type issues when including this header.

Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com>
Reviewed-by: Alvin Chang <alvinga@andestech.com>
Reviewed-by: Yu-Chien Peter Lin <peter.lin@sifive.com>

show more ...

37ad62c215-Jul-2025 Marouene Boubakri <marouene.boubakri@nxp.com>

core: riscv: sbi.h: expose sbi_ecall helper in public header

Move `sbi_ecall()` and `struct sbiret` to sbi.h to allow reuse across
individual SBI extension implementations. This prepares for modular

core: riscv: sbi.h: expose sbi_ecall helper in public header

Move `sbi_ecall()` and `struct sbiret` to sbi.h to allow reuse across
individual SBI extension implementations. This prepares for modularizing
each SBI extension (e.g., HSM, MPXY) into its own file while
centralizing the ecall interface.

Removes the now-duplicated inline definition from sbi.c.

Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com>
Reviewed-by: Alvin Chang <alvinga@andestech.com>
Reviewed-by: Yu-Chien Peter Lin <peter.lin@sifive.com>

show more ...

cc967d3f28-Jun-2025 Marouene Boubakri <marouene.boubakri@nxp.com>

core: riscv: sbi.h: add SBI_EXT_MPXY definition

Added `SBI_EXT_MPXY` (0x4D505859) as per latest RISC-V SBI extensions.

Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com>
Reviewed-by: Alvi

core: riscv: sbi.h: add SBI_EXT_MPXY definition

Added `SBI_EXT_MPXY` (0x4D505859) as per latest RISC-V SBI extensions.

Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com>
Reviewed-by: Alvin Chang <alvinga@andestech.com>
Reviewed-by: Yu-Chien Peter Lin <peter.lin@sifive.com>

show more ...

1af8790328-Jun-2025 Marouene Boubakri <marouene.boubakri@nxp.com>

core: riscv: sbi.h: extend SBI error codes

Add more SBI error codes to synchronize with SBI specification.

Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com>
Reviewed-by: Alvin Chang <alv

core: riscv: sbi.h: extend SBI error codes

Add more SBI error codes to synchronize with SBI specification.

Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com>
Reviewed-by: Alvin Chang <alvinga@andestech.com>
Reviewed-by: Yu-Chien Peter Lin <peter.lin@sifive.com>

show more ...


/optee_os/.github/workflows/ci.yml
/optee_os/.gitignore
/optee_os/CHANGELOG.md
/optee_os/MAINTAINERS
/optee_os/core/arch/arm/dts/stm32mp131.dtsi
/optee_os/core/arch/arm/dts/stm32mp135f-dk.dts
/optee_os/core/arch/arm/dts/stm32mp151.dtsi
/optee_os/core/arch/arm/dts/stm32mp157c-ed1.dts
/optee_os/core/arch/arm/dts/stm32mp15xx-dkx.dtsi
/optee_os/core/arch/arm/dts/stm32mp21-st-scmi-cfg.dtsi
/optee_os/core/arch/arm/dts/stm32mp211.dtsi
/optee_os/core/arch/arm/dts/stm32mp215f-dk-ca35tdcid-rcc.dtsi
/optee_os/core/arch/arm/dts/stm32mp215f-dk-ca35tdcid-rif.dtsi
/optee_os/core/arch/arm/dts/stm32mp215f-dk.dts
/optee_os/core/arch/arm/dts/stm32mp251.dtsi
/optee_os/core/arch/arm/dts/stm32mp257f-dk-ca35tdcid-rcc.dtsi
/optee_os/core/arch/arm/dts/stm32mp257f-dk-ca35tdcid-resmem.dtsi
/optee_os/core/arch/arm/dts/stm32mp257f-dk-ca35tdcid-rif.dtsi
/optee_os/core/arch/arm/dts/stm32mp257f-dk.dts
/optee_os/core/arch/arm/dts/stm32mp257f-ev1-ca35tdcid-rif.dtsi
/optee_os/core/arch/arm/dts/stm32mp257f-ev1.dts
/optee_os/core/arch/arm/include/arm64.h
/optee_os/core/arch/arm/kernel/boot.c
/optee_os/core/arch/arm/kernel/generic_timer.c
/optee_os/core/arch/arm/plat-corstone1000/conf.mk
/optee_os/core/arch/arm/plat-imx/conf.mk
/optee_os/core/arch/arm/plat-k3/conf.mk
/optee_os/core/arch/arm/plat-k3/drivers/dthev2.c
/optee_os/core/arch/arm/plat-k3/drivers/eip76d_trng.c
/optee_os/core/arch/arm/plat-k3/drivers/eip76d_trng.h
/optee_os/core/arch/arm/plat-k3/drivers/sa2ul.c
/optee_os/core/arch/arm/plat-k3/drivers/sub.mk
/optee_os/core/arch/arm/plat-k3/platform_config.h
/optee_os/core/arch/arm/plat-marvell/conf.mk
/optee_os/core/arch/arm/plat-marvell/platform_config.h
/optee_os/core/arch/arm/plat-marvell/sub.mk
/optee_os/core/arch/arm/plat-rockchip/conf.mk
/optee_os/core/arch/arm/plat-rockchip/main.c
/optee_os/core/arch/arm/plat-rockchip/platform_config.h
/optee_os/core/arch/arm/plat-stm32mp1/conf.mk
/optee_os/core/arch/arm/plat-stm32mp1/main.c
/optee_os/core/arch/arm/plat-stm32mp1/stm32_util.h
/optee_os/core/arch/arm/plat-stm32mp2/conf.mk
/optee_os/core/arch/arm/plat-stm32mp2/main.c
/optee_os/core/arch/arm/plat-stm32mp2/stm32_sysconf.h
/optee_os/core/arch/arm/plat-stm32mp2/stm32_util.h
/optee_os/core/arch/arm/plat-versal2/conf.mk
/optee_os/core/arch/arm/plat-vexpress/conf.mk
/optee_os/core/arch/arm/plat-vexpress/main.c
/optee_os/core/arch/arm/plat-vexpress/platform_config.h
include/sbi.h
/optee_os/core/drivers/clk/clk-stm32mp21.c
/optee_os/core/drivers/clk/clk-stm32mp25.c
/optee_os/core/drivers/clk/sub.mk
/optee_os/core/drivers/ffa_console.c
/optee_os/core/drivers/hfic.c
/optee_os/core/drivers/rstctrl/stm32mp21_rstctrl.c
/optee_os/core/drivers/rstctrl/stm32mp25_rstctrl.c
/optee_os/core/drivers/rstctrl/sub.mk
/optee_os/core/drivers/stm32_gpio.c
/optee_os/core/drivers/stm32_iwdg.c
/optee_os/core/drivers/stm32_rtc.c
/optee_os/core/drivers/stm32_tamp.c
/optee_os/core/include/drivers/rtc.h
/optee_os/core/include/drivers/stm32mp21_rcc.h
/optee_os/core/include/drivers/stm32mp_dt_bindings.h
/optee_os/core/include/dt-bindings/clock/st,stm32mp21-rcc.h
/optee_os/core/include/dt-bindings/clock/stm32mp21-clksrc.h
/optee_os/core/include/dt-bindings/reset/st,stm32mp21-rcc.h
/optee_os/core/include/kernel/asan.h
/optee_os/core/kernel/asan.c
/optee_os/core/kernel/boot.c
/optee_os/core/kernel/panic.c
/optee_os/core/kernel/ree_fs_ta.c
/optee_os/core/kernel/tee_ta_manager.c
/optee_os/core/kernel/tpm.c
/optee_os/core/kernel/user_ta.c
/optee_os/core/pta/rtc.c
/optee_os/core/pta/tests/misc.c
/optee_os/lib/libutee/include/pta_rtc.h
/optee_os/lib/libutee/include/user_ta_header.h
/optee_os/lib/libutils/isoc/arch/arm/setjmp_a32.S
/optee_os/lib/libutils/isoc/arch/arm/setjmp_a64.S
/optee_os/lib/libutils/isoc/arch/riscv/setjmp_rv.S
/optee_os/lib/libutils/isoc/bget_malloc.c
/optee_os/lib/libutils/isoc/include/setjmp.h
/optee_os/lib/libutils/isoc/newlib/strchr.c
/optee_os/lib/libutils/isoc/newlib/strcmp.c
/optee_os/lib/libutils/isoc/newlib/strcpy.c
/optee_os/lib/libutils/isoc/newlib/strlen.c
/optee_os/mk/config.mk
/optee_os/ta/link.mk
/optee_os/ta/user_ta_header.c
f165144824-Jun-2025 Alvin Chang <alvinga@andestech.com>

core: riscv: fix hartid for primary hart when CFG_DYN_CONFIG=y

The hart ID is stored in s0 register not a0 register. This fixes
multi-hart boot hang issue.

Fixes: 29661368f51d ("core: riscv: preser

core: riscv: fix hartid for primary hart when CFG_DYN_CONFIG=y

The hart ID is stored in s0 register not a0 register. This fixes
multi-hart boot hang issue.

Fixes: 29661368f51d ("core: riscv: preserve hartid in s0 register at entry point")
Signed-off-by: Alvin Chang <alvinga@andestech.com>
Reviewed-by: Yu-Chien Peter Lin <peter.lin@sifive.com>

show more ...

5ee429d522-Jun-2025 Yu-Chien Peter Lin <peter.lin@sifive.com>

core: riscv: fix hartid at secondary hart entry point

The a0 register is corrupted during enable_mmu, so get
secondary hartid from s0 instead.

Fixes: 29661368f51d ("core: riscv: preserve hartid in

core: riscv: fix hartid at secondary hart entry point

The a0 register is corrupted during enable_mmu, so get
secondary hartid from s0 instead.

Fixes: 29661368f51d ("core: riscv: preserve hartid in s0 register at entry point")
Signed-off-by: Yu-Chien Peter Lin <peter.lin@sifive.com>
Reviewed-by: Alvin Chang <alvinga@andestech.com>

show more ...

0c44e92411-May-2025 Yu-Chien Peter Lin <peter.lin@sifive.com>

core: riscv: enable MMU earlier for secondary cores

Enable MMU for secondary harts earlier to ensure
proper access to symbols in ASLR virtual addresses.

Signed-off-by: Yu-Chien Peter Lin <peter.lin

core: riscv: enable MMU earlier for secondary cores

Enable MMU for secondary harts earlier to ensure
proper access to symbols in ASLR virtual addresses.

Signed-off-by: Yu-Chien Peter Lin <peter.lin@sifive.com>
Reviewed-by: Alvin Chang <alvinga@andestech.com>

show more ...

04d6aec208-Mar-2025 Yu-Chien Peter Lin <peter.lin@sifive.com>

core: riscv: allow enabling CFG_CORE_ASLR

Make ASLR configurable on RISC-V platforms.

Signed-off-by: Yu-Chien Peter Lin <peter.lin@sifive.com>
Reviewed-by: Alvin Chang <alvinga@andestech.com>

c98d801115-Mar-2025 Yu-Chien Peter Lin <peter.lin@sifive.com>

core: riscv: refactor MMU enablement code

Replace the set_satp macro with a proper enable_mmu function
to handle the transition to randomized virtual addresses. The
function executes from the identi

core: riscv: refactor MMU enablement code

Replace the set_satp macro with a proper enable_mmu function
to handle the transition to randomized virtual addresses. The
function executes from the identity mapped section to maintain
execution continuity during the VA->PA transition. It adjusts
the stack pointer, global pointer, thread pointer and ra register
with the ASLR offset.

The console is reinitialized after ASLR mapping is active since
the registered addresses need to be updated.

Signed-off-by: Yu-Chien Peter Lin <peter.lin@sifive.com>
Co-developed-by: Alvin Chang <alvinga@andestech.com>
Signed-off-by: Alvin Chang <alvinga@andestech.com>

show more ...

ca71b6fa15-Mar-2025 Yu-Chien Peter Lin <peter.lin@sifive.com>

core: riscv: add RISC-V relocation handling

Process relocations during boot to adjust addresses
with randomized offset at runtime.

Signed-off-by: Yu-Chien Peter Lin <peter.lin@sifive.com>
Co-develo

core: riscv: add RISC-V relocation handling

Process relocations during boot to adjust addresses
with randomized offset at runtime.

Signed-off-by: Yu-Chien Peter Lin <peter.lin@sifive.com>
Co-developed-by: Alvin Chang <alvinga@andestech.com>
Signed-off-by: Alvin Chang <alvinga@andestech.com>

show more ...

2966136801-Jun-2025 Yu-Chien Peter Lin <peter.lin@sifive.com>

core: riscv: preserve hartid in s0 register at entry point

The hartid is initially passed in a0 register. Since we
will introduce function calls in subsequent patches and
a0 is caller-saved per RISC

core: riscv: preserve hartid in s0 register at entry point

The hartid is initially passed in a0 register. Since we
will introduce function calls in subsequent patches and
a0 is caller-saved per RISC-V calling convention, preserve
the hart ID in s0 (callee-saved) to avoid unnecessary
save-restore operations when making function calls.

Also, use temporary registers instead in set_tp, makes
it more consistent with set_sp.

Signed-off-by: Yu-Chien Peter Lin <peter.lin@sifive.com>
Suggested-by: Alvin Chang <alvinga@andestech.com>
Reviewed-by: Alvin Chang <alvinga@andestech.com>

show more ...

e90887e315-Mar-2025 Yu-Chien Peter Lin <peter.lin@sifive.com>

core: riscv: implement get_aslr_seed() function

Implement the get_aslr_seed() function to provide ASLR
seed generation. Prefer sourcing the seed through the
hardware RNG (using the Zkr extension), a

core: riscv: implement get_aslr_seed() function

Implement the get_aslr_seed() function to provide ASLR
seed generation. Prefer sourcing the seed through the
hardware RNG (using the Zkr extension), and fallback to
platform-specific seed generation when Zkr is unavailable.

Signed-off-by: Yu-Chien Peter Lin <peter.lin@sifive.com>
Reviewed-by: Alvin Chang <alvinga@andestech.com>

show more ...

911f059b15-Mar-2025 Yu-Chien Peter Lin <peter.lin@sifive.com>

core: riscv: kern.ld.S: add relocation sections for ASLR

Add .rela.dyn and .data.rel.ro sections to support position-independent
code. These sections store the relocation entries needed when ASLR
ra

core: riscv: kern.ld.S: add relocation sections for ASLR

Add .rela.dyn and .data.rel.ro sections to support position-independent
code. These sections store the relocation entries needed when ASLR
randomly maps code and data in memory.

Signed-off-by: Yu-Chien Peter Lin <peter.lin@sifive.com>
Reviewed-by: Alvin Chang <alvinga@andestech.com>

show more ...

e99612ac15-Mar-2025 Yu-Chien Peter Lin <peter.lin@sifive.com>

core: riscv: make boot_mmu_config global and add it into identity_map

Change boot_mmu_config from LOCAL_DATA to DATA to make
it globally accessible. Also, add it into data section
of identity_map.

core: riscv: make boot_mmu_config global and add it into identity_map

Change boot_mmu_config from LOCAL_DATA to DATA to make
it globally accessible. Also, add it into data section
of identity_map.

Signed-off-by: Yu-Chien Peter Lin <peter.lin@sifive.com>
Reviewed-by: Alvin Chang <alvinga@andestech.com>

show more ...

f0a3f74214-Mar-2025 Yu-Chien Peter Lin <peter.lin@sifive.com>

riscv: add ELF header definitions

Add RISC-V specific ELF header definitions in a new header
file to support ELF parsing for handling dynamic relocations.

We referred to u-boot/arch/riscv/cpu/start

riscv: add ELF header definitions

Add RISC-V specific ELF header definitions in a new header
file to support ELF parsing for handling dynamic relocations.

We referred to u-boot/arch/riscv/cpu/start.S to obtain the
definitions we need in OP-TEE.

Signed-off-by: Yu-Chien Peter Lin <peter.lin@sifive.com>
Reviewed-by: Alvin Chang <alvinga@andestech.com>

show more ...

ed5c329426-May-2025 Yu-Chien Peter Lin <peter.lin@sifive.com>

core: riscv: implement ASLR base address calculation

Implement arch_aslr_base_addr() for RISC-V to compute the ASLR base
address using the provided seed.

The implementation maps addresses across th

core: riscv: implement ASLR base address calculation

Implement arch_aslr_base_addr() for RISC-V to compute the ASLR base
address using the provided seed.

The implementation maps addresses across the full virtual address space:
- When MSB of new based address is set, the address is mapped
to the upper half by extending MSB to 64-bit
- Otherwise, it's mapped to the lower half

This approach utilizes the entire available virtual address space for
ASLR (e.g. 512 GiB for Sv39).

Signed-off-by: Yu-Chien Peter Lin <peter.lin@sifive.com>
Reviewed-by: Alvin Chang <alvinga@andestech.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


/optee_os/.github/workflows/ci.yml
/optee_os/MAINTAINERS
/optee_os/core/arch/arm/dts/stm32mp131.dtsi
/optee_os/core/arch/arm/dts/stm32mp135f-dk.dts
/optee_os/core/arch/arm/dts/stm32mp151.dtsi
/optee_os/core/arch/arm/dts/stm32mp15xx-dkx.dtsi
/optee_os/core/arch/arm/dts/stm32mp211.dtsi
/optee_os/core/arch/arm/dts/stm32mp213.dtsi
/optee_os/core/arch/arm/dts/stm32mp215.dtsi
/optee_os/core/arch/arm/dts/stm32mp215f-dk-ca35tdcid-rif.dtsi
/optee_os/core/arch/arm/dts/stm32mp215f-dk.dts
/optee_os/core/arch/arm/dts/stm32mp21xc.dtsi
/optee_os/core/arch/arm/dts/stm32mp21xf.dtsi
/optee_os/core/arch/arm/dts/stm32mp251.dtsi
/optee_os/core/arch/arm/dts/stm32mp257f-ev1-ca35tdcid-rif.dtsi
/optee_os/core/arch/arm/dts/stm32mp257f-ev1.dts
/optee_os/core/arch/arm/kernel/boot.c
/optee_os/core/arch/arm/kernel/entry_a32.S
/optee_os/core/arch/arm/kernel/entry_a64.S
/optee_os/core/arch/arm/kernel/kern.ld.S
/optee_os/core/arch/arm/plat-stm32mp1/conf.mk
/optee_os/core/arch/arm/plat-stm32mp2/conf.mk
/optee_os/core/arch/arm/plat-versal2/conf.mk
mm/core_mmu_arch.c
/optee_os/core/core.mk
/optee_os/core/drivers/amd/gpio_common.c
/optee_os/core/drivers/amd/gpio_private.h
/optee_os/core/drivers/amd/ps_gpio_driver.c
/optee_os/core/drivers/amd/sub.mk
/optee_os/core/drivers/ffa_console.c
/optee_os/core/drivers/firewall/stm32_rifsc.c
/optee_os/core/drivers/stm32_exti.c
/optee_os/core/drivers/stm32_gpio.c
/optee_os/core/drivers/stm32_rtc.c
/optee_os/core/drivers/stm32_tamp.c
/optee_os/core/drivers/sub.mk
/optee_os/core/include/drivers/stm32_gpio.h
/optee_os/core/include/drivers/stm32_rtc.h
/optee_os/core/include/drivers/stm32mp_dt_bindings.h
/optee_os/core/include/dt-bindings/firewall/stm32mp21-rifsc.h
/optee_os/core/include/dt-bindings/firewall/stm32mp25-rifsc.h
/optee_os/core/include/dt-bindings/tamper/st,stm32-tamp.h
/optee_os/core/include/dt-bindings/tamper/st,stm32mp13-tamp.h
/optee_os/core/include/dt-bindings/tamper/st,stm32mp21-tamp.h
/optee_os/core/include/dt-bindings/tamper/st,stm32mp25-tamp.h
/optee_os/core/include/kernel/boot.h
/optee_os/core/include/kernel/dt_driver.h
/optee_os/core/include/kernel/interrupt.h
/optee_os/core/mm/boot_mem.c
/optee_os/core/mm/core_mmu.c
/optee_os/mk/config.mk
714fcbaa04-Jun-2025 Alvin Chang <alvinga@andestech.com>

riscv: mm: fix relocation of pointers in user_vpn2_table_va[]

The user_vpn2_table_va[] stores several pointers pointing to the level 2
page tables used by user TA. When CFG_CORE_ASLR=y, these pointe

riscv: mm: fix relocation of pointers in user_vpn2_table_va[]

The user_vpn2_table_va[] stores several pointers pointing to the level 2
page tables used by user TA. When CFG_CORE_ASLR=y, these pointers must
be relocated to ASLR VA as well. To fix this issue, we call
boot_mem_add_reloc() onto each element of user_vpn2_table_va[], so that
the pointers have a chance to be relocated by boot_mem_relocate() later.

Signed-off-by: Alvin Chang <alvinga@andestech.com>
Suggested-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Yu-Chien Peter Lin <peter.lin@sifive.com>

show more ...

bb53872202-Jun-2025 Alvin Chang <alvinga@andestech.com>

core: replace CFG_DYN_STACK_CONFIG with CFG_DYN_CONFIG

This commit replaces CFG_DYN_STACK_CONFIG with CFG_DYN_CONFIG since now
RISC-V also supports CFG_DYN_STACK_CONFIG.

Signed-off-by: Alvin Chang

core: replace CFG_DYN_STACK_CONFIG with CFG_DYN_CONFIG

This commit replaces CFG_DYN_STACK_CONFIG with CFG_DYN_CONFIG since now
RISC-V also supports CFG_DYN_STACK_CONFIG.

Signed-off-by: Alvin Chang <alvinga@andestech.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

1234567891011