History log of /optee_os/core/arch/riscv/ (Results 151 – 175 of 268)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
fbe66cf816-Oct-2023 Etienne Carriere <etienne.carriere@foss.st.com>

core: fix header file guard names

Fixes header file guards macro name prefix (mostly missing occurrences)
that should reflect the file base directory sub-path where applicable.

Reviewed-by: Jens Wi

core: fix header file guard names

Fixes header file guards macro name prefix (mostly missing occurrences)
that should reflect the file base directory sub-path where applicable.

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

show more ...


/optee_os/CHANGELOG.md
/optee_os/Makefile
/optee_os/core/arch/arm/include/crypto/ghash-ce-core.h
/optee_os/core/arch/arm/include/kernel/tee_l2cc_mutex.h
/optee_os/core/arch/arm/include/kernel/tlb_helpers.h
/optee_os/core/arch/arm/include/kernel/tz_proc_def.h
/optee_os/core/arch/arm/include/kernel/tz_ssvce_def.h
/optee_os/core/arch/arm/include/kernel/tz_ssvce_pl310.h
/optee_os/core/arch/arm/include/mm/core_mmu_arch.h
/optee_os/core/arch/arm/include/scmi/scmi_server.h
/optee_os/core/arch/arm/include/sm/optee_smc.h
/optee_os/core/arch/arm/include/sm/psci.h
/optee_os/core/arch/arm/include/sm/std_smc.h
/optee_os/core/arch/arm/include/sm/teesmc_opteed.h
/optee_os/core/arch/arm/include/sm/teesmc_opteed_macros.h
/optee_os/core/arch/arm/kernel/link_dummies_paged.c
/optee_os/core/arch/arm/kernel/thread_spmc.c
/optee_os/core/arch/arm/plat-imx/main.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-stm32mp1/drivers/stm32mp1_pmic.h
/optee_os/core/arch/arm/plat-stm32mp1/drivers/stm32mp1_pwr.c
/optee_os/core/arch/arm/plat-stm32mp1/drivers/stm32mp1_pwr.h
/optee_os/core/arch/arm/plat-stm32mp1/scmi_server.c
include/kernel/tee_l2cc_mutex.h
include/kernel/tlb_helpers.h
include/mm/core_mmu_arch.h
include/tee/optee_abi.h
include/tee/teeabi_opteed.h
include/tee/teeabi_opteed_macros.h
/optee_os/core/drivers/crypto/caam/caam_sm.c
/optee_os/core/drivers/crypto/stm32/cipher.c
/optee_os/core/drivers/regulator/regulator_dt.c
/optee_os/core/drivers/regulator/stm32_vrefbuf.c
/optee_os/core/drivers/regulator/sub.mk
/optee_os/core/drivers/stpmic1.c
/optee_os/core/include/crypto/crypto_se.h
/optee_os/core/include/drivers/amlogic_uart.h
/optee_os/core/include/drivers/atmel_uart.h
/optee_os/core/include/drivers/bcm/bnxt.h
/optee_os/core/include/drivers/bcm_gpio.h
/optee_os/core/include/drivers/bcm_hwrng.h
/optee_os/core/include/drivers/bcm_sotp.h
/optee_os/core/include/drivers/caam_extension.h
/optee_os/core/include/drivers/cdns_uart.h
/optee_os/core/include/drivers/hi16xx_uart.h
/optee_os/core/include/drivers/imx/dcp.h
/optee_os/core/include/drivers/imx_ocotp.h
/optee_os/core/include/drivers/imx_uart.h
/optee_os/core/include/drivers/imx_wdog.h
/optee_os/core/include/drivers/lpc_uart.h
/optee_os/core/include/drivers/mvebu_uart.h
/optee_os/core/include/drivers/ns16550.h
/optee_os/core/include/drivers/pl011.h
/optee_os/core/include/drivers/pl022_spi.h
/optee_os/core/include/drivers/pl061_gpio.h
/optee_os/core/include/drivers/regulator.h
/optee_os/core/include/drivers/sam/at91_ddr.h
/optee_os/core/include/drivers/scif.h
/optee_os/core/include/drivers/scmi-msg.h
/optee_os/core/include/drivers/scmi.h
/optee_os/core/include/drivers/serial8250_uart.h
/optee_os/core/include/drivers/sp805_wdt.h
/optee_os/core/include/drivers/sprd_uart.h
/optee_os/core/include/drivers/stih_asc.h
/optee_os/core/include/drivers/stm32_bsec.h
/optee_os/core/include/drivers/stm32_etzpc.h
/optee_os/core/include/drivers/stm32_vrefbuf.h
/optee_os/core/include/drivers/stm32mp_dt_bindings.h
/optee_os/core/include/drivers/stpmic1.h
/optee_os/core/include/kernel/chip_services.h
/optee_os/core/include/kernel/dt_driver.h
/optee_os/core/include/kernel/rpc_io_i2c.h
/optee_os/core/include/kernel/tee_common.h
/optee_os/core/include/kernel/tee_common_otp.h
/optee_os/core/include/kernel/tee_misc.h
/optee_os/core/include/kernel/tee_ta_manager.h
/optee_os/core/include/kernel/tee_time.h
/optee_os/core/include/kernel/time_source.h
/optee_os/core/include/kernel/timer.h
/optee_os/core/include/kernel/trace_ta.h
/optee_os/core/include/kernel/user_ta.h
/optee_os/core/include/mm/core_memprot.h
/optee_os/core/include/mm/core_mmu.h
/optee_os/core/include/mm/mobj.h
/optee_os/core/include/mm/tee_mm.h
/optee_os/core/include/mm/tee_mmu_types.h
/optee_os/core/include/mm/vm.h
/optee_os/core/include/ta_pub_key.h
/optee_os/core/include/tee/svc_cache.h
/optee_os/core/include/tee/tee_cryp_concat_kdf.h
/optee_os/core/include/tee/tee_cryp_hkdf.h
/optee_os/core/include/tee/tee_cryp_pbkdf2.h
/optee_os/core/include/tee/tee_cryp_utl.h
/optee_os/core/include/tee/tee_fs.h
/optee_os/core/include/tee/tee_fs_key_manager.h
/optee_os/core/include/tee/tee_fs_rpc.h
/optee_os/core/include/tee/tee_obj.h
/optee_os/core/include/tee/tee_pobj.h
/optee_os/core/include/tee/tee_supp_plugin_rpc.h
/optee_os/core/include/tee/tee_svc.h
/optee_os/core/include/tee/tee_svc_cryp.h
/optee_os/core/include/tee/tee_svc_storage.h
/optee_os/core/include/tee/tee_ta_enc_manager.h
/optee_os/core/kernel/pseudo_ta.c
/optee_os/core/kernel/tee_ta_manager.c
/optee_os/core/kernel/user_ta.c
/optee_os/core/mm/mobj.c
/optee_os/core/mm/vm.c
/optee_os/core/tee/tee_svc.c
/optee_os/ldelf/ta_elf.c
/optee_os/lib/libutils/ext/ftrace/ftrace.c
/optee_os/mk/checkconf.mk
/optee_os/mk/config.mk
/optee_os/mk/macros.mk
/optee_os/scripts/ts_bin_to_c.py
/optee_os/ta/arch/arm/ta.ld.S
/optee_os/ta/link.mk
/optee_os/ta/mk/ta_dev_kit.mk
/optee_os/ta/ta.mk
ed89e93911-Oct-2023 Alvin Chang <alvinga@andestech.com>

core: riscv: Fix logic of thread_{get/set}_exceptions()

In ARM, the bits in DAIF register are used to mask the interrupts. While
in RISC-V, the bits in CSR XIE are used to enable(unmask) correspondi

core: riscv: Fix logic of thread_{get/set}_exceptions()

In ARM, the bits in DAIF register are used to mask the interrupts. While
in RISC-V, the bits in CSR XIE are used to enable(unmask) corresponding
interrupt sources.

To not modify the function of thread_get_exceptions(), we invert the
bits after reading the value of CSR XIE, as mask.

To not modify the function of thread_set_exceptions(), we invert the
bits in given "exceptions" before writing "exceptions" into CSR
XIE. Therefore, the intended masked exception bits will be cleared
when we write the final value into CSR XIE to mask those interrupts.

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

show more ...

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

core: riscv: Register thread_vector_table in primary CPU initialization

When primary CPU has initialized everything, it registers the address
of thread_vector_table into higher privileged software v

core: riscv: Register thread_vector_table in primary CPU initialization

When primary CPU has initialized everything, it registers the address
of thread_vector_table into higher privileged software via a1 register.

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

show more ...

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

core: riscv: Implement thread_vector_table for ABI and FIQ entries

Implement thread_vector_table which only includes entries for standard
ABI, fast ABI, and foreign interrupts. Most of code is refer

core: riscv: Implement thread_vector_table for ABI and FIQ entries

Implement thread_vector_table which only includes entries for standard
ABI, fast ABI, and foreign interrupts. Most of code is referenced from
ARM architecture. The thread_vector_table will be registered into higher
privileged software, such as M-mode firmware. The higher privileged
software can jump(mret) to OP-TEE based on this vector table.

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

show more ...

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

core: riscv: Implement SBI based protocol

Rename thread_return_from_nsec_call() to thread_return_to_ree() for more
general behavior, since TEE might not only be called by REE, but also
do something

core: riscv: Implement SBI based protocol

Rename thread_return_from_nsec_call() to thread_return_to_ree() for more
general behavior, since TEE might not only be called by REE, but also
do something on its own initiative (e.g., handle secure interrupts).

This commit also implements SBI based protocol used to return control to
REE. The register a7 encodes SBI TEE extension ID, which is temporarily
defined here. We may have ratified SBI TEE extension in the future and
we can apply ratified ID at that time. The register a6 is unused and
encoded as 0. The returned arguments are encoded into registers a0~a5
and should be provided by the caller.

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

show more ...

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

core: riscv: Implement panic_at_abi_return as guard of ABI call

The ABI call to REE domain should not return. We implement
panic_at_abi_return macro as guard of ABI call. When the ABI call return
il

core: riscv: Implement panic_at_abi_return as guard of ABI call

The ABI call to REE domain should not return. We implement
panic_at_abi_return macro as guard of ABI call. When the ABI call return
illegally, the system will enter panic or an infinite loop.

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

show more ...


/optee_os/.github/workflows/ci.yml
/optee_os/core/arch/arm/include/ffa.h
/optee_os/core/arch/arm/include/kernel/thread_arch.h
/optee_os/core/arch/arm/include/optee_ffa.h
/optee_os/core/arch/arm/kernel/asm-defines.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/kernel/thread_spmc_a64.S
/optee_os/core/arch/arm/mm/mobj_ffa.c
/optee_os/core/arch/arm/plat-imx/conf.mk
/optee_os/core/arch/arm/plat-k3/drivers/sa2ul.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-stm32mp1/drivers/stm32mp1_pmic.h
/optee_os/core/arch/arm/plat-stm32mp1/shared_resources.c
/optee_os/core/arch/arm/plat-stm32mp1/stm32_util.h
include/kernel/thread_private_arch.h
include/riscv_macros.S
kernel/thread_arch.c
/optee_os/core/crypto.mk
/optee_os/core/drivers/atmel_saic.c
/optee_os/core/drivers/crypto/caam/crypto.mk
/optee_os/core/drivers/crypto/caam/hal/sub.mk
/optee_os/core/drivers/gic.c
/optee_os/core/drivers/hfic.c
/optee_os/core/drivers/imx/mu/sub.mk
/optee_os/core/drivers/ns16550.c
/optee_os/core/drivers/plic.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/sub.mk
/optee_os/core/drivers/stm32_gpio.c
/optee_os/core/drivers/stm32_i2c.c
/optee_os/core/include/drivers/ns16550.h
/optee_os/core/include/drivers/regulator.h
/optee_os/core/include/drivers/stm32_i2c.h
/optee_os/core/include/kernel/interrupt.h
/optee_os/core/kernel/interrupt.c
/optee_os/core/lib/libtomcrypt/mpi_desc.c
/optee_os/core/lib/libtomcrypt/rsa.c
/optee_os/core/lib/libtomcrypt/src/hashes/sha2/sub.mk
/optee_os/core/lib/libtomcrypt/src/hashes/sub.mk
/optee_os/core/lib/libtomcrypt/sub.mk
/optee_os/core/lib/libtomcrypt/tomcrypt.c
/optee_os/core/pta/imx/dek_blob.c
/optee_os/lib/libmbedtls/core/aes.c
/optee_os/lib/libmbedtls/core/dh.c
/optee_os/lib/libmbedtls/core/ecc.c
/optee_os/lib/libmbedtls/core/hash.c
/optee_os/lib/libmbedtls/core/hmac.c
/optee_os/lib/libmbedtls/core/mbed_helpers.h
/optee_os/lib/libmbedtls/core/rsa.c
/optee_os/lib/libmbedtls/core/sub.mk
/optee_os/lib/libmbedtls/include/mbedtls_config_kernel.h
/optee_os/lib/libmbedtls/mbedtls/.gitattributes
/optee_os/lib/libmbedtls/mbedtls/.uncrustify.cfg
/optee_os/lib/libmbedtls/mbedtls/CONTRIBUTING.md
/optee_os/lib/libmbedtls/mbedtls/ChangeLog
/optee_os/lib/libmbedtls/mbedtls/README.md
/optee_os/lib/libmbedtls/mbedtls/SECURITY.md
/optee_os/lib/libmbedtls/mbedtls/SUPPORT.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/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_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/legacy_or_psa.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/lms.h
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/mbedtls_config.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/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/crypto.h
/optee_os/lib/libmbedtls/mbedtls/include/psa/crypto_builtin_composites.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_primitives.h
/optee_os/lib/libmbedtls/mbedtls/include/psa/crypto_extra.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/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/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_internal.h
/optee_os/lib/libmbedtls/mbedtls/library/constant_time_invasive.h
/optee_os/lib/libmbedtls/mbedtls/library/ctr_drbg.c
/optee_os/lib/libmbedtls/mbedtls/library/debug.c
/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_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/hash_info.c
/optee_os/lib/libmbedtls/mbedtls/library/hash_info.h
/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_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_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/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/sha1.c
/optee_os/lib/libmbedtls/mbedtls/library/sha256.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_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/x509write_crt.c
/optee_os/lib/libmbedtls/mbedtls/library/x509write_csr.c
/optee_os/lib/libmbedtls/sub.mk
/optee_os/lib/libutee/include/pta_imx_dek_blob.h
/optee_os/lib/libutee/sub.mk
/optee_os/lib/libutee/tee_api_arith_mpi.c
/optee_os/lib/libutils/ext/include/fault_mitigation.h
/optee_os/mk/config.mk
/optee_os/ta/pkcs11/src/pkcs11_attributes.c
69a443d004-Oct-2023 Alvin Chang <alvinga@andestech.com>

core: riscv: Fix condition of is_from_user()

RISC-V defines that xPP(previous privilege mode) field of CSR status
indicates the previous privilege level prior to the trap. Since the
encoding of user

core: riscv: Fix condition of is_from_user()

RISC-V defines that xPP(previous privilege mode) field of CSR status
indicates the previous privilege level prior to the trap. Since the
encoding of user mode is 0, we should compare the xPP field with 0 here
to know that the trap is from user mode.

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

show more ...

9478318b26-Sep-2023 Alvin Chang <alvinga@andestech.com>

riscv: plat-virt: Align PLIC configurations with QEMU v8.1.1

Align the PLIC configurations with RISC-V QEMU virtual platform based on
official QEMU v8.1.1 tag. The maximum size of PLIC should be 0x6

riscv: plat-virt: Align PLIC configurations with QEMU v8.1.1

Align the PLIC configurations with RISC-V QEMU virtual platform based on
official QEMU v8.1.1 tag. The maximum size of PLIC should be 0x600000,
and the number of interrupt sources should be 95.

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

show more ...

f33bc3ef26-Sep-2023 Alvin Chang <alvinga@andestech.com>

drivers: plic: Maintain controller data in driver source file

To align the design from other architecture, we move the interrupt
controller data instance from platform source file to driver source
f

drivers: plic: Maintain controller data in driver source file

To align the design from other architecture, we move the interrupt
controller data instance from platform source file to driver source
file. With this change, the PLIC initialization functions no more get
the controller data as input argument. Platforms do not need to care
about the interrupt controller data instance.

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

show more ...


/optee_os/MAINTAINERS
/optee_os/core/arch/arm/include/kernel/secure_partition.h
/optee_os/core/arch/arm/include/kernel/thread_arch.h
/optee_os/core/arch/arm/include/sm/watchdog_smc.h
/optee_os/core/arch/arm/kernel/secure_partition.c
/optee_os/core/arch/arm/plat-imx/conf.mk
/optee_os/core/arch/arm/plat-imx/imx-regs.h
/optee_os/core/arch/arm/plat-imx/imx.h
/optee_os/core/arch/arm/plat-imx/registers/imx6.h
/optee_os/core/arch/arm/plat-imx/registers/imx7.h
/optee_os/core/arch/arm/plat-imx/sub.mk
/optee_os/core/arch/arm/plat-ls/conf.mk
/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-stm32mp1/conf.mk
/optee_os/core/arch/arm/tee/entry_fast.c
plat-virt/main.c
/optee_os/core/drivers/imx_csu.c
/optee_os/core/drivers/imx_snvs.c
/optee_os/core/drivers/plic.c
/optee_os/core/drivers/pm/imx/gpcv2.c
/optee_os/core/drivers/pm/imx/local.h
/optee_os/core/drivers/pm/imx/psci.c
/optee_os/core/drivers/pm/imx/src.c
/optee_os/core/drivers/pm/imx/sub.mk
/optee_os/core/drivers/pm/sub.mk
/optee_os/core/drivers/regulator/regulator.c
/optee_os/core/drivers/regulator/regulator_dt.c
/optee_os/core/drivers/regulator/sub.mk
/optee_os/core/drivers/sub.mk
/optee_os/core/drivers/wdt/watchdog_sm.c
/optee_os/core/include/drivers/imx_snvs.h
/optee_os/core/include/drivers/plic.h
/optee_os/core/include/drivers/regulator.h
/optee_os/core/include/io.h
/optee_os/core/include/kernel/dt_driver.h
/optee_os/core/include/kernel/nv_counter.h
/optee_os/core/include/tee/fs_dirfile.h
/optee_os/core/include/tee/fs_htree.h
/optee_os/core/kernel/dt_driver.c
/optee_os/core/kernel/nv_counter.c
/optee_os/core/kernel/sub.mk
/optee_os/core/mm/core_mmu.c
/optee_os/core/pta/stats.c
/optee_os/core/pta/tests/fs_htree.c
/optee_os/core/tee/fs_dirfile.c
/optee_os/core/tee/fs_htree.c
/optee_os/core/tee/tee_ree_fs.c
/optee_os/lib/libutils/ext/include/fault_mitigation.h
/optee_os/mk/config.mk
/optee_os/scripts/sign_rproc_fw.py
57b2148930-Aug-2023 Marouene Boubakri <marouene.boubakri@nxp.com>

core: riscv: tee: add entry_fast.c

This commit adds an implementation of fast call handers. It copies
the original implementation replacing thread_smc_args structures
with thread_abi_args counterpar

core: riscv: tee: add entry_fast.c

This commit adds an implementation of fast call handers. It copies
the original implementation replacing thread_smc_args structures
with thread_abi_args counterparts. tee_entry_fastcall_l2cc_mutex()
has been modified to return OPTEE_ABI_RETURN_UNKNOWN_FUNCTION.

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

show more ...

5cc48b1529-Aug-2023 Marouene Boubakri <marouene.boubakri@nxp.com>

core: riscv: add thread_optee_abi.c

This commit just copies thread_optee_smc.c from ARM and renames
smc/SMC to abi/ABI.

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

core: riscv: add thread_optee_abi.c

This commit just copies thread_optee_smc.c from ARM and renames
smc/SMC to abi/ABI.

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

show more ...

55dd28e829-Aug-2023 Marouene Boubakri <marouene.boubakri@nxp.com>

core: riscv: include: add tee/teeabi_opteed_macros.h

This commit just copies teesmc_opteed_macros.h from ARM and renames
smc/SMC to abi/ABI.
All unused and ARM-related macros are removed.

Signed-of

core: riscv: include: add tee/teeabi_opteed_macros.h

This commit just copies teesmc_opteed_macros.h from ARM and renames
smc/SMC to abi/ABI.
All unused and ARM-related macros are removed.

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

show more ...

14812c6629-Aug-2023 Marouene Boubakri <marouene.boubakri@nxp.com>

core: riscv: include: add tee/teeabi_opteed.h

This commit just copies teesmc_opteed.h from ARM and renames
smc/SMC to abi/ABI.

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

core: riscv: include: add tee/teeabi_opteed.h

This commit just copies teesmc_opteed.h from ARM and renames
smc/SMC to abi/ABI.

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

show more ...

21c10a5229-Aug-2023 Marouene Boubakri <marouene.boubakri@nxp.com>

core: riscv: include: add tee/optee_abi.h

This commit just copies optee_smc.h from ARM and renames
smc/SMC to abi/ABI.

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

core: riscv: include: add tee/optee_abi.h

This commit just copies optee_smc.h from ARM and renames
smc/SMC to abi/ABI.

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

show more ...

a12b98e329-Aug-2023 Marouene Boubakri <marouene.boubakri@nxp.com>

core: riscv: include: add tee/entry_fast.h

This commit just copies entry_fast.h from ARM and renames
thread_smc_args to thread_abi_args.

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

core: riscv: include: add tee/entry_fast.h

This commit just copies entry_fast.h from ARM and renames
thread_smc_args to thread_abi_args.

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

show more ...

a2efa71b29-Aug-2023 Marouene Boubakri <marouene.boubakri@nxp.com>

core: riscv: move TEE ABI handlers from thread_rv.S to thread_optee_abi_rv.S

This commits moves the following functions from thread_rv.S to a separate
file thread_optee_abi_rv.S:

- thread_return_fr

core: riscv: move TEE ABI handlers from thread_rv.S to thread_optee_abi_rv.S

This commits moves the following functions from thread_rv.S to a separate
file thread_optee_abi_rv.S:

- thread_return_from_nsec_call()
- thread_std_smc_entry() -> renamed to thread_std_abi_entry()
- thread_rpc()

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

show more ...

3f1a58ff29-Aug-2023 Marouene Boubakri <marouene.boubakri@nxp.com>

core: riscv: thread_arch.c: Use of ABI structure instead of SMC structure

SMC is an ARM-related keyword, make use thread_std_abi_entry instead of
thread_std_smc_entry.

Signed-off-by: Marouene Bouba

core: riscv: thread_arch.c: Use of ABI structure instead of SMC structure

SMC is an ARM-related keyword, make use thread_std_abi_entry instead of
thread_std_smc_entry.

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

show more ...

b0f61f0c29-Aug-2023 Marouene Boubakri <marouene.boubakri@nxp.com>

core: riscv: thread_private_arch.h: add std and fast calls prototypes

This commit adds the following prototypes to thread_private_arch.h:
- thread_std_abi_entry()
- __thread_std_abi_entry()
- thread

core: riscv: thread_private_arch.h: add std and fast calls prototypes

This commit adds the following prototypes to thread_private_arch.h:
- thread_std_abi_entry()
- __thread_std_abi_entry()
- thread_handle_fast_abi()
- thread_handle_std_abi()

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

show more ...

4d94177429-Aug-2023 Marouene Boubakri <marouene.boubakri@nxp.com>

core: riscv: thread_arch.h: rename thread_smc_args to thread_abi_args

SMC is an ARM-related keyword referring to Secure Monitor Call.
This commit renames thread_smc_args to thread_abi_args in
thread

core: riscv: thread_arch.h: rename thread_smc_args to thread_abi_args

SMC is an ARM-related keyword referring to Secure Monitor Call.
This commit renames thread_smc_args to thread_abi_args in
thread_arch.h and keeps the same members to guarantee compatibility
with the existing secure and non-secure domain communication protocol.

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

show more ...


/optee_os/MAINTAINERS
/optee_os/core/arch/arm/arm.mk
/optee_os/core/arch/arm/include/arm.h
/optee_os/core/arch/arm/include/arm64.h
/optee_os/core/arch/arm/kernel/boot.c
/optee_os/core/arch/arm/kernel/entry_a64.S
/optee_os/core/arch/arm/kernel/link_dummies_paged.c
/optee_os/core/arch/arm/kernel/secure_partition.c
/optee_os/core/arch/arm/kernel/spmc_sp_handler.c
/optee_os/core/arch/arm/plat-imx/registers/imx8m.h
/optee_os/core/arch/arm/plat-k3/conf.mk
/optee_os/core/arch/arm/plat-zynqmp/platform_config.h
include/kernel/thread_arch.h
/optee_os/core/drivers/clk/clk_dt.c
/optee_os/core/drivers/crypto/caam/blob/caam_dek.c
/optee_os/core/drivers/crypto/caam/blob/sub.mk
/optee_os/core/drivers/crypto/caam/caam_ctrl.c
/optee_os/core/drivers/crypto/caam/caam_sm.c
/optee_os/core/drivers/crypto/caam/crypto.mk
/optee_os/core/drivers/crypto/caam/hal/common/hal_ctrl.c
/optee_os/core/drivers/crypto/caam/hal/common/hal_sm.c
/optee_os/core/drivers/crypto/caam/hal/common/registers/sm_regs.h
/optee_os/core/drivers/crypto/caam/hal/common/sub.mk
/optee_os/core/drivers/crypto/caam/hal/imx_8m/registers/ctrl_regs.h
/optee_os/core/drivers/crypto/caam/include/caam_desc_defines.h
/optee_os/core/drivers/crypto/caam/include/caam_desc_helper.h
/optee_os/core/drivers/crypto/caam/include/caam_hal_ctrl.h
/optee_os/core/drivers/crypto/caam/include/caam_hal_sm.h
/optee_os/core/drivers/crypto/caam/include/caam_sm.h
/optee_os/core/drivers/crypto/caam/include/caam_trace.h
/optee_os/core/drivers/crypto/caam/sub.mk
/optee_os/core/drivers/crypto/caam/utils/utils_dmaobj.c
/optee_os/core/drivers/crypto/stm32/stm32_saes.c
/optee_os/core/drivers/gic.c
/optee_os/core/include/drivers/caam_extension.h
/optee_os/core/include/kernel/boot.h
/optee_os/core/include/kernel/embedded_ts.h
/optee_os/core/include/kernel/tee_ta_manager.h
/optee_os/core/include/kernel/ts_manager.h
/optee_os/core/include/kernel/ts_store.h
/optee_os/core/include/kernel/user_access.h
/optee_os/core/include/mm/core_mmu.h
/optee_os/core/include/tee/tadb.h
/optee_os/core/kernel/dt_driver.c
/optee_os/core/kernel/embedded_ts.c
/optee_os/core/kernel/ldelf_loader.c
/optee_os/core/kernel/ldelf_syscalls.c
/optee_os/core/kernel/ree_fs_ta.c
/optee_os/core/kernel/scall.c
/optee_os/core/kernel/secstor_ta.c
/optee_os/core/kernel/tee_ta_manager.c
/optee_os/core/kernel/tpm.c
/optee_os/core/kernel/user_access.c
/optee_os/core/kernel/user_ta.c
/optee_os/core/mm/core_mmu.c
/optee_os/core/mm/vm.c
/optee_os/core/pta/imx/dek_blob.c
/optee_os/core/pta/imx/sub.mk
/optee_os/core/pta/system.c
/optee_os/core/tee/sub.mk
/optee_os/core/tee/tadb.c
/optee_os/core/tee/tee_svc.c
/optee_os/core/tee/tee_svc_cryp.c
/optee_os/core/tee/tee_svc_storage.c
/optee_os/lib/libutee/include/pta_imx_dek_blob.h
/optee_os/lib/libutils/isoc/include/assert.h
/optee_os/mk/config.mk
/optee_os/scripts/sign_rproc_fw.py
/optee_os/ta/pkcs11/include/pkcs11_ta.h
/optee_os/ta/pkcs11/src/attributes.c
/optee_os/ta/pkcs11/src/object.c
/optee_os/ta/pkcs11/src/pkcs11_attributes.c
/optee_os/ta/pkcs11/src/pkcs11_attributes.h
/optee_os/ta/pkcs11/src/pkcs11_helpers.c
/optee_os/ta/pkcs11/src/processing_ec.c
/optee_os/ta/ta.mk
df0be60501-Sep-2023 Alvin Chang <alvinga@andestech.com>

core: riscv: Add definitions of CLINT for platform spike

Add definitions for base address of CLINT, otherwise build failure
occurs for platform spike.

Signed-off-by: Alvin Chang <alvinga@andestech.

core: riscv: Add definitions of CLINT for platform spike

Add definitions for base address of CLINT, otherwise build failure
occurs for platform spike.

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

show more ...

a7c08b0702-Aug-2023 Alvin Chang <alvinga@andestech.com>

riscv: plat-virt: Rename to latest interrupt controller functions

Rename main_init_plic() to boot_primary_init_intc(). Rename
main_secondary_init_plic() to boot_secondary_init_intc(). Also the
inclu

riscv: plat-virt: Rename to latest interrupt controller functions

Rename main_init_plic() to boot_primary_init_intc(). Rename
main_secondary_init_plic() to boot_secondary_init_intc(). Also the
include path of RISC-V PLIC driver header is fixed.

Signed-off-by: Alvin Chang <alvinga@andestech.com>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Marouene Boubakri <marouene.boubakri@nxp.com>

show more ...

c9c3eb4b04-Aug-2023 Alvin Chang <alvinga@andestech.com>

core: riscv: Load register TP from thread_user_mode_rec in trap handler

RISC-V kernel uses TP register to store thread_core_local structure.
When the thread enters user mode, the value of TP is used

core: riscv: Load register TP from thread_user_mode_rec in trap handler

RISC-V kernel uses TP register to store thread_core_local structure.
When the thread enters user mode, the value of TP is used by user mode.
Therefore, when CPU enters trap handler, it needs to restore TP to get
thread_core_local structure. In previous implementation, the value of TP
is saved under kernel SP before entering user mode, and the trap handler
restores TP from that stack location. However, the value of TP has
already been saved into the thread_user_mode_rec structure, which is
also upon kernel SP, before entering user mode. So the value of TP can
be restored just from thread_user_mode_rec, instead of saving into
another location which is under the kernel SP.

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 ...

3db1b3e318-Jul-2023 Alvin Chang <alvinga@andestech.com>

core: riscv: Support Privileged Access Never by CSR status.SUM bit

The SUM (Supervisor User Memory access) bit modifies the privilege with
which S-mode loads and stores the user virtual memory. When

core: riscv: Support Privileged Access Never by CSR status.SUM bit

The SUM (Supervisor User Memory access) bit modifies the privilege with
which S-mode loads and stores the user virtual memory. When SUM bit is
0, S-mode accesses to pages whose U bit of corresponding PTE is set will
fault. When SUM bit is 1, these accesses are permitted.

When CFG_PAN is disabled in RISC-V architecture, the status.SUM bit is
initialized as 1 by default. Therefore all accesses to user pages will
succeed. When CFG_PAN is enabled, the status.SUM bit is initialized as
0, and only set to 1 when kernel needs to access user pages.

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 ...

539cdb8718-Jul-2023 Alvin Chang <alvinga@andestech.com>

core: riscv: Fix thread_rpc() wrong stack usage and CSR value

Since there are four registers to be stored onto stack, we should
preserve up to 32 bytes space on the stack instead of only 16 bytes,
o

core: riscv: Fix thread_rpc() wrong stack usage and CSR value

Since there are four registers to be stored onto stack, we should
preserve up to 32 bytes space on the stack instead of only 16 bytes,
otherwise the stack overflow occurs. The s0 is regarded as frame
pointer. The value of CSR status is also restored before returning from
thread_rpc().

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

show more ...

0aa98cd218-Jul-2023 Alvin Chang <alvinga@andestech.com>

core: riscv: Fix width of status CSR

Since we also support RV64 with 64-bit register width, fix the width of
status CSR by declaring it as "unsigned long" and encoding it by general
bit-wise operati

core: riscv: Fix width of status CSR

Since we also support RV64 with 64-bit register width, fix the width of
status CSR by declaring it as "unsigned long" and encoding it by general
bit-wise operations instead of invoking fixed-width API.

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

show more ...

1234567891011