History log of /optee_os/core/arch/arm/mm/sp_mem.c (Results 1 – 12 of 12)
Revision Date Author Comments
# 04e46975 16-Dec-2024 Etienne Carriere <etienne.carriere@foss.st.com>

tree-wide: use ROUNDUP_DIV() where applicable

Use ROUNDUP_DIV() instead of ROUNDUP(..., size) / size where applicable.

Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Reviewed-by: Je

tree-wide: use ROUNDUP_DIV() where applicable

Use ROUNDUP_DIV() instead of ROUNDUP(..., size) / size where applicable.

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

show more ...


# b70970fe 25-Jun-2024 Etienne Carriere <etienne.carriere@foss.st.com>

core: arm: fix calloc() against GCC 14 -Wcalloc-transposed-args

Fix calloc() calls against GCC 14 directive -Wcalloc-transposed-args that
makes GCC to complain with an warning/error trace message li

core: arm: fix calloc() against GCC 14 -Wcalloc-transposed-args

Fix calloc() calls against GCC 14 directive -Wcalloc-transposed-args that
makes GCC to complain with an warning/error trace message like:

warning: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Wcalloc-transposed-args]

No functional change.

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

show more ...


# 593b94ee 23-Nov-2022 Jens Wiklander <jens.wiklander@linaro.org>

core: ffa: remove pager annotations

Configuration with pager and FF-A is currently not supported. Supporting
this would require extensions to the FF-A specification to be able to
load OP-TEE with pa

core: ffa: remove pager annotations

Configuration with pager and FF-A is currently not supported. Supporting
this would require extensions to the FF-A specification to be able to
load OP-TEE with paging enabled. So far we don't have any platforms with
FF-A which are memory constrained enough that paging can be motivated. If
this would change we'll have a good use case to test with when adding
pager support for FF-A.

Currently we have a few pager annotations (DECLARE_KEEP_PAGER() and
__*_unpaged) which are effectively unused. So save us from adding yet
more unused annotations by removing the few we have in the FF-A specific
code.

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


# c0bb2059 02-May-2022 Balint Dobszay <balint.dobszay@arm.com>

core: sp_mem: fix get_cattr() callback name

Commit 8afe7a7c5220 ("core: rename mobj_get_cattr() to
mobj_get_mem_type()") renames the get_cattr() callback in struct
mobj_ops(). However, sp_mem wasn't

core: sp_mem: fix get_cattr() callback name

Commit 8afe7a7c5220 ("core: rename mobj_get_cattr() to
mobj_get_mem_type()") renames the get_cattr() callback in struct
mobj_ops(). However, sp_mem wasn't updated as part of this change, so
currently it doesn't compile. Fix this and get aligned with the new
naming.

Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Balint Dobszay <balint.dobszay@arm.com>

show more ...


# 036559a5 16-Mar-2022 Jelle Sels <jelle.sels@arm.com>

core: sp_mem: add security attribute

Currently sp_mem only supports non-secure memory. This patch enables
using it for secure memory too.

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

core: sp_mem: add security attribute

Currently sp_mem only supports non-secure memory. This patch enables
using it for secure memory too.

Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Balint Dobszay <balint.dobszay@arm.com>
Signed-off-by: Jelle Sels <jelle.sels@arm.com>

show more ...


# 6f3a5646 16-Feb-2022 Jelle Sels <jelle.sels@arm.com>

core: sp_mem: add memory type attribute

Currently sp_mem only supports TEE_MATTR_MEM_TYPE_CACHE memory type.
This patch adds support for using it with any type so it can be used
for device memory to

core: sp_mem: add memory type attribute

Currently sp_mem only supports TEE_MATTR_MEM_TYPE_CACHE memory type.
This patch adds support for using it with any type so it can be used
for device memory too.

Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Balint Dobszay <balint.dobszay@arm.com>
Signed-off-by: Jelle Sels <jelle.sels@arm.com>

show more ...


# 39e8c200 01-Feb-2022 Jerome Forissier <jerome@forissier.org>

core: tag ops structures with __relrodata_unpaged

Global structures currently tagged with __rodata_unpaged need to use
__relrodata_unpaged instead because they contain pointers which are
subject to

core: tag ops structures with __relrodata_unpaged

Global structures currently tagged with __rodata_unpaged need to use
__relrodata_unpaged instead because they contain pointers which are
subject to relocation when CFG_CORE_ASLR=y. Doing so moves them out of
.rodata which will now stay unmodified even with ASLR turned on.

Signed-off-by: Jerome Forissier <jerome@forissier.org>
Acked-by: Sumit Garg <sumit.garg@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 8b427282 01-Mar-2022 Jelle Sels <jelle.sels@arm.com>

core: change TEE_MATTR_CACHE_ to TEE_MATTR_MEM_TYPE_

Some extra memory types will be added. This patch renames all
TEE_MATTR_CACHE_ defines to TEE_MATTR_MEM_TYPE_. This will make the next
patches ea

core: change TEE_MATTR_CACHE_ to TEE_MATTR_MEM_TYPE_

Some extra memory types will be added. This patch renames all
TEE_MATTR_CACHE_ defines to TEE_MATTR_MEM_TYPE_. This will make the next
patches easier to understand.

Signed-off-by: Jelle Sels <jelle.sels@arm.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...


# de66193d 06-Sep-2021 Jelle Sels <jelle.sels@arm.com>

core: FF-A: ADD FFA_MEM_RETRIEVE for SPs

FFA_MEM_RETRIEVE is used by a SP to retrieve a FF-A memory share with a
handle. Once the FFA_MEM_RETRIEVE message is handled correctly the
corresponding memo

core: FF-A: ADD FFA_MEM_RETRIEVE for SPs

FFA_MEM_RETRIEVE is used by a SP to retrieve a FF-A memory share with a
handle. Once the FFA_MEM_RETRIEVE message is handled correctly the
corresponding memory region is mapped into the SPs memory

Signed-off-by: Jelle Sels <jelle.sels@arm.com>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 6a1b230c 13-Sep-2021 Jelle Sels <jelle.sels@arm.com>

core: FFA_SHARE: Process Normal World share

Process a FFA_SHARE command coming from the Normal World. When
receiving a FFA_SHARE message from the Normal World, we check the
first receiver endpoint i

core: FFA_SHARE: Process Normal World share

Process a FFA_SHARE command coming from the Normal World. When
receiving a FFA_SHARE message from the Normal World, we check the
first receiver endpoint id. If the endpoint id is that off the OP_TEE
endpoint, we let the thread_spmc handler handle the share. If it is not,
we process it inside the spmc_sp_handler.
The mobj_ffa_() functions are used to create a new mobj for each new
share and to keep track of them.

Signed-off-by: Jelle Sels <jelle.sels@arm.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...


# 72ede99e 13-Sep-2021 Jelle Sels <jelle.sels@arm.com>

core: FFA_SHARE: Process secure share

Process a FFA_SHARE command coming from a SP. When receiving a
FFA_SHARE message from a SP, we don't create any new mobj's. Instead we
retrieve the mobj's from

core: FFA_SHARE: Process secure share

Process a FFA_SHARE command coming from a SP. When receiving a
FFA_SHARE message from a SP, we don't create any new mobj's. Instead we
retrieve the mobj's from the SP list off already mapped mobj's via
vm_get_mobj(). For each FFA_SHARE we check that the memory regions are
mapped and not shared with any other endpoints.

Signed-off-by: Jelle Sels <jelle.sels@arm.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...


# 5c1143a8 13-Sep-2021 Jelle Sels <jelle.sels@arm.com>

core: FFA_SHARE: Process FFA_MEM_SHARE message

Process a FF-A FFA_MEM_SHARE message coming from a SP or being sent
from the Normal world with one or more SPs receivers.
FFA_MEM_SHARE is used to shar

core: FFA_SHARE: Process FFA_MEM_SHARE message

Process a FF-A FFA_MEM_SHARE message coming from a SP or being sent
from the Normal world with one or more SPs receivers.
FFA_MEM_SHARE is used to share a memory region from an endpoint (SP or
normal world) with one or more endpoints in secure world(SPs).

A simplified version of the share memory transaction descriptor looks
like the following:

|-------------------|
|ffa_mem_transaction| Contains general data for the whole share
|-------------------|
|mem_access_array[0]| Contains information specific for each receiver SP
|-------------------|
|mem_access_array[1]|
|-------------------|
|mem_access_array[n]|
|-------------------|
|ffa_mem_region | Contains the memory which is shared
|-------------------|

Add sp_mem as a new memory object. Sp_mem is used to store all
information needed for a FF-A share. For each new FF-A share a sp_mem
object is created. Each share is stored inside the mem_shares list
inside sp_mem.c

The ffa_mem_transaction data is stored inside the sp_mem object.
The receivers list inside sp_mem is used to store all the
ffa_mem_region related data.
The regions list is used to store all data related to the
mem_access_array. A mobj reference is will be used to map the region
into the SPs endpoint.

Signed-off-by: Jelle Sels <jelle.sels@arm.com>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...