History log of /optee_os/core/arch/riscv/ (Results 101 – 125 of 268)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
ab1707d101-Aug-2024 Mikko Rapeli <mikko.rapeli@linaro.org>

link.mk: generate version.o in link-out-dir

When source code is piped to compiler, then the
current working directory is left into debug
data. If the working directory is not the output
directory, t

link.mk: generate version.o in link-out-dir

When source code is piped to compiler, then the
current working directory is left into debug
data. If the working directory is not the output
directory, then mappings which strip absolute output
directory paths don't work.

Removes absolute build time paths from version.o
debug info.

Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>

show more ...

865e614701-Aug-2024 Mikko Rapeli <mikko.rapeli@linaro.org>

link.mk: use CFLAGS with version.o

Should be used by all compilations.

Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>

97db08f522-Jul-2024 Alvin Chang <alvinga@andestech.com>

core: riscv: Translate to PA when allocating PGT with MMU enabled

If MMU is enabled, core_mmu_pgt_alloc() returns virtual address of PGT
instead of physical address. Thus, it leads to some errors wh

core: riscv: Translate to PA when allocating PGT with MMU enabled

If MMU is enabled, core_mmu_pgt_alloc() returns virtual address of PGT
instead of physical address. Thus, it leads to some errors when we
invoke pa_to_ppn() with returned PGT which is actually the virtual
address of that PGT.

Fix it by checking whether MMU is enabled or not. If MMU is enabled, we
translate the returned PGT to its physical address.

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

show more ...


/optee_os/CHANGELOG.md
/optee_os/core/arch/arm/arm.mk
/optee_os/core/arch/arm/crypto/sha3_armv8a_ce_a64.S
/optee_os/core/arch/arm/crypto/sm4_armv8a_ce_a64.S
/optee_os/core/arch/arm/dts/stm32mp13xc.dtsi
/optee_os/core/arch/arm/dts/stm32mp13xf.dtsi
/optee_os/core/arch/arm/include/ffa.h
/optee_os/core/arch/arm/include/kernel/thread_private_arch.h
/optee_os/core/arch/arm/include/mm/core_mmu_arch.h
/optee_os/core/arch/arm/kernel/thread_spmc.c
/optee_os/core/arch/arm/mm/core_mmu_v7.c
/optee_os/core/arch/arm/plat-stm32mp1/conf.mk
/optee_os/core/arch/arm/plat-stm32mp1/drivers/stm32mp1_pmic.c
/optee_os/core/arch/arm/plat-vexpress/main.c
mm/core_mmu_arch.c
/optee_os/core/drivers/crypto/hisilicon/crypto.mk
/optee_os/core/drivers/crypto/hisilicon/hpre_ecc.c
/optee_os/core/drivers/crypto/hisilicon/hpre_ecc.h
/optee_os/core/drivers/crypto/hisilicon/sec_cipher.c
/optee_os/core/drivers/crypto/hisilicon/sec_cipher.h
/optee_os/core/drivers/crypto/hisilicon/sec_hash.c
/optee_os/core/drivers/crypto/hisilicon/sec_main.h
/optee_os/core/drivers/crypto/hisilicon/sub.mk
/optee_os/core/drivers/crypto/stm32/cipher.c
/optee_os/core/drivers/crypto/stm32/stm32_saes.c
/optee_os/core/drivers/firewall/firewall.c
/optee_os/core/drivers/hisi_trng.c
/optee_os/core/drivers/i2c/atmel_i2c.c
/optee_os/core/drivers/stm32_i2c.c
/optee_os/core/include/kernel/dt_driver.h
/optee_os/core/include/mm/mobj.h
/optee_os/core/kernel/dt_driver.c
/optee_os/core/kernel/user_access.c
/optee_os/core/lib/libtomcrypt/src/pk/ec25519/tweetnacl.c
/optee_os/core/mm/core_mmu.c
/optee_os/core/mm/mobj.c
/optee_os/lib/libutee/include/user_ta_header.h
/optee_os/lib/libutils/ext/include/util.h
/optee_os/lib/libutils/ext/qsort_helpers.c
/optee_os/lib/libutils/ext/sub.mk
/optee_os/lib/libutils/isoc/arch/arm/sub.mk
/optee_os/mk/config.mk
d237e61606-Feb-2024 Jens Wiklander <jens.wiklander@linaro.org>

core: make generic notifications virtualization-aware

Makes the generic notification handling aware of virtualization. Atomic
events are delivered with a guest_id parameter and asynchronous
notifica

core: make generic notifications virtualization-aware

Makes the generic notification handling aware of virtualization. Atomic
events are delivered with a guest_id parameter and asynchronous
notifications are started per guest_id.

struct notif_data is added as guest specific data to be able to track if
notifications are started for a guest.

While this patch compiles it doesn't work as intended without patches
handling the ABI specific side of things.

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

show more ...

5e26ef8f01-May-2024 Alvin Chang <alvinga@andestech.com>

core: riscv: Improve the trap handler

In current RISC-V trap handler, we always save the context into struct
thread_trap_regs first, and copy the saved context into another specific
structure to han

core: riscv: Improve the trap handler

In current RISC-V trap handler, we always save the context into struct
thread_trap_regs first, and copy the saved context into another specific
structure to handle that trap. For example, thread_user_ecall_handler()
copies the struct thread_trap_regs to be struct thread_scall_regs before
handling this system call. In fact, such copies may drop the performance
and they should be eliminated.

In this commit, the specific data structure used to save the context is
determined early in the trap handler by checking the type of the trap
from CSR XCAUSE. Thus, the copies between context structures are
eliminated.

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

show more ...


/optee_os/.github/workflows/ci.yml
/optee_os/core/arch/arm/dts/sama7g5.dtsi
/optee_os/core/arch/arm/dts/stm32mp251.dtsi
/optee_os/core/arch/arm/dts/stm32mp257f-ev1-ca35tdcid-rcc.dtsi
/optee_os/core/arch/arm/dts/stm32mp257f-ev1.dts
/optee_os/core/arch/arm/include/arm64.h
/optee_os/core/arch/arm/include/ffa.h
/optee_os/core/arch/arm/include/kernel/spmc_sp_handler.h
/optee_os/core/arch/arm/kernel/spmc_sp_handler.c
/optee_os/core/arch/arm/kernel/thread_spmc.c
/optee_os/core/arch/arm/mm/sp_mem.c
/optee_os/core/arch/arm/plat-mediatek/conf.mk
/optee_os/core/arch/arm/plat-mediatek/platform_config.h
/optee_os/core/arch/arm/plat-sam/freq.c
/optee_os/core/arch/arm/plat-sam/scmi_server.c
/optee_os/core/arch/arm/plat-stm32mp1/conf.mk
/optee_os/core/arch/arm/plat-stm32mp2/conf.mk
/optee_os/core/arch/arm/plat-stm32mp2/drivers/stm32mp25_syscfg.c
/optee_os/core/arch/arm/plat-stm32mp2/drivers/sub.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-stm32mp2/sub.mk
/optee_os/core/arch/arm/plat-vexpress/conf.mk
include/kernel/thread_arch.h
include/kernel/thread_private_arch.h
kernel/asm-defines.c
kernel/thread_arch.c
kernel/thread_rv.S
/optee_os/core/crypto/crypto.c
/optee_os/core/drivers/clk/clk-stm32mp25.c
/optee_os/core/drivers/clk/sam/at91_clk.h
/optee_os/core/drivers/clk/sam/at91_cpu_opp.c
/optee_os/core/drivers/clk/sam/sub.mk
/optee_os/core/drivers/clk/sub.mk
/optee_os/core/drivers/crypto/caam/acipher/caam_rsa.c
/optee_os/core/drivers/crypto/crypto_api/acipher/rsa.c
/optee_os/core/drivers/crypto/crypto_api/include/drvcrypt_acipher.h
/optee_os/core/drivers/crypto/se050/core/rsa.c
/optee_os/core/drivers/crypto/versal/rsa.c
/optee_os/core/drivers/rstctrl/stm32_rstctrl.c
/optee_os/core/drivers/rstctrl/stm32_rstctrl.h
/optee_os/core/drivers/rstctrl/stm32mp1_rstctrl.c
/optee_os/core/drivers/rstctrl/stm32mp25_rstctrl.c
/optee_os/core/drivers/rstctrl/sub.mk
/optee_os/core/include/crypto/crypto.h
/optee_os/core/include/crypto/crypto_impl.h
/optee_os/core/include/drivers/stm32mp25_rcc.h
/optee_os/core/include/drivers/stm32mp2_rcc_util.h
/optee_os/core/include/drivers/stm32mp_dt_bindings.h
/optee_os/core/include/dt-bindings/clock/at91.h
/optee_os/core/include/dt-bindings/clock/st,stm32mp25-rcc.h
/optee_os/core/include/dt-bindings/clock/stm32mp25-clksrc.h
/optee_os/core/include/dt-bindings/mfd/st,stpmic1.h
/optee_os/core/include/dt-bindings/reset/st,stm32mp25-rcc.h
/optee_os/core/include/mm/pgt_cache.h
/optee_os/core/lib/libtomcrypt/rsa.c
/optee_os/core/lib/libtomcrypt/src/pk/asn1/der/sequence/der_decode_sequence_flexi.c
/optee_os/core/lib/libtomcrypt/src/pk/asn1/der/sequence/der_decode_sequence_multi.c
/optee_os/core/lib/libtomcrypt/src/pk/asn1/der/sequence/der_encode_sequence_multi.c
/optee_os/core/lib/scmi-server/conf-optee-stm32mp1.mk
/optee_os/core/lib/scmi-server/conf.mk
/optee_os/core/lib/scmi-server/sub.mk
/optee_os/core/lib/zlib/sub.mk
/optee_os/core/mm/core_mmu.c
/optee_os/core/mm/pgt_cache.c
/optee_os/core/tee/tee_ree_fs.c
/optee_os/core/tee/tee_svc_cryp.c
/optee_os/lib/libmbedtls/core/rsa.c
/optee_os/lib/libmbedtls/include/mbedtls_config_kernel.h
/optee_os/lib/libmbedtls/include/mbedtls_config_uta.h
/optee_os/lib/libmbedtls/mbedtls/.uncrustify.cfg
/optee_os/lib/libmbedtls/mbedtls/BUGS.md
/optee_os/lib/libmbedtls/mbedtls/CONTRIBUTING.md
/optee_os/lib/libmbedtls/mbedtls/ChangeLog
/optee_os/lib/libmbedtls/mbedtls/LICENSE
/optee_os/lib/libmbedtls/mbedtls/README.md
/optee_os/lib/libmbedtls/mbedtls/SECURITY.md
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/aes.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/aria.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/asn1.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/asn1write.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/base64.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/bignum.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/block_cipher.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/build_info.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/camellia.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/ccm.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/chacha20.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/chachapoly.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/check_config.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/cipher.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/cmac.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/compat-2.x.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/config_adjust_legacy_crypto.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/config_adjust_legacy_from_psa.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/config_adjust_psa_from_legacy.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/config_adjust_psa_superset_legacy.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/config_adjust_ssl.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/config_adjust_x509.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/config_psa.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/constant_time.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/ctr_drbg.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/debug.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/des.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/entropy.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/error.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/gcm.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/hkdf.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/hmac_drbg.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/lms.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/md.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/md5.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/memory_buffer_alloc.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/net_sockets.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/nist_kw.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/oid.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/pem.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/pk.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/pkcs12.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/pkcs5.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/pkcs7.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/platform.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/platform_time.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/platform_util.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/poly1305.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/private_access.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/psa_util.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/ripemd160.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/rsa.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/sha1.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/sha256.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/sha3.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/sha512.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/ssl.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/ssl_cache.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/ssl_ciphersuites.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/threading.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/timing.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/version.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/x509.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/x509_crl.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/build_info.h
/optee_os/lib/libmbedtls/mbedtls/include/psa/crypto.h
/optee_os/lib/libmbedtls/mbedtls/include/psa/crypto_adjust_auto_enabled.h
/optee_os/lib/libmbedtls/mbedtls/include/psa/crypto_adjust_config_key_pair_types.h
/optee_os/lib/libmbedtls/mbedtls/include/psa/crypto_adjust_config_synonyms.h
/optee_os/lib/libmbedtls/mbedtls/include/psa/crypto_builtin_composites.h
/optee_os/lib/libmbedtls/mbedtls/include/psa/crypto_builtin_key_derivation.h
/optee_os/lib/libmbedtls/mbedtls/include/psa/crypto_builtin_primitives.h
/optee_os/lib/libmbedtls/mbedtls/include/psa/crypto_compat.h
/optee_os/lib/libmbedtls/mbedtls/include/psa/crypto_config.h
/optee_os/lib/libmbedtls/mbedtls/include/psa/crypto_driver_common.h
/optee_os/lib/libmbedtls/mbedtls/include/psa/crypto_driver_contexts_composites.h
/optee_os/lib/libmbedtls/mbedtls/include/psa/crypto_driver_contexts_key_derivation.h
/optee_os/lib/libmbedtls/mbedtls/include/psa/crypto_driver_contexts_primitives.h
/optee_os/lib/libmbedtls/mbedtls/include/psa/crypto_extra.h
/optee_os/lib/libmbedtls/mbedtls/include/psa/crypto_legacy.h
/optee_os/lib/libmbedtls/mbedtls/include/psa/crypto_platform.h
/optee_os/lib/libmbedtls/mbedtls/include/psa/crypto_se_driver.h
/optee_os/lib/libmbedtls/mbedtls/include/psa/crypto_sizes.h
/optee_os/lib/libmbedtls/mbedtls/include/psa/crypto_struct.h
/optee_os/lib/libmbedtls/mbedtls/include/psa/crypto_types.h
/optee_os/lib/libmbedtls/mbedtls/include/psa/crypto_values.h
/optee_os/lib/libmbedtls/mbedtls/library/aes.c
/optee_os/lib/libmbedtls/mbedtls/library/aesce.c
/optee_os/lib/libmbedtls/mbedtls/library/aesce.h
/optee_os/lib/libmbedtls/mbedtls/library/aesni.c
/optee_os/lib/libmbedtls/mbedtls/library/aesni.h
/optee_os/lib/libmbedtls/mbedtls/library/alignment.h
/optee_os/lib/libmbedtls/mbedtls/library/aria.c
/optee_os/lib/libmbedtls/mbedtls/library/asn1parse.c
/optee_os/lib/libmbedtls/mbedtls/library/asn1write.c
/optee_os/lib/libmbedtls/mbedtls/library/base64.c
/optee_os/lib/libmbedtls/mbedtls/library/base64_internal.h
/optee_os/lib/libmbedtls/mbedtls/library/bignum.c
/optee_os/lib/libmbedtls/mbedtls/library/bignum_core.c
/optee_os/lib/libmbedtls/mbedtls/library/bignum_core.h
/optee_os/lib/libmbedtls/mbedtls/library/bignum_mod.c
/optee_os/lib/libmbedtls/mbedtls/library/bignum_mod.h
/optee_os/lib/libmbedtls/mbedtls/library/bignum_mod_raw.c
/optee_os/lib/libmbedtls/mbedtls/library/bignum_mod_raw.h
/optee_os/lib/libmbedtls/mbedtls/library/bignum_mod_raw_invasive.h
/optee_os/lib/libmbedtls/mbedtls/library/block_cipher.c
/optee_os/lib/libmbedtls/mbedtls/library/block_cipher_internal.h
/optee_os/lib/libmbedtls/mbedtls/library/bn_mul.h
/optee_os/lib/libmbedtls/mbedtls/library/camellia.c
/optee_os/lib/libmbedtls/mbedtls/library/ccm.c
/optee_os/lib/libmbedtls/mbedtls/library/chacha20.c
/optee_os/lib/libmbedtls/mbedtls/library/chachapoly.c
/optee_os/lib/libmbedtls/mbedtls/library/check_crypto_config.h
/optee_os/lib/libmbedtls/mbedtls/library/cipher.c
/optee_os/lib/libmbedtls/mbedtls/library/cipher_wrap.c
/optee_os/lib/libmbedtls/mbedtls/library/cipher_wrap.h
/optee_os/lib/libmbedtls/mbedtls/library/cmac.c
/optee_os/lib/libmbedtls/mbedtls/library/common.h
/optee_os/lib/libmbedtls/mbedtls/library/constant_time.c
/optee_os/lib/libmbedtls/mbedtls/library/constant_time_impl.h
/optee_os/lib/libmbedtls/mbedtls/library/constant_time_internal.h
/optee_os/lib/libmbedtls/mbedtls/library/ctr.h
/optee_os/lib/libmbedtls/mbedtls/library/ctr_drbg.c
/optee_os/lib/libmbedtls/mbedtls/library/debug.c
/optee_os/lib/libmbedtls/mbedtls/library/debug_internal.h
/optee_os/lib/libmbedtls/mbedtls/library/des.c
/optee_os/lib/libmbedtls/mbedtls/library/dhm.c
/optee_os/lib/libmbedtls/mbedtls/library/ecdh.c
/optee_os/lib/libmbedtls/mbedtls/library/ecdsa.c
/optee_os/lib/libmbedtls/mbedtls/library/ecjpake.c
/optee_os/lib/libmbedtls/mbedtls/library/ecp.c
/optee_os/lib/libmbedtls/mbedtls/library/ecp_curves.c
/optee_os/lib/libmbedtls/mbedtls/library/ecp_curves_new.c
/optee_os/lib/libmbedtls/mbedtls/library/ecp_internal_alt.h
/optee_os/lib/libmbedtls/mbedtls/library/ecp_invasive.h
/optee_os/lib/libmbedtls/mbedtls/library/entropy.c
/optee_os/lib/libmbedtls/mbedtls/library/entropy_poll.c
/optee_os/lib/libmbedtls/mbedtls/library/entropy_poll.h
/optee_os/lib/libmbedtls/mbedtls/library/error.c
/optee_os/lib/libmbedtls/mbedtls/library/gcm.c
/optee_os/lib/libmbedtls/mbedtls/library/hkdf.c
/optee_os/lib/libmbedtls/mbedtls/library/hmac_drbg.c
/optee_os/lib/libmbedtls/mbedtls/library/lmots.c
/optee_os/lib/libmbedtls/mbedtls/library/lmots.h
/optee_os/lib/libmbedtls/mbedtls/library/lms.c
/optee_os/lib/libmbedtls/mbedtls/library/md.c
/optee_os/lib/libmbedtls/mbedtls/library/md5.c
/optee_os/lib/libmbedtls/mbedtls/library/md_psa.h
/optee_os/lib/libmbedtls/mbedtls/library/md_wrap.h
/optee_os/lib/libmbedtls/mbedtls/library/memory_buffer_alloc.c
/optee_os/lib/libmbedtls/mbedtls/library/net_sockets.c
/optee_os/lib/libmbedtls/mbedtls/library/nist_kw.c
/optee_os/lib/libmbedtls/mbedtls/library/oid.c
/optee_os/lib/libmbedtls/mbedtls/library/padlock.c
/optee_os/lib/libmbedtls/mbedtls/library/padlock.h
/optee_os/lib/libmbedtls/mbedtls/library/pem.c
/optee_os/lib/libmbedtls/mbedtls/library/pk.c
/optee_os/lib/libmbedtls/mbedtls/library/pk_ecc.c
/optee_os/lib/libmbedtls/mbedtls/library/pk_internal.h
/optee_os/lib/libmbedtls/mbedtls/library/pk_wrap.c
/optee_os/lib/libmbedtls/mbedtls/library/pk_wrap.h
/optee_os/lib/libmbedtls/mbedtls/library/pkcs12.c
/optee_os/lib/libmbedtls/mbedtls/library/pkcs5.c
/optee_os/lib/libmbedtls/mbedtls/library/pkcs7.c
/optee_os/lib/libmbedtls/mbedtls/library/pkparse.c
/optee_os/lib/libmbedtls/mbedtls/library/pkwrite.c
/optee_os/lib/libmbedtls/mbedtls/library/pkwrite.h
/optee_os/lib/libmbedtls/mbedtls/library/platform.c
/optee_os/lib/libmbedtls/mbedtls/library/platform_util.c
/optee_os/lib/libmbedtls/mbedtls/library/poly1305.c
/optee_os/lib/libmbedtls/mbedtls/library/psa_crypto.c
/optee_os/lib/libmbedtls/mbedtls/library/psa_crypto_aead.c
/optee_os/lib/libmbedtls/mbedtls/library/psa_crypto_aead.h
/optee_os/lib/libmbedtls/mbedtls/library/psa_crypto_cipher.c
/optee_os/lib/libmbedtls/mbedtls/library/psa_crypto_cipher.h
/optee_os/lib/libmbedtls/mbedtls/library/psa_crypto_client.c
/optee_os/lib/libmbedtls/mbedtls/library/psa_crypto_core.h
/optee_os/lib/libmbedtls/mbedtls/library/psa_crypto_core_common.h
/optee_os/lib/libmbedtls/mbedtls/library/psa_crypto_driver_wrappers.h
/optee_os/lib/libmbedtls/mbedtls/library/psa_crypto_driver_wrappers_no_static.c
/optee_os/lib/libmbedtls/mbedtls/library/psa_crypto_driver_wrappers_no_static.h
/optee_os/lib/libmbedtls/mbedtls/library/psa_crypto_ecp.c
/optee_os/lib/libmbedtls/mbedtls/library/psa_crypto_ecp.h
/optee_os/lib/libmbedtls/mbedtls/library/psa_crypto_ffdh.c
/optee_os/lib/libmbedtls/mbedtls/library/psa_crypto_ffdh.h
/optee_os/lib/libmbedtls/mbedtls/library/psa_crypto_hash.c
/optee_os/lib/libmbedtls/mbedtls/library/psa_crypto_hash.h
/optee_os/lib/libmbedtls/mbedtls/library/psa_crypto_invasive.h
/optee_os/lib/libmbedtls/mbedtls/library/psa_crypto_its.h
/optee_os/lib/libmbedtls/mbedtls/library/psa_crypto_mac.c
/optee_os/lib/libmbedtls/mbedtls/library/psa_crypto_mac.h
/optee_os/lib/libmbedtls/mbedtls/library/psa_crypto_pake.c
/optee_os/lib/libmbedtls/mbedtls/library/psa_crypto_pake.h
/optee_os/lib/libmbedtls/mbedtls/library/psa_crypto_random_impl.h
/optee_os/lib/libmbedtls/mbedtls/library/psa_crypto_rsa.c
/optee_os/lib/libmbedtls/mbedtls/library/psa_crypto_rsa.h
/optee_os/lib/libmbedtls/mbedtls/library/psa_crypto_se.c
/optee_os/lib/libmbedtls/mbedtls/library/psa_crypto_se.h
/optee_os/lib/libmbedtls/mbedtls/library/psa_crypto_slot_management.c
/optee_os/lib/libmbedtls/mbedtls/library/psa_crypto_slot_management.h
/optee_os/lib/libmbedtls/mbedtls/library/psa_crypto_storage.c
/optee_os/lib/libmbedtls/mbedtls/library/psa_crypto_storage.h
/optee_os/lib/libmbedtls/mbedtls/library/psa_its_file.c
/optee_os/lib/libmbedtls/mbedtls/library/psa_util.c
/optee_os/lib/libmbedtls/mbedtls/library/psa_util_internal.h
/optee_os/lib/libmbedtls/mbedtls/library/ripemd160.c
/optee_os/lib/libmbedtls/mbedtls/library/rsa.c
/optee_os/lib/libmbedtls/mbedtls/library/rsa_alt_helpers.c
/optee_os/lib/libmbedtls/mbedtls/library/rsa_alt_helpers.h
/optee_os/lib/libmbedtls/mbedtls/library/rsa_internal.h
/optee_os/lib/libmbedtls/mbedtls/library/sha1.c
/optee_os/lib/libmbedtls/mbedtls/library/sha256.c
/optee_os/lib/libmbedtls/mbedtls/library/sha3.c
/optee_os/lib/libmbedtls/mbedtls/library/sha512.c
/optee_os/lib/libmbedtls/mbedtls/library/ssl_cache.c
/optee_os/lib/libmbedtls/mbedtls/library/ssl_ciphersuites.c
/optee_os/lib/libmbedtls/mbedtls/library/ssl_ciphersuites_internal.h
/optee_os/lib/libmbedtls/mbedtls/library/ssl_client.c
/optee_os/lib/libmbedtls/mbedtls/library/ssl_client.h
/optee_os/lib/libmbedtls/mbedtls/library/ssl_cookie.c
/optee_os/lib/libmbedtls/mbedtls/library/ssl_debug_helpers.h
/optee_os/lib/libmbedtls/mbedtls/library/ssl_debug_helpers_generated.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_ticket.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_client.c
/optee_os/lib/libmbedtls/mbedtls/library/ssl_tls13_generic.c
/optee_os/lib/libmbedtls/mbedtls/library/ssl_tls13_invasive.h
/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/ssl_tls13_server.c
/optee_os/lib/libmbedtls/mbedtls/library/threading.c
/optee_os/lib/libmbedtls/mbedtls/library/timing.c
/optee_os/lib/libmbedtls/mbedtls/library/version.c
/optee_os/lib/libmbedtls/mbedtls/library/version_features.c
/optee_os/lib/libmbedtls/mbedtls/library/x509.c
/optee_os/lib/libmbedtls/mbedtls/library/x509_create.c
/optee_os/lib/libmbedtls/mbedtls/library/x509_crl.c
/optee_os/lib/libmbedtls/mbedtls/library/x509_crt.c
/optee_os/lib/libmbedtls/mbedtls/library/x509_csr.c
/optee_os/lib/libmbedtls/mbedtls/library/x509_internal.h
/optee_os/lib/libmbedtls/mbedtls/library/x509write.c
/optee_os/lib/libmbedtls/mbedtls/library/x509write_crt.c
/optee_os/lib/libmbedtls/mbedtls/library/x509write_csr.c
/optee_os/lib/libmbedtls/sub.mk
/optee_os/lib/libutils/isoc/sub.mk
/optee_os/mk/config.mk
/optee_os/scripts/gen_compile_commands.py
956c2d5012-Jun-2024 Etienne Carriere <etienne.carriere@foss.st.com>

core: fix race condition on TA/PTA/StMM context loading

Fix race condition on creation of a context for single instance TAs,
PTAs or StMM application. Such race condition could occur and lead to
dup

core: fix race condition on TA/PTA/StMM context loading

Fix race condition on creation of a context for single instance TAs,
PTAs or StMM application. Such race condition could occur and lead to
duplicated contexts if connected close enough that they are created
after tee_ta_init_session() calls tee_ta_init_session_with_context()
and before the context are added in the centralized context list.

This is realized by keeping tee_ta_mutex held while tee_ctxes list is
looked up for matching a context or a new context is added into that
list with its .is_initializing field activated. For that purpose
user TA and StMM application initialization function are split in
2 functions, the 2nd one used to finalizes the context creation
started in the 1st function.

By the way, add inline description comments and fix indentation issues
in uaer_ta.h and remove the inline comment in pseudo_ta.c that refers
to TA loading whereas the function relates to PTA contexts creation.

Closes: https://github.com/OP-TEE/optee_os/issues/6801
Suggested-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>

show more ...

09bbd26b15-May-2024 Yu Chien Peter Lin <peterlin@andestech.com>

riscv: plat-virt: switch to dynamic shared memory

Enable dynamic shared memory for QEMU virt machine.

Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com>
Reviewed-by: Alvin Chang <alvinga@an

riscv: plat-virt: switch to dynamic shared memory

Enable dynamic shared memory for QEMU virt machine.

Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com>
Reviewed-by: Alvin Chang <alvinga@andestech.com>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>

show more ...

139faa8b23-May-2024 Alvin Chang <alvinga@andestech.com>

core: riscv: Add a reserved-memory node for static shared memory

To prevent Linux from using static shared memory, include the
dedicated reserved-memory node in the device tree.

Signed-off-by: Alvi

core: riscv: Add a reserved-memory node for static shared memory

To prevent Linux from using static shared memory, include the
dedicated reserved-memory node in the device tree.

Signed-off-by: Alvin Chang <alvinga@andestech.com>
Reviewed-by: Yu Chien Peter Lin <peterlin@andestech.com>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>

show more ...


/optee_os/.github/workflows/ci.yml
/optee_os/core/arch/arm/kernel/boot.c
/optee_os/core/arch/arm/mm/sub.mk
/optee_os/core/arch/arm/mm/tee_pager.c
/optee_os/core/arch/arm/plat-hikey/platform_config.h
/optee_os/core/arch/arm/plat-mediatek/conf.mk
kernel/boot.c
/optee_os/core/crypto/signed_hdr.c
/optee_os/core/drivers/clk/sam/at91_pmc.h
/optee_os/core/drivers/crypto/hisilicon/crypto.mk
/optee_os/core/drivers/crypto/hisilicon/hisi_qm.h
/optee_os/core/drivers/crypto/hisilicon/hpre_dh.c
/optee_os/core/drivers/crypto/hisilicon/hpre_dh.h
/optee_os/core/drivers/crypto/hisilicon/hpre_main.c
/optee_os/core/drivers/crypto/hisilicon/hpre_main.h
/optee_os/core/drivers/crypto/hisilicon/sec_hash.c
/optee_os/core/drivers/crypto/hisilicon/sec_hash.h
/optee_os/core/drivers/crypto/hisilicon/sec_hmac.c
/optee_os/core/drivers/crypto/hisilicon/sec_main.c
/optee_os/core/drivers/crypto/hisilicon/sec_main.h
/optee_os/core/drivers/crypto/hisilicon/sub.mk
/optee_os/core/drivers/crypto/se050/adaptors/include/se050.h
/optee_os/core/drivers/crypto/se050/adaptors/utils/scp_config.c
/optee_os/core/drivers/crypto/stm32/cipher.c
/optee_os/core/drivers/firewall/firewall.c
/optee_os/core/drivers/firewall/sub.mk
/optee_os/core/drivers/pm/sam/at91_pm.c
/optee_os/core/drivers/pm/sam/at91_pm.h
/optee_os/core/drivers/pm/sam/pm-defines.c
/optee_os/core/drivers/pm/sam/pm_suspend.S
/optee_os/core/drivers/sub.mk
/optee_os/core/include/drivers/firewall.h
/optee_os/core/include/drivers/firewall_device.h
/optee_os/core/include/drivers/sam/sama7-ddr.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/include/kernel/mutex.h
/optee_os/core/include/kernel/spinlock.h
/optee_os/core/include/kernel/user_ta.h
/optee_os/core/kernel/boot.c
/optee_os/core/kernel/dt_driver.c
/optee_os/core/kernel/sub.mk
/optee_os/core/lib/libtomcrypt/aes_accel.c
/optee_os/core/mm/mobj_dyn_shm.c
/optee_os/core/mm/sub.mk
/optee_os/lib/libutils/ext/include/fault_mitigation.h
/optee_os/scripts/ftrace_format.py
78444d3326-Apr-2024 Alvin Chang <alvinga@andestech.com>

core: riscv: Fix store 32-bit thread_core_local flags

The thread_core_local flags is a 32-bit variable. Thus, we must
explicitly use "sw" instruction, which means store 32-bit value into
specific me

core: riscv: Fix store 32-bit thread_core_local flags

The thread_core_local flags is a 32-bit variable. Thus, we must
explicitly use "sw" instruction, which means store 32-bit value into
specific memory address, to operate the thread_core_local flags.

Signed-off-by: Alvin Chang <alvinga@andestech.com>
Reviewed-by: Yu Chien Peter Lin <peterlin@andestech.com>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>

show more ...


/optee_os/core/arch/arm/crypto/aes_modes_armv8a_ce_a64.S
/optee_os/core/arch/arm/kernel/boot.c
/optee_os/core/arch/arm/kernel/thread_spmc.c
/optee_os/core/arch/arm/plat-sam/conf.mk
/optee_os/core/arch/arm/plat-vexpress/main.c
kernel/entry.S
/optee_os/core/crypto.mk
/optee_os/core/drivers/atmel_shdwc.c
/optee_os/core/drivers/crypto/hisilicon/crypto.mk
/optee_os/core/drivers/crypto/hisilicon/hpre_dh.c
/optee_os/core/drivers/crypto/hisilicon/hpre_main.c
/optee_os/core/drivers/crypto/hisilicon/include/hpre_dh.h
/optee_os/core/drivers/crypto/hisilicon/include/hpre_main.h
/optee_os/core/drivers/crypto/hisilicon/include/sec_main.h
/optee_os/core/drivers/crypto/hisilicon/sec_main.c
/optee_os/core/drivers/crypto/hisilicon/sub.mk
/optee_os/core/drivers/ffa_console.c
/optee_os/core/drivers/pm/sam/at91_pm.c
/optee_os/core/drivers/regulator/regulator.c
/optee_os/core/drivers/sub.mk
/optee_os/core/include/drivers/atmel_shdwc.h
/optee_os/core/include/drivers/ffa_console.h
/optee_os/core/include/drivers/pm/sam/atmel_pm.h
/optee_os/core/include/drivers/stpmic1_regulator.h
/optee_os/core/kernel/callout.c
/optee_os/core/kernel/console.c
/optee_os/core/kernel/ubsan.c
/optee_os/core/lib/libtomcrypt/aes.c
/optee_os/core/lib/libtomcrypt/aes_accel.c
/optee_os/core/lib/libtomcrypt/rsa.c
/optee_os/core/lib/libtomcrypt/src/ciphers/aes/aes.c
/optee_os/core/lib/libtomcrypt/src/ciphers/aes/aes_desc.c
/optee_os/core/lib/libtomcrypt/src/ciphers/aes/aesni.c
/optee_os/core/lib/libtomcrypt/src/encauth/ccm/ccm_memory.c
/optee_os/core/lib/libtomcrypt/src/encauth/ccm/ccm_test.c
/optee_os/core/lib/libtomcrypt/src/encauth/gcm/gcm_memory.c
/optee_os/core/lib/libtomcrypt/src/hashes/tiger.c
/optee_os/core/lib/libtomcrypt/src/headers/tomcrypt.h
/optee_os/core/lib/libtomcrypt/src/headers/tomcrypt_cfg.h
/optee_os/core/lib/libtomcrypt/src/headers/tomcrypt_cipher.h
/optee_os/core/lib/libtomcrypt/src/headers/tomcrypt_custom.h
/optee_os/core/lib/libtomcrypt/src/headers/tomcrypt_hash.h
/optee_os/core/lib/libtomcrypt/src/headers/tomcrypt_mac.h
/optee_os/core/lib/libtomcrypt/src/headers/tomcrypt_macros.h
/optee_os/core/lib/libtomcrypt/src/headers/tomcrypt_pk.h
/optee_os/core/lib/libtomcrypt/src/headers/tomcrypt_pkcs.h
/optee_os/core/lib/libtomcrypt/src/headers/tomcrypt_private.h
/optee_os/core/lib/libtomcrypt/src/math/fp/ltc_ecc_fp_mulmod.c
/optee_os/core/lib/libtomcrypt/src/misc/crypt/crypt.c
/optee_os/core/lib/libtomcrypt/src/misc/crypt/crypt_register_all_ciphers.c
/optee_os/core/lib/libtomcrypt/src/misc/crypt/crypt_register_all_hashes.c
/optee_os/core/lib/libtomcrypt/src/misc/pkcs5/pkcs_5_test.c
/optee_os/core/lib/libtomcrypt/src/misc/ssh/ssh_encode_sequence_multi.c
/optee_os/core/lib/libtomcrypt/src/pk/asn1/der/choice/der_decode_choice.c
/optee_os/core/lib/libtomcrypt/src/pk/asn1/der/custom_type/der_encode_custom_type.c
/optee_os/core/lib/libtomcrypt/src/pk/asn1/der/sequence/der_encode_sequence_ex.c
/optee_os/core/lib/libtomcrypt/src/pk/asn1/der/utf8/der_decode_utf8_string.c
/optee_os/core/lib/libtomcrypt/src/pk/dsa/dsa_import.c
/optee_os/core/lib/libtomcrypt/src/pk/ecc/ecc_get_key.c
/optee_os/core/lib/libtomcrypt/src/pk/ecc/ecc_import_pkcs8.c
/optee_os/core/lib/libtomcrypt/src/pk/pkcs1/pkcs_1_oaep_decode.c
/optee_os/core/lib/libtomcrypt/src/pk/pkcs1/pkcs_1_oaep_encode.c
/optee_os/core/lib/libtomcrypt/src/pk/pkcs1/pkcs_1_v1_5_encode.c
/optee_os/core/lib/libtomcrypt/src/pk/rsa/rsa_decrypt_key.c
/optee_os/core/lib/libtomcrypt/src/pk/rsa/rsa_encrypt_key.c
/optee_os/core/lib/libtomcrypt/src/pk/rsa/rsa_verify_hash.c
/optee_os/core/lib/libtomcrypt/src/prngs/fortuna.c
/optee_os/core/lib/libtomcrypt/src/prngs/rng_get_bytes.c
/optee_os/core/lib/libtomcrypt/sub.mk
/optee_os/core/lib/scmi-server/sub.mk
/optee_os/core/mm/core_mmu.c
/optee_os/core/tee/tee_svc_cryp.c
/optee_os/ldelf/ta_elf.c
/optee_os/lib/libutee/tee_api_operations.c
/optee_os/lib/libutils/ext/include/util.h
/optee_os/mk/config.mk
6376023b10-Apr-2024 Alvin Chang <alvinga@andestech.com>

riscv: plat-virt: Enable CFG_HWRNG_PTA

Enable CFG_HWRNG_PTA with the implementation of the RISC-V
Zkr driver which provides the hardware entropy source.

Signed-off-by: Alvin Chang <alvinga@andestec

riscv: plat-virt: Enable CFG_HWRNG_PTA

Enable CFG_HWRNG_PTA with the implementation of the RISC-V
Zkr driver which provides the hardware entropy source.

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

show more ...

e10bcf3b07-Apr-2024 Alvin Chang <alvinga@andestech.com>

core: riscv: Add seed CSR detection helper

Any attempted access to unimplemented or restricted CSRs will
raise an illegal instruction, so we can set up a temporary
trap handler to validate if the us

core: riscv: Add seed CSR detection helper

Any attempted access to unimplemented or restricted CSRs will
raise an illegal instruction, so we can set up a temporary
trap handler to validate if the use of CSRs is allowed in
the privileged mode where OP-TEE OS is running. Add a helper
for this specific purpose.

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

show more ...


/optee_os/.github/workflows/ci.yml
/optee_os/CHANGELOG.md
/optee_os/core/arch/arm/dts/stm32mp251.dtsi
/optee_os/core/arch/arm/include/kernel/thread_spmc.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/thread_spmc.c
/optee_os/core/arch/arm/plat-sam/conf.mk
/optee_os/core/arch/arm/plat-sam/platform_sama5d2.c
/optee_os/core/arch/arm/plat-sam/platform_sama7g5.c
/optee_os/core/arch/arm/plat-sam/sub.mk
/optee_os/core/arch/arm/plat-stm32mp2/conf.mk
/optee_os/core/arch/arm/plat-vexpress/conf.mk
include/riscv.h
kernel/csr_detect.S
kernel/sub.mk
/optee_os/core/core.mk
/optee_os/core/drivers/atmel_wdt.c
/optee_os/core/drivers/clk/clk.c
/optee_os/core/drivers/clk/sam/sub.mk
/optee_os/core/drivers/crypto/hisilicon/hpre_main.c
/optee_os/core/drivers/crypto/hisilicon/include/hpre_main.h
/optee_os/core/drivers/crypto/hisilicon/sub.mk
/optee_os/core/drivers/crypto/stm32/stm32_cryp.c
/optee_os/core/drivers/firewall/stm32_rifsc.c
/optee_os/core/drivers/regulator/regulator.c
/optee_os/core/drivers/stm32_fmc.c
/optee_os/core/drivers/stm32_hpdma.c
/optee_os/core/drivers/stm32_hsem.c
/optee_os/core/drivers/stm32_i2c.c
/optee_os/core/drivers/stm32_ipcc.c
/optee_os/core/drivers/stm32_rng.c
/optee_os/core/drivers/sub.mk
/optee_os/core/include/drivers/clk.h
/optee_os/core/include/drivers/regulator.h
/optee_os/core/include/drivers/stm32_i2c.h
/optee_os/core/include/drivers/stm32_rif.h
/optee_os/core/include/dt-bindings/firewall/stm32mp25-rif.h
/optee_os/core/include/dt-bindings/firewall/stm32mp25-rifsc.h
/optee_os/core/include/kernel/mutex.h
/optee_os/core/include/kernel/mutex_pm_aware.h
/optee_os/core/include/kernel/notif.h
/optee_os/core/include/kernel/spinlock.h
/optee_os/core/include/kernel/wait_queue.h
/optee_os/core/include/optee_rpc_cmd.h
/optee_os/core/kernel/mutex.c
/optee_os/core/kernel/notif.c
/optee_os/core/kernel/panic.c
/optee_os/core/kernel/user_ta.c
/optee_os/core/kernel/wait_queue.c
/optee_os/mk/config.mk
4c4387dc26-Feb-2024 Alvin Chang <alvinga@andestech.com>

core: riscv: Prepare SATP for each hart

To support multiple harts environment, we have allocated root page table
for each hart. Further more, we need to prepare value of CSR SATP, which
holds the ph

core: riscv: Prepare SATP for each hart

To support multiple harts environment, we have allocated root page table
for each hart. Further more, we need to prepare value of CSR SATP, which
holds the physical page number (PPN) of the root page table, for each
hart.

This commit enlarges the "struct core_mmu_config" for RISC-V
architecture to hold the value of CSR SATP for all the harts. In early
boot stage, each hart should initialize its CSR SATP from "struct
core_mmu_config".

Signed-off-by: Alvin Chang <alvinga@andestech.com>
Reviewed-by: Yu Chien Peter Lin <peterlin@andestech.com>
Reviewed-by: Marouene Boubakri <marouene.boubakri@nxp.com>
Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>

show more ...

fe9a268226-Feb-2024 Alvin Chang <alvinga@andestech.com>

core: riscv: Allocate root page table for each hart

To support multiple hart environment, each hart must have its dedicated
root page table. This commit enlarges the root page table. Also, when
the

core: riscv: Allocate root page table for each hart

To support multiple hart environment, each hart must have its dedicated
root page table. This commit enlarges the root page table. Also, when
the primary hart initializes the page table, we also copy the contents
of its root page table to the secondary harts' root page tables.
Therefore, all the harts have initial page tables at the boot time.

Signed-off-by: Alvin Chang <alvinga@andestech.com>
Reviewed-by: Yu Chien Peter Lin <peterlin@andestech.com>
Reviewed-by: Marouene Boubakri <marouene.boubakri@nxp.com>
Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>

show more ...

1cf7e98d14-Mar-2024 Jens Wiklander <jens.wiklander@linaro.org>

core: replace REGISTER_TIME_SOURCE()

Remove REGISTER_TIME_SOURCE() and implement tee_time_get_sys_time() and
tee_time_get_sys_time_protection_level() directly in the file where
REGISTER_TIME_SOURCE(

core: replace REGISTER_TIME_SOURCE()

Remove REGISTER_TIME_SOURCE() and implement tee_time_get_sys_time() and
tee_time_get_sys_time_protection_level() directly in the file where
REGISTER_TIME_SOURCE() was used previously.

By avoiding indirect calls the linker can optimize the dependency tree
properly and we can remove the DECLARE_KEEP_PAGER() directive needed for
arm_cntpct_time_source.

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>

show more ...

63bfec5e02-Mar-2024 Alvin Chang <alvinga@andestech.com>

core: riscv: Apply SM-based boot flow for secondary harts

When the system adopts M-mode secure monitor based solution, the
secondary harts need to hand over the control back to the secure
monitor af

core: riscv: Apply SM-based boot flow for secondary harts

When the system adopts M-mode secure monitor based solution, the
secondary harts need to hand over the control back to the secure
monitor after the initial boot sequence. Add related code for this
purpose.

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

show more ...

058cf71210-Nov-2023 Alvin Chang <alvinga@andestech.com>

core: riscv: Do not restrict primary hart to hart ID 0 only

The ID of primary hart should not be restricted to zero. Thus,
determining primary hart and secondart harts by zero hart ID is not
feasibl

core: riscv: Do not restrict primary hart to hart ID 0 only

The ID of primary hart should not be restricted to zero. Thus,
determining primary hart and secondart harts by zero hart ID is not
feasible.

We refer to RISC-V linux kernel [1] to fix this issue, by adding a
"hart_lottery" variable. The first hart who enters OP-TEE will win the
lottery, atomically increment this variable, and be the primary hart.
Other harts enter OP-TEE later won't win the lottery, so they execute
the secondary boot sequence.

[1]:
https://github.com/torvalds/linux/blob/v6.7/arch/riscv/kernel/head.S#L244

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

show more ...

1706a28423-Jan-2024 Alvin Chang <alvinga@andestech.com>

core: riscv: Change the condition of communication with untrusted domain

Use CFG_RISCV_WITH_M_MODE_SM to determine if OP-TEE uses M-mode secure
monitor based solution to communicate with the untruse

core: riscv: Change the condition of communication with untrusted domain

Use CFG_RISCV_WITH_M_MODE_SM to determine if OP-TEE uses M-mode secure
monitor based solution to communicate with the untrusetd domain.

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

show more ...

83abc78423-Jan-2024 Alvin Chang <alvinga@andestech.com>

riscv: plat-virt: Set CFG_RISCV_WITH_M_MODE_SM as 'y'

In RISC-V QEMU virtual platform, OP-TEE OS uses M-mode secure monitor
based solution to communicate with the untrusted domain. Therefore, set
CF

riscv: plat-virt: Set CFG_RISCV_WITH_M_MODE_SM as 'y'

In RISC-V QEMU virtual platform, OP-TEE OS uses M-mode secure monitor
based solution to communicate with the untrusted domain. Therefore, set
CFG_RISCV_WITH_M_MODE_SM to 'y' in its configuration file.

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

show more ...

a30b448623-Jan-2024 Alvin Chang <alvinga@andestech.com>

core: riscv: Add CFG_RISCV_WITH_M_MODE_SM and dependency checking

OP-TEE may communicate with the untrusted domain by different solutions,
such as M-mode secure monitor based solution, or direct mes

core: riscv: Add CFG_RISCV_WITH_M_MODE_SM and dependency checking

OP-TEE may communicate with the untrusted domain by different solutions,
such as M-mode secure monitor based solution, or direct messaging based
solution. This commit adds CFG_RISCV_WITH_M_MODE_SM to indicate that
OP-TEE uses M-mode secure monitor based solution for the communication.

The CFG_RISCV_WITH_M_MODE_SM should depend on CFG_RISCV_S_MODE and
CFG_RISCV_SBI, since we are using "ecall" to trap into M-mode secure
monitor.

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

show more ...

ea11f51223-Oct-2023 Alvin Chang <alvinga@andestech.com>

core: riscv: Apply mask/unmask exceptions when operating page table

Add missing thread_{mask/unmask}_exceptions() when we operate the page
table. This is referenced from ARM architecture.

Signed-of

core: riscv: Apply mask/unmask exceptions when operating page table

Add missing thread_{mask/unmask}_exceptions() when we operate the page
table. This is referenced from ARM architecture.

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

show more ...

d1d1ca2323-Oct-2023 Alvin Chang <alvinga@andestech.com>

core: riscv: Apply STATUS helper for RPC resume

Since RPC resume is a kind of exception return, we invoke
xstatus_for_xret() to prepare the CSR STATUS for exception return. But
the actual value of S

core: riscv: Apply STATUS helper for RPC resume

Since RPC resume is a kind of exception return, we invoke
xstatus_for_xret() to prepare the CSR STATUS for exception return. But
the actual value of STATUS when calling thread_rpc() is still saved in
stack. This is to unify the behavior between RPC suspend and resume.

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

show more ...

de45f2fb23-Oct-2023 Alvin Chang <alvinga@andestech.com>

core: riscv: Apply exception return to handle_user_mode_panic()

Now thread_exit_user_mode() executes exception return to kernel mode.
Invoke xstatus_for_xret() helper function to prepare CSR STATUS

core: riscv: Apply exception return to handle_user_mode_panic()

Now thread_exit_user_mode() executes exception return to kernel mode.
Invoke xstatus_for_xret() helper function to prepare CSR STATUS for
exception return.

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

show more ...

4fe3a3f723-Oct-2023 Alvin Chang <alvinga@andestech.com>

core: riscv: Refine thread trap handler

In order to support SMP, we made change on CSR SCRATCH from kernel stack
pointer to be kernel TP(thread_core_local). So that we can get TP from
SCRATCH easily

core: riscv: Refine thread trap handler

In order to support SMP, we made change on CSR SCRATCH from kernel stack
pointer to be kernel TP(thread_core_local). So that we can get TP from
SCRATCH easily in trap handler when the thread is in user mode. We also
save/restore CSR IE, kernel GP and SP so that we can handle task
migration to another hart.

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

show more ...

b5bb30b323-Oct-2023 Alvin Chang <alvinga@andestech.com>

core: riscv: Refine thread enter/exit user mode

Now when thread is in user mode, the kernel TP is saved into CSR SCRATCH
instead of into kernel stack. The IE is also considered since it
contains mas

core: riscv: Refine thread enter/exit user mode

Now when thread is in user mode, the kernel TP is saved into CSR SCRATCH
instead of into kernel stack. The IE is also considered since it
contains masks of different exceptions.

Apply exception return to thread_exit_user_mode() to let hart correctly
back to kernel mode from exception.

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

show more ...

09653bca23-Oct-2023 Alvin Chang <alvinga@andestech.com>

core: riscv: Apply exception return to resume thread

In current implementation, the thread is resumed by function return. It
is not suitable for all scenarios, especially when the thread should be
r

core: riscv: Apply exception return to resume thread

In current implementation, the thread is resumed by function return. It
is not suitable for all scenarios, especially when the thread should be
resumed to user mode. The kernel mode can not return to user mode by
pure function return.

This commit applies exception return to resume the thread. The EPC and
IE are added into thread context. The xstatus_for_xret() helper function
is added to prepare the value of CSR STATUS for exception return.
Currently we only consider PIE(previous interrupt-enable) and
PP(previous privilege mode) for exception return.

We clear thread context when the context is reinitialized, enable native
interrupt, and setup kernel GP/TP. The thread_resume() now takes care of
restoring CSR EPC, STATUS, IE, SCRATCH and all general-purpose
registers. Finally it executes exception return to target privilege mode
encoded in CSR STATUS. The registers GP and TP are also restored since
user mode may use them.

This commit also modify the usage of CSR SCRATCH. In current
implementation the SCRATCH is used to save kernel stack pointer when the
thread is in user mode. The value of TP, which stores thread_core_local
structure, is saved into kernel stack before entering user mode. The
trap handler can then get TP(thread_core_local) from kernel stack. This
is not suitable for SMP system, since the thread might be resumed to
another core, and that core gets wrong TP from kernel stack. Fix it by
directly storing TP into CSR SCRATCH.

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

show more ...

1234567891011