History log of /optee_os/lib/ (Results 26 – 50 of 877)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
e1abe7d120-Mar-2025 Alvin Chang <alvinga@andestech.com>

libmbedtls: fix typo: CFG_TA_MEBDTLS_UNSAFE_MODEXP

CFG_TA_"MEBDTLS"_UNSAFE_MODEXP is typo. This commit fixes it.

Fixes: cb03400251f9 ("Squashed commit upgrading to mbedtls-3.6.2")
Signed-off-by: Al

libmbedtls: fix typo: CFG_TA_MEBDTLS_UNSAFE_MODEXP

CFG_TA_"MEBDTLS"_UNSAFE_MODEXP is typo. This commit fixes it.

Fixes: cb03400251f9 ("Squashed commit upgrading to mbedtls-3.6.2")
Signed-off-by: Alvin Chang <alvinga@andestech.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>

show more ...

809e074426-Feb-2025 Jens Wiklander <jens.wiklander@linaro.org>

core: mm: add virt_page_alloc()

Add virt_page_alloc() to allocate memory from physical pool and map it
in a virtual address pool.

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-

core: mm: add virt_page_alloc()

Add virt_page_alloc() to allocate memory from physical pool and map it
in a virtual address pool.

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

show more ...

1baf19de26-Feb-2025 Jens Wiklander <jens.wiklander@linaro.org>

core: mm: add phys_mem_alloc_flags()

Add phys_mem_alloc_flags() taking MAF_* flags to control memory
allocation. The new flag MAF_CORE_MEM behaves like
{nex_,}phys_mem_core_alloc(), if the flag is

core: mm: add phys_mem_alloc_flags()

Add phys_mem_alloc_flags() taking MAF_* flags to control memory
allocation. The new flag MAF_CORE_MEM behaves like
{nex_,}phys_mem_core_alloc(), if the flag is absent it becomes
{nex_,}phys_mem_ta_alloc().

The MAF_NEX flag selects Nexus memory.

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

show more ...

b462b68126-Feb-2025 Jens Wiklander <jens.wiklander@linaro.org>

Use malloc flags MAF_* in tee_mm.h

Switch to use the malloc flags MAF_* in tee_mm.h replacing the previous
TEE_MM_POOL_* flags. TEE_MM_POOL_* flags are kept defined using MAF_*
flags to for easier t

Use malloc flags MAF_* in tee_mm.h

Switch to use the malloc flags MAF_* in tee_mm.h replacing the previous
TEE_MM_POOL_* flags. TEE_MM_POOL_* flags are kept defined using MAF_*
flags to for easier transition. The TEE_MM_POOL_* flags can be moved
gradually after this commit.

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

show more ...

3f050aed06-Mar-2025 Jens Wiklander <jens.wiklander@linaro.org>

libutils: asm.S: fix BTI() macro

The BTI() macro conditionally emits assembly instructions or directives
depending on CFG_CORE_BTI and CFG_TA_BTI configuration, but it doesn't
take ldelf into consid

libutils: asm.S: fix BTI() macro

The BTI() macro conditionally emits assembly instructions or directives
depending on CFG_CORE_BTI and CFG_TA_BTI configuration, but it doesn't
take ldelf into consideration. ldelf depends on CFG_CORE_BTI just as
OP-TEE core. Fix this by adding __LDELF__ to the mix.

Fixes: af432c48741c ("libutils: asm.S : Introduce BTI in macros for functions")
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>

show more ...

d3ec432806-Mar-2025 Jens Wiklander <jens.wiklander@linaro.org>

libmbedtls: config: disable long long divisions

Currently on Aarch64, mbedtls uses long long divisions which result in
calls to __udivti3() in libgcc. This is at the moment the only
dependency on li

libmbedtls: config: disable long long divisions

Currently on Aarch64, mbedtls uses long long divisions which result in
calls to __udivti3() in libgcc. This is at the moment the only
dependency on libgcc in mbedtls, so disable the long long divisions by
defining MBEDTLS_NO_UDBL_DIVISION to remove the dependency.

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>

show more ...

7505c35807-Mar-2025 Jerome Forissier <jerome.forissier@linaro.org>

libmbedtls: fix compilation warning with GCC14

GCC 14.2 outputs the following compilation warning:

CC out/arm-plat-imx/ta_arm64-lib/libmbedtls/mbedtls/library/ecp.o
In file included from lib/li

libmbedtls: fix compilation warning with GCC14

GCC 14.2 outputs the following compilation warning:

CC out/arm-plat-imx/ta_arm64-lib/libmbedtls/mbedtls/library/ecp.o
In file included from lib/libmbedtls/mbedtls/library/ctr_drbg.c:13:
In function ‘mbedtls_xor’,
inlined from ‘ctr_drbg_update_internal’ at lib/libmbedtls/mbedtls/library/ctr_drbg.c:372:5:
lib/libmbedtls/mbedtls/library/common.h:245:17: warning: array subscript 48 is outside array bounds of ‘unsigned char[48]’ [-Warray-bounds=]
245 | r[i] = a[i] ^ b[i];
| ~^~~
lib/libmbedtls/mbedtls/library/ctr_drbg.c: In function ‘ctr_drbg_update_internal’:
lib/libmbedtls/mbedtls/library/ctr_drbg.c:335:19: note: at offset 48 into object ‘tmp’ of size 48
335 | unsigned char tmp[MBEDTLS_CTR_DRBG_SEEDLEN];
| ^~~

Fix it by returning early in mbedtls_xor() if the compiler is GCC.
This fix is not in MBed TLS upstream yet but the issue and the fix have
been reported [1].

Link: https://github.com/Mbed-TLS/mbedtls/issues/9003#issuecomment-2108239255 [1]
Reported-by: Sahil Malhotra <sahil.malhotra@nxp.com>
Closes: https://github.com/OP-TEE/optee_os/issues/7295
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Sahil Malhotra <sahil.malhotra@nxp.com>

show more ...


/optee_os/.github/workflows/ci.yml
/optee_os/MAINTAINERS
/optee_os/core/arch/arm/dts/stm32mp135f-dk.dts
/optee_os/core/arch/arm/dts/stm32mp13xc.dtsi
/optee_os/core/arch/arm/dts/stm32mp13xf.dtsi
/optee_os/core/arch/arm/dts/stm32mp15xx-dhcom-som.dtsi
/optee_os/core/arch/arm/dts/stm32mp15xx-dhcor-som.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/include/arm64.h
/optee_os/core/arch/arm/kernel/abort.c
/optee_os/core/arch/arm/kernel/asm-defines.c
/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/link_dummies_paged.c
/optee_os/core/arch/arm/kernel/thread.c
/optee_os/core/arch/arm/kernel/thread_a64.S
/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/core_mmu_lpae.c
/optee_os/core/arch/arm/mm/core_mmu_v7.c
/optee_os/core/arch/arm/plat-imx/conf.mk
/optee_os/core/arch/arm/plat-imx/registers/imx93.h
/optee_os/core/arch/arm/plat-k3/conf.mk
/optee_os/core/arch/arm/plat-k3/main.c
/optee_os/core/arch/arm/plat-rockchip/conf.mk
/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/main.c
/optee_os/core/arch/arm/plat-stm32mp2/conf.mk
/optee_os/core/arch/arm/plat-stm32mp2/main.c
/optee_os/core/arch/arm/plat-versal2/conf.mk
/optee_os/core/arch/riscv/include/riscv.h
/optee_os/core/arch/riscv/kernel/boot.c
/optee_os/core/arch/riscv/kernel/entry.S
/optee_os/core/arch/riscv/mm/core_mmu_arch.c
/optee_os/core/arch/riscv/plat-virt/conf.mk
/optee_os/core/arch/riscv/plat-virt/main.c
/optee_os/core/arch/riscv/plat-virt/platform_config.h
/optee_os/core/drivers/aplic_direct.c
/optee_os/core/drivers/aplic_msi.c
/optee_os/core/drivers/aplic_priv.c
/optee_os/core/drivers/atmel_saic.c
/optee_os/core/drivers/counter/stm32_stgen.c
/optee_os/core/drivers/crypto/ele/crypto.mk
/optee_os/core/drivers/crypto/ele/ele.c
/optee_os/core/drivers/crypto/ele/include/ele.h
/optee_os/core/drivers/crypto/ele/include/memutils.h
/optee_os/core/drivers/crypto/ele/memutils.c
/optee_os/core/drivers/crypto/ele/sub.mk
/optee_os/core/drivers/crypto/stm32/common.h
/optee_os/core/drivers/crypto/stm32/crypto.mk
/optee_os/core/drivers/crypto/stm32/ecc.c
/optee_os/core/drivers/crypto/stm32/hash.c
/optee_os/core/drivers/crypto/stm32/hmac.c
/optee_os/core/drivers/crypto/stm32/stm32_hash.c
/optee_os/core/drivers/crypto/stm32/stm32_hash.h
/optee_os/core/drivers/crypto/stm32/stm32_pka.c
/optee_os/core/drivers/crypto/stm32/stm32_pka.h
/optee_os/core/drivers/crypto/stm32/sub.mk
/optee_os/core/drivers/crypto/sub.mk
/optee_os/core/drivers/dra7_rng.c
/optee_os/core/drivers/firewall/stm32_etzpc.c
/optee_os/core/drivers/firewall/stm32_rifsc.c
/optee_os/core/drivers/firewall/stm32_risab.c
/optee_os/core/drivers/firewall/stm32_risaf.c
/optee_os/core/drivers/firewall/stm32_serc.c
/optee_os/core/drivers/gic.c
/optee_os/core/drivers/hfic.c
/optee_os/core/drivers/imsic.c
/optee_os/core/drivers/imx/mu/imx_mu.c
/optee_os/core/drivers/imx_rngb.c
/optee_os/core/drivers/plic.c
/optee_os/core/drivers/stm32_i2c.c
/optee_os/core/drivers/stm32_rng.c
/optee_os/core/drivers/sub.mk
/optee_os/core/include/drivers/aplic.h
/optee_os/core/include/drivers/aplic_priv.h
/optee_os/core/include/drivers/imsic.h
/optee_os/core/include/drivers/stm32_i2c.h
/optee_os/core/include/drivers/stm32_serc.h
/optee_os/core/include/dt-bindings/firewall/stm32mp25-rifsc.h
/optee_os/core/include/initcall.h
/optee_os/core/include/kernel/abort.h
/optee_os/core/include/kernel/boot.h
/optee_os/core/include/kernel/interrupt.h
/optee_os/core/include/kernel/thread.h
/optee_os/core/include/mm/core_mmu.h
/optee_os/core/kernel/dt.c
/optee_os/core/kernel/initcall.c
/optee_os/core/kernel/interrupt.c
/optee_os/core/kernel/otp_stubs.c
/optee_os/core/kernel/thread.c
/optee_os/core/kernel/transfer_list.c
/optee_os/core/lib/libtomcrypt/src/modes/ctr/ctr_encrypt.c
/optee_os/core/lib/scmi-server/conf-optee-fvp.mk
/optee_os/core/mm/core_mmu.c
/optee_os/core/mm/sub.mk
/optee_os/core/pta/stats.c
/optee_os/core/pta/tests/misc.c
/optee_os/core/tee/tee_cryp_utl.c
libmbedtls/mbedtls/library/common.h
/optee_os/mk/compile.mk
/optee_os/mk/config.mk
/optee_os/scripts/sign_encrypt.py
76306f7316-Jan-2025 Etienne Carriere <etienne.carriere@foss.st.com>

core: pta: stats: get RPMB secure storage allocation stats

Retrieve RPMB secure storage space allocation statistics from
PTA stats STATS_CMD_ALLOC_STATS command.

STATS_NB_POOLS is intentionally not

core: pta: stats: get RPMB secure storage allocation stats

Retrieve RPMB secure storage space allocation statistics from
PTA stats STATS_CMD_ALLOC_STATS command.

STATS_NB_POOLS is intentionally not incremented since it is
expected to give the number of pools which IDs start from 1
(ALLOC_ID_HEAP), not from 0 (ALLOC_ID_ALL) that is a magic
ID.

Ensure the stats are all 0 for when RPMB_FS is not supported or we
failed to get the stats info. For this, let's zero initialize the
shared buffer so that these default stats also apply on other stats
that may not be reachable (deprecate public DDR pool, Nexus heap).

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

show more ...

edc125c520-Jan-2025 Jens Wiklander <jens.wiklander@linaro.org>

libutils: add malloc_flags() and free_flags()

Add malloc_flags() and free_flags() for generic and flexible memory
allocations based on a passed flags field.

Signed-off-by: Jens Wiklander <jens.wikl

libutils: add malloc_flags() and free_flags()

Add malloc_flags() and free_flags() for generic and flexible memory
allocations based on a passed flags field.

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

show more ...

695be9d620-Jan-2025 Jens Wiklander <jens.wiklander@linaro.org>

libutils: refactor the MDBG malloc functions

Replace the MDBG malloc functions and macros with a new function
__mdbg_alloc() handling all the memory allocations similar to
mem_alloc(). The old MDBG

libutils: refactor the MDBG malloc functions

Replace the MDBG malloc functions and macros with a new function
__mdbg_alloc() handling all the memory allocations similar to
mem_alloc(). The old MDBG macros are replace by new macros calling
__mdbg_alloc().

mem_alloc(), mem_alloc_unlocked(), and mem_free() are updated to handle
configuration with and without MDBG, removing the all the ENABLE_MDBG
ifdefs in the C file.

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

show more ...

4645216420-Jan-2025 Jens Wiklander <jens.wiklander@linaro.org>

libutils: refactor the nexus malloc functions

Refactor the malloc functions operating on the nexus heap as simple
wrappers around the recently added internal function mem_alloc().

Signed-off-by: Je

libutils: refactor the nexus malloc functions

Refactor the malloc functions operating on the nexus heap as simple
wrappers around the recently added internal function mem_alloc().

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

show more ...

07c190fb20-Jan-2025 Jens Wiklander <jens.wiklander@linaro.org>

libutils: refactor the default malloc functions

Refactor the malloc functions operating on the default heap as simple
wrappers around the new internal function mem_alloc() similar to the
recently ad

libutils: refactor the default malloc functions

Refactor the malloc functions operating on the default heap as simple
wrappers around the new internal function mem_alloc() similar to the
recently added raw_mem_alloc().

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

show more ...

4649333320-Jan-2025 Jens Wiklander <jens.wiklander@linaro.org>

libutils: refactor raw malloc functions

Refactor the raw malloc functions as simple wrappers around the new
internal function raw_mem_alloc(). raw_mem_alloc() takes a flags field
to control whether

libutils: refactor raw malloc functions

Refactor the raw malloc functions as simple wrappers around the new
internal function raw_mem_alloc(). raw_mem_alloc() takes a flags field
to control whether the allocated buffer should be cleared before it's
returned.

The flags are defined in <malloc.h> since they will be needed there in
later patches.

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

show more ...

f3d9bdee20-Jan-2025 Jens Wiklander <jens.wiklander@linaro.org>

libutils: add malloc_flags.h

Add malloc_flags.h defining flags to control how buffers are allocated.
The flags will be used in later patches.

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.or

libutils: add malloc_flags.h

Add malloc_flags.h defining flags to control how buffers are allocated.
The flags will be used in later patches.

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

show more ...

703ebb7913-Jan-2025 Etienne Carriere <etienne.carriere@foss.st.com>

libtuee: allow NULL output coefficients in TEE_BigIntComputeExtendedGcd()

Fix TEE_BigIntComputeExtendedGcd() for when only one of u and v output
coefficients reference is NULL as allowed by the GP T

libtuee: allow NULL output coefficients in TEE_BigIntComputeExtendedGcd()

Fix TEE_BigIntComputeExtendedGcd() for when only one of u and v output
coefficients reference is NULL as allowed by the GP TEE Internal Core API
specification.

Reported-by: Stefan Schmidt <snst@meek.de>
Closes: https://github.com/OP-TEE/optee_os/issues/7217
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

44f8cfac23-Sep-2024 Maxime Méré <maxime.mere@foss.st.com>

libutils: util.h: add usage description to {get,set}_field_u{32,64}()

Add inline description comments to get_bitfield_u32(),
get_bitfield_u64(), set_bitfield_u32() and set_bitfield_u64() to improve

libutils: util.h: add usage description to {get,set}_field_u{32,64}()

Add inline description comments to get_bitfield_u32(),
get_bitfield_u64(), set_bitfield_u32() and set_bitfield_u64() to improve
understanding and reduce errors.

Signed-off-by: Maxime Méré <maxime.mere@foss.st.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>

show more ...


/optee_os/.github/workflows/ci.yml
/optee_os/MAINTAINERS
/optee_os/core/arch/arm/kernel/stmm_sp.c
/optee_os/core/arch/arm/mm/core_mmu_v7.c
/optee_os/core/arch/arm/mm/mobj_ffa.c
/optee_os/core/arch/arm/mm/sp_mem.c
/optee_os/core/arch/arm/plat-d06/conf.mk
/optee_os/core/arch/arm/plat-sam/conf.mk
/optee_os/core/arch/arm/plat-telechips/conf.mk
/optee_os/core/arch/arm/plat-telechips/drivers/include/drivers/tcc_otp.h
/optee_os/core/arch/arm/plat-telechips/drivers/sub.mk
/optee_os/core/arch/arm/plat-telechips/drivers/tcc_otp.c
/optee_os/core/arch/arm/plat-telechips/link.mk
/optee_os/core/arch/arm/plat-telechips/main.c
/optee_os/core/arch/arm/plat-telechips/plat_tzc.c
/optee_os/core/arch/arm/plat-telechips/scripts/tcmktool.py
/optee_os/core/arch/arm/plat-telechips/sub.mk
/optee_os/core/arch/arm/plat-telechips/tcc805x/otprom.h
/optee_os/core/arch/arm/plat-telechips/tcc805x/platform_config.h
/optee_os/core/arch/arm/plat-versal2/conf.mk
/optee_os/core/arch/arm/plat-versal2/platform_config.h
/optee_os/core/arch/arm/plat-vexpress/conf.mk
/optee_os/core/drivers/clk/sam/clk-sam9x60-pll.c
/optee_os/core/drivers/crypto/caam/ae/caam_ae.c
/optee_os/core/drivers/crypto/caam/ae/caam_ae_ccm.c
/optee_os/core/drivers/crypto/caam/ae/caam_ae_gcm.c
/optee_os/core/drivers/crypto/caam/ae/local.h
/optee_os/core/drivers/crypto/caam/ae/sub.mk
/optee_os/core/drivers/crypto/caam/caam_ctrl.c
/optee_os/core/drivers/crypto/caam/caam_desc.c
/optee_os/core/drivers/crypto/caam/cipher/caam_cipher.c
/optee_os/core/drivers/crypto/caam/crypto.mk
/optee_os/core/drivers/crypto/caam/include/caam_ae.h
/optee_os/core/drivers/crypto/caam/include/caam_desc_ccb_defines.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_trace.h
/optee_os/core/drivers/crypto/caam/include/caam_utils_mem.h
/optee_os/core/drivers/crypto/caam/sub.mk
/optee_os/core/drivers/crypto/caam/utils/utils_mem.c
/optee_os/core/drivers/crypto/crypto_api/acipher/rsassa.c
/optee_os/core/drivers/crypto/hisilicon/crypto.mk
/optee_os/core/drivers/crypto/hisilicon/sec_pbkdf2.c
/optee_os/core/drivers/crypto/hisilicon/sec_pbkdf2.h
/optee_os/core/drivers/crypto/hisilicon/sub.mk
/optee_os/core/drivers/imx/dcp/dcp.c
/optee_os/core/drivers/microchip_pit.c
/optee_os/core/drivers/openedges_omc.c
/optee_os/core/drivers/sub.mk
/optee_os/core/include/drivers/openedges_omc.h
/optee_os/core/kernel/ldelf_loader.c
/optee_os/core/lib/libtomcrypt/mpi_desc.c
/optee_os/core/mm/fobj.c
/optee_os/core/tee/tee_ree_fs.c
/optee_os/core/tee/tee_rpmb_fs.c
libutils/ext/include/util.h
/optee_os/ta/avb/user_ta_header_defines.h
/optee_os/ta/pkcs11/include/pkcs11_ta.h
/optee_os/ta/pkcs11/src/pkcs11_attributes.c
/optee_os/ta/pkcs11/src/processing_aes.c
/optee_os/ta/pkcs11/src/processing_rsa.c
/optee_os/ta/pkcs11/src/token_capabilities.c
/optee_os/ta/trusted_keys/user_ta_header_defines.h
383d059417-Dec-2024 Etienne Carriere <etienne.carriere@foss.st.com>

libutils: util.h: fix indentation of ROUNDDOWN() macro

Fix indentation of the value defined for ROUNDDOWN() macro
and add inline comment to better highlight the surrounded
macros are defined for ass

libutils: util.h: fix indentation of ROUNDDOWN() macro

Fix indentation of the value defined for ROUNDDOWN() macro
and add inline comment to better highlight the surrounded
macros are defined for assembler and like source files.

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

show more ...

8fd4cad117-Dec-2024 Etienne Carriere <etienne.carriere@foss.st.com>

libutils: util.h: fix DIV_ROUND_UP() inline description

Remove trailing space char in inline description comment of
DIV_ROUND_UP() macro.

Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.c

libutils: util.h: fix DIV_ROUND_UP() inline description

Remove trailing space char in inline description comment of
DIV_ROUND_UP() macro.

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

show more ...

76d6685e17-Dec-2024 Etienne Carriere <etienne.carriere@foss.st.com>

tree-wide: use power-of-2 rounding macros where applicable

Use ROUNDUP2(), ROUNDUP2_OVERFLOW(), ROUNDUP2_DIV() and ROUNDDOWN2() at
places where the rounding argument is a variable value and we want

tree-wide: use power-of-2 rounding macros where applicable

Use ROUNDUP2(), ROUNDUP2_OVERFLOW(), ROUNDUP2_DIV() and ROUNDDOWN2() at
places where the rounding argument is a variable value and we want to
leverage the implementation of these routines optimized for a
power-of-2 rounding argument.

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

show more ...

fa418fcd18-Dec-2024 Etienne Carriere <etienne.carriere@foss.st.com>

libutils: util.h: Relax ROUNDDOWN() and add ROUNDDOWN2()

Remove constraint on ROUNDDOWN() to have its size argument being a power
of 2 and add new ROUNDDOWN2() macro with that constraint.

The previ

libutils: util.h: Relax ROUNDDOWN() and add ROUNDDOWN2()

Remove constraint on ROUNDDOWN() to have its size argument being a power
of 2 and add new ROUNDDOWN2() macro with that constraint.

The previous implementation of ROUNDDOWN(), optimized for when size
argument is a power of 2, is now used for ROUNDDOWN2() but this latter
also asserts (in debug build mode) that the size argument conforms to
this condition.

The new implementation of ROUNDDOWN() is less optimal but modern
compilers produce the same optimized assembly code with this macro when
the size argument is a constant value known from the compiler so all
use of ROUNDDOWN() with a known constant value do not need move to
ROUNDDOWN2().

Performance sensitive routines should now on use ROUNDDOWN2() to
leverage the power-of-2 rounding optimization.

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

show more ...

8132f3be18-Dec-2024 Etienne Carriere <etienne.carriere@foss.st.com>

libutils: util.h: Relax ROUNDUP() and add ROUNDUP2()

Remove constraint on ROUNDUP() to have its size argument being a power
of 2 and add new ROUNDUP2() macro with that constraint.

The previous impl

libutils: util.h: Relax ROUNDUP() and add ROUNDUP2()

Remove constraint on ROUNDUP() to have its size argument being a power
of 2 and add new ROUNDUP2() macro with that constraint.

The previous implementation of ROUNDUP(), optimized for when size
argument is a power of 2, is now used for ROUNDUP2() but this latter
also asserts (in debug build mode) that the size argument conforms to
this condition.

The new implementation of ROUNDUP() is less optimal but modern
compilers produce the same optimized assembly code with this macro
when the size argument is a constant value known from the compiler
so all use of ROUNDUP() with a known constant value do not need
move to ROUNDUP2().

Performance sensitive routines should now on use ROUNDUP2() to
leverage the power-of-2 rounding optimization.

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

show more ...

c98faf4d18-Dec-2024 Etienne Carriere <etienne.carriere@foss.st.com>

libutils: util.h: Relax ROUNDUP_OVERFLOW() and add ROUNDUP2_OVERFLOW()

Remove constraint on ROUNDUP_OVERFLOW() to have its size argument being
a power of 2 and add new ROUNDUP2_OVERFLOW() macro with

libutils: util.h: Relax ROUNDUP_OVERFLOW() and add ROUNDUP2_OVERFLOW()

Remove constraint on ROUNDUP_OVERFLOW() to have its size argument being
a power of 2 and add new ROUNDUP2_OVERFLOW() macro with that constraint.

The previous implementation of ROUNDUP_OVERFLOW(), optimized for when
size argument is a power of 2, is now used for ROUNDUP2_OVERFLOW() but
this latter also asserts (in debug build mode) that the size argument
conforms to this condition.

Performance sensitive routines should now on use ROUNDUP2_OVERFLOW() to
leverage the power-of-2 rounding optimization.

The new implementation of ROUNDUP_OVERFLOW() is less optimal but modern
compilers produce the same optimized assembly code with this macro
when the size argument is a constant value known from the compiler
so all use of ROUNDUP_OVERFLOW() with a known constant value do not need
move to ROUNDUP2_OVERFLOW().

By the way, fix the indentation in the macro implementation for
consistency of the header file implementation and extend the inline
description comment.

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

show more ...

4879d4c016-Dec-2024 Etienne Carriere <etienne.carriere@foss.st.com>

libutils: util.h: Relax ROUNDUP_DIV() and add ROUNDUP2_DIV()

Remove constraint on ROUNDUP_DIV() to have its size argument being a
power of 2 and add new ROUNDUP2_DIV() macro with that constraint.

T

libutils: util.h: Relax ROUNDUP_DIV() and add ROUNDUP2_DIV()

Remove constraint on ROUNDUP_DIV() to have its size argument being a
power of 2 and add new ROUNDUP2_DIV() macro with that constraint.

The previous implementation of ROUNDUP_DIV(), optimized for when size
argument is a power of 2, is now used for ROUNDUP2_DIV() but this latter
also asserts (in debug build mode) that the size argument conforms to
this condition.

Performance sensitive routines should now on use ROUNDUP2_DIV() to
leverage the power-of-2 rounding optimization.

The new implementation of ROUNDUP_DIV() is less optimal but modern
compilers produce the same optimized assembly code with this macro
when the size argument is a constant value known from the compiler
so all use of ROUNDUP_DIV() with a known constant value do not need
move to ROUNDUP2_DIV().

By the way, fix the indentation in the macro implementation for
consistency of the header file implementation.

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

show more ...

fd0b115a16-Dec-2024 Etienne Carriere <etienne.carriere@foss.st.com>

libutils: util.h: fix ROUND*() macros description argument constraint

Correct inline description comment for ROUNDUP(), ROUNDUP_OVERFLOW(),
ROUNDDOWN() where the second argument is expected to be a

libutils: util.h: fix ROUND*() macros description argument constraint

Correct inline description comment for ROUNDUP(), ROUNDUP_OVERFLOW(),
ROUNDDOWN() where the second argument is expected to be a power of 2,
not a multiple of 2.

Add an inline description comment to ROUNDUP_OVERFLOW() to state
this requirement.

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

show more ...

5c60356612-Dec-2024 Jens Wiklander <jens.wiklander@linaro.org>

libmbedtls: use mempool_calloc() for temporary memory

mbedtls_mpi_exp_mod_optionally_safe() needs a large chunk of temporary
memory for the mbedtls_mpi_core_exp_mod() function. The amount of memory

libmbedtls: use mempool_calloc() for temporary memory

mbedtls_mpi_exp_mod_optionally_safe() needs a large chunk of temporary
memory for the mbedtls_mpi_core_exp_mod() function. The amount of memory
is too much to reliably allocate from the heap. So use mempool_calloc()
instead of mbedtls_calloc(), similar to using mbedtls_mpi_init_mempool()
instead of mbedtls_mpi_init().

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

show more ...


/optee_os/.devcontainer/Dockerfile.vscode
/optee_os/.devcontainer/devcontainer.json
/optee_os/.github/workflows/ci.yml
/optee_os/.gitignore
/optee_os/.vscode/extensions.json
/optee_os/MAINTAINERS
/optee_os/core/arch/arm/dts/stm32mp13-pinctrl.dtsi
/optee_os/core/arch/arm/dts/stm32mp131.dtsi
/optee_os/core/arch/arm/dts/stm32mp15-pinctrl.dtsi
/optee_os/core/arch/arm/dts/stm32mp151.dtsi
/optee_os/core/arch/arm/dts/stm32mp157c-ed1.dts
/optee_os/core/arch/arm/dts/stm32mp15xx-dhcor-avenger96.dtsi
/optee_os/core/arch/arm/dts/stm32mp25-pinctrl.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/include/kernel/thread_private_arch.h
/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/kernel/link_dummy.ld
/optee_os/core/arch/arm/kernel/secure_partition.c
/optee_os/core/arch/arm/kernel/virtualization.c
/optee_os/core/arch/arm/mm/core_mmu_v7.c
/optee_os/core/arch/arm/plat-imx/conf.mk
/optee_os/core/arch/arm/plat-k3/drivers/ti_sci.c
/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-rockchip/platform_rk3588.c
/optee_os/core/arch/arm/plat-rockchip/sub.mk
/optee_os/core/arch/arm/plat-stm32mp1/drivers/stm32mp1_pmic.c
/optee_os/core/arch/arm/plat-stm32mp1/main.c
/optee_os/core/arch/arm/plat-stm32mp1/platform_config.h
/optee_os/core/arch/arm/plat-stm32mp1/shared_resources.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-versal2/conf.mk
/optee_os/core/arch/arm/plat-versal2/main.c
/optee_os/core/arch/arm/plat-versal2/platform_config.h
/optee_os/core/arch/arm/plat-versal2/sub.mk
/optee_os/core/arch/arm/plat-vexpress/conf.mk
/optee_os/core/arch/riscv/include/riscv.h
/optee_os/core/arch/riscv/kernel/kern.ld.S
/optee_os/core/drivers/clk/clk-stm32mp25.c
/optee_os/core/drivers/crypto/caam/caam_sm.c
/optee_os/core/drivers/crypto/caam/hal/common/hal_sm.c
/optee_os/core/drivers/scmi-msg/clock_generic.c
/optee_os/core/drivers/stm32_gpio.c
/optee_os/core/drivers/stm32_i2c.c
/optee_os/core/drivers/stm32_tamp.c
/optee_os/core/drivers/stm32_uart.c
/optee_os/core/include/drivers/stm32_gpio.h
/optee_os/core/include/dt-bindings/gpio/stm32mp_gpio.h
/optee_os/core/include/dt-bindings/pinctrl/stm32-pinfunc.h
/optee_os/core/include/kernel/boot.h
/optee_os/core/include/kernel/linker.h
/optee_os/core/include/kernel/virtualization.h
/optee_os/core/include/mm/core_memprot.h
/optee_os/core/include/mm/core_mmu.h
/optee_os/core/kernel/ree_fs_ta.c
/optee_os/core/lib/libtomcrypt/ed25519.c
/optee_os/core/mm/boot_mem.c
/optee_os/core/mm/core_mmu.c
/optee_os/core/mm/fobj.c
/optee_os/core/mm/mobj.c
/optee_os/core/mm/pgt_cache.c
/optee_os/core/mm/phys_mem.c
/optee_os/core/mm/sub.mk
libmbedtls/mbedtls/library/bignum.c
/optee_os/mk/clang.mk
/optee_os/mk/config.mk
/optee_os/ta/pkcs11/sub.mk

12345678910>>...36