History log of /optee_os/lib/libutils/ext/include/mempool.h (Results 1 – 4 of 4)
Revision Date Author Comments
# 95d0db1e 15-May-2019 Jens Wiklander <jens.wiklander@linaro.org>

core: add system wide mempool_default

Adds system wide mempool_default for temporary large memory allocations.

Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Etienne Carriere

core: add system wide mempool_default

Adds system wide mempool_default for temporary large memory allocations.

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

show more ...


# b2dd8747 05-Feb-2019 Jens Wiklander <jens.wiklander@linaro.org>

Fix alignment of data for mempool_alloc_pool()

Prior to this patch was _TEE_MathAPI_Init() in
lib/libutee/tee_api_arith_mpi.c supplying a data buffer which was only 4
byte aligned while mempool_allo

Fix alignment of data for mempool_alloc_pool()

Prior to this patch was _TEE_MathAPI_Init() in
lib/libutee/tee_api_arith_mpi.c supplying a data buffer which was only 4
byte aligned while mempool_alloc_pool() requires the alignment of long.
This will work in 32-bit mode, but could lead to alignment problem in
64-bit mode. The same problem can happen with
lib/libutee/tee_api_arith_mpa.c, but so far it has remained hidden.

Incorrect alignment can result in errors like:
E/TA: assertion '!((vaddr_t)data & (POOL_ALIGN - 1))' failed at lib/libutils/ext/mempool.c:134 in mempool_alloc_pool()

This fix introduces MEMPOOL_ALIGN which specifies required alignment of
data supplied to mempool_alloc_pool().

Fixes: 062e3d01c039 ("ta: switch to to mbedtls for bignum")
Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
Tested-by: Joakim Bech <joakim.bech@linaro.org> (QEMU v8)
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# e7d51f42 12-Nov-2018 Jens Wiklander <jens.wiklander@linaro.org>

mempool: add mempool_calloc()

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


# a2eb5b55 18-Apr-2018 Jens Wiklander <jens.wiklander@linaro.org>

libutils: add mempool API

Adds mempool.h with an API suitable for allocating short-lived object.
Based on the internal counterpart in libmpa. This is needed to integrate
other bignum implementations

libutils: add mempool API

Adds mempool.h with an API suitable for allocating short-lived object.
Based on the internal counterpart in libmpa. This is needed to integrate
other bignum implementations.

Reviewed-by: Volodymyr Babchuk <vlad.babchuk@gmail.com>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...