| c02edd30 | 08-Feb-2022 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: split core_mmu_private.h
Splits core_mmu_private.h into <mm/core_mmu_arch.h> and <mm/core_mmu.h>
Reviewed-by: Jerome Forissier <jerome@forissier.org> Acked-by: Marouene Boubakri <marouene.bou
core: split core_mmu_private.h
Splits core_mmu_private.h into <mm/core_mmu_arch.h> and <mm/core_mmu.h>
Reviewed-by: Jerome Forissier <jerome@forissier.org> Acked-by: Marouene Boubakri <marouene.boubakri@nxp.com> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 8c260e80 | 08-Feb-2022 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: split core/arch/arm/include/mm/core_mmu.h
Splits core/arch/arm/include/mm/core_mmu.h into one generic and one architecture specific file.
Reviewed-by: Jerome Forissier <jerome@forissier.org>
core: split core/arch/arm/include/mm/core_mmu.h
Splits core/arch/arm/include/mm/core_mmu.h into one generic and one architecture specific file.
Reviewed-by: Jerome Forissier <jerome@forissier.org> Acked-by: Marouene Boubakri <marouene.boubakri@nxp.com> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| e26b8354 | 17-Jan-2022 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add support for SPMC at EL3
Adds support for SPMC at EL3 with CFG_CORE_EL3_SPMC. This is from OP-TEE point of view almost identical to CFG_CORE_SEL2_SPMC with SPMC at S-EL2.
The previously S-
core: add support for SPMC at EL3
Adds support for SPMC at EL3 with CFG_CORE_EL3_SPMC. This is from OP-TEE point of view almost identical to CFG_CORE_SEL2_SPMC with SPMC at S-EL2.
The previously S-EL2 specific functions mobj_ffa_sel2_spmc_new() and mobj_ffa_sel2_spmc_delete() are renamed to mobj_ffa_spmc_new() and mobj_ffa_spmc_delete() respectively since they are no longer reserved to used only with SPMC at S-EL2.
Reviewed-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 4265a9fd | 28-Dec-2021 |
Marouene Boubakri <marouene.boubakri@nxp.com> |
core: mm: move tee_pager.h to core/include/mm
The tee_pager.h header file does not contain architecture-specific code, move it from core/arch/arm/include/mm to core/include/mm
Signed-off-by: Maroue
core: mm: move tee_pager.h to core/include/mm
The tee_pager.h header file does not contain architecture-specific code, move it from core/arch/arm/include/mm to core/include/mm
Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jerome Forissier <jerome@forissier.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 700ef31f | 28-Dec-2021 |
Marouene Boubakri <marouene.boubakri@nxp.com> |
core: mm: move pgt_cache.h to core/include/mm
The pgt_cache.h header file does not contain architecture-specific code, move it from core/arch/arm/include/mm to core/include/mm
Signed-off-by: Maroue
core: mm: move pgt_cache.h to core/include/mm
The pgt_cache.h header file does not contain architecture-specific code, move it from core/arch/arm/include/mm to core/include/mm
Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jerome Forissier <jerome@forissier.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 9c4aaf67 | 11-Jan-2022 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: make mobj_get_va() more secure
Adds a length parameter to allow mobj_get_va() to check that the entire va range requested is available.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.
core: make mobj_get_va() more secure
Adds a length parameter to allow mobj_get_va() to check that the entire va range requested is available.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-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 ...
|
| 68c6ad9a | 09-Sep-2021 |
Jelle Sels <jelle.sels@arm.com> |
core: Add vm_get_mobj
Return the mobj of a va.
Signed-off-by: Jelle Sels <jelle.sels@arm.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@li
core: Add vm_get_mobj
Return the mobj of a va.
Signed-off-by: Jelle Sels <jelle.sels@arm.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| d707c30c | 02-Nov-2021 |
Ruchika Gupta <ruchika.gupta@linaro.org> |
core: mm: Set GP bit to enable BTI for TEE core
For all the descriptor entries marked with TEE_MATTR_PX, enable GP bit if BTI is enabled.
TEE_MATTR_GUARDED attribute is also added here. This will b
core: mm: Set GP bit to enable BTI for TEE core
For all the descriptor entries marked with TEE_MATTR_PX, enable GP bit if BTI is enabled.
TEE_MATTR_GUARDED attribute is also added here. This will be used when creating mapping for user space.
Signed-off-by: Ruchika Gupta <ruchika.gupta@linaro.org> Acked-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 2380d700 | 27-Aug-2021 |
Lionel Debieve <lionel.debieve@foss.st.com> |
core: mmu: fix overflow with high address in tee_mm_pool_t
In case of TA_RAM defined at the end of address range, the high address will be defined outside the paddr_t limits which ends in a 0 addres
core: mmu: fix overflow with high address in tee_mm_pool_t
In case of TA_RAM defined at the end of address range, the high address will be defined outside the paddr_t limits which ends in a 0 address usage. The size must be used rather than the high address to avoid this overflow issue. Update the corresponding files due to API modification.
Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| c2e4eb43 | 23-May-2021 |
Anton Rybakov <a.rybakov@omp.ru> |
core_mmu: fix phys_to_virt() to check length
phys_to_virt() function without length parameter doesn`t always have ability to find the correct mapping for requested physical address. This is because
core_mmu: fix phys_to_virt() to check length
phys_to_virt() function without length parameter doesn`t always have ability to find the correct mapping for requested physical address. This is because physical address can be mapped in the same time in different virtual regions with different length. So the first found region which contains the requested physical address possibly doesn`t have enough mapped data. This is fixed by adding the length parameter to phys_to_virt() function. Length parameter can be set to 1 if caller knows that requested (pa + len) doesn`t cross mapping granule boundary.
core_mmu_get_va() and io_pa_or_va() functions now are take length parameter too as they based on phys_to_virt() in case of MMU enabled.
Signed-off-by: Anton Rybakov <a.rybakov@omp.ru> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Tested-by: Etienne Carriere <etienne.carriere@linaro.org> (stm32mp1-157C_DK2) Tested-by: Clement Faure <clement.faure@nxp.com> (imx-mx6dlsabreauto) Tested-by: Clement Faure <clement.faure@nxp.com> (imx-mx6dlsabresd) Tested-by: Clement Faure <clement.faure@nxp.com> (imx-mx6qpsabreauto) Tested-by: Clement Faure <clement.faure@nxp.com> (imx-mx6sllevk) Tested-by: Clement Faure <clement.faure@nxp.com> (imx-mx6ulevk) Tested-by: Clement Faure <clement.faure@nxp.com> (imx-mx6ullevk) Tested-by: Clement Faure <clement.faure@nxp.com> (imx-mx6ulzevk) Tested-by: Clement Faure <clement.faure@nxp.com> (imx-mx7dsabresd) Tested-by: Clement Faure <clement.faure@nxp.com> (imx-mx7ulpevk) Tested-by: Clement Faure <clement.faure@nxp.com> (imx-mx8mmevk) Tested-by: Clement Faure <clement.faure@nxp.com> (imx-mx8mnevk) Tested-by: Clement Faure <clement.faure@nxp.com> (imx-mx8mqevk) Tested-by: Clement Faure <clement.faure@nxp.com> (imx-mx8mpevk) Tested-by: Clement Faure <clement.faure@nxp.com> (imx-mx8qmmek) Tested-by: Clement Faure <clement.faure@nxp.com> (imx-mx8qxpmek)
show more ...
|
| ff01e245 | 24-Jun-2021 |
Anton Rybakov <a.rybakov@omp.ru> |
mm: split mobj_tee_ram onto rw/rx parts
Now mobj_tee_ram memory abstraction contains both TEE_RAM_RX and TEE_RAM_RW regions joined together. This patch splits it to mobj_tee_ram_rx and mobj_tee_ram_
mm: split mobj_tee_ram onto rw/rx parts
Now mobj_tee_ram memory abstraction contains both TEE_RAM_RX and TEE_RAM_RW regions joined together. This patch splits it to mobj_tee_ram_rx and mobj_tee_ram_rw to manage RX/RW memory objects separately.
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Anton Rybakov <a.rybakov@omp.ru>
show more ...
|
| b4bfc9a9 | 30-Apr-2021 |
Jens Wiklander <jens.wiklander@linaro.org> |
core/include/*/*.h: use U() for unsigned constants
Updates with the U() macro as described in the recently updated coding guidelines.
Acked-by: Ruchika Gupta <ruchika.gupta@linaro.org> Acked-by: Je
core/include/*/*.h: use U() for unsigned constants
Updates with the U() macro as described in the recently updated coding guidelines.
Acked-by: Ruchika Gupta <ruchika.gupta@linaro.org> Acked-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| d5ad7ccf | 10-Jan-2021 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: rename struct tee_pager_area to vm_paged_region
Renames struct tee_pager_area to struct vm_paged_region and moves it next to the declaration of struct vm_region. Since areas are now called pag
core: rename struct tee_pager_area to vm_paged_region
Renames struct tee_pager_area to struct vm_paged_region and moves it next to the declaration of struct vm_region. Since areas are now called paged regions or regions also rename functions, variables and struct members accordingly.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| fb19e98e | 25-Feb-2021 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: enable FF-A with SPM Core at S-EL2
This enables support for FF-A with SPM Core at S-EL2 in a secure hypervisor while OP-TEE is running at S-EL1 as a SP. This configuration is also know as "S-E
core: enable FF-A with SPM Core at S-EL2
This enables support for FF-A with SPM Core at S-EL2 in a secure hypervisor while OP-TEE is running at S-EL1 as a SP. This configuration is also know as "S-EL2 SPMC" in the FFA specification.
Compile with CFG_CORE_SEL2_SPMC=y
Note that this is an experimental feature, ABIs etc may have incompatible changes.
This depends on using the FF-A v4 patchset in the Linux kernel.
Reviewed-by: Jelle Sels <jelle.sels@arm.com> Co-developed-by: Marc Bonnici <marc.bonnici@arm.com> Signed-off-by: Marc Bonnici <marc.bonnici@arm.com> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| c1bdf4fc | 25-Feb-2021 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: spmc: FF-A ABI updates
Updates structs and definitions to follow FF-A version 1.0.
Use the special hard coded UUID (486178e0-e7f8-11e3-bc5e-0002a5d5c51b) for the SP OP-TEE is when compiled fo
core: spmc: FF-A ABI updates
Updates structs and definitions to follow FF-A version 1.0.
Use the special hard coded UUID (486178e0-e7f8-11e3-bc5e-0002a5d5c51b) for the SP OP-TEE is when compiled for FF-A.
Updates the FF-A OP-TEE message ABI to make room for struct optee_msg_arg to be used for RPC for OPTEE_FFA_YIELDING_CALL_WITH_ARG.
struct thread_ctx::rpc_arg for the current thread will always hold a pointer to the struct optee_msg_arg to be used for RPC.
With this allocation of shared memory can be pushed up one layer and be done via the struct optee_msg_arg so the OPTEE_FFA_YIELDING_CALL_RETURN_ALLOC_*_SHM and OPTEE_FFA_YIELDING_CALL_RETURN_FREE_*_SHM can be removed making the FF-A ABI a bit less complicated.
Changes OPTEE_FFA_UNREGISTER_SHM to be a blocking call instead of a yielding call.
Removes the unused OPTEE_FFA_YIELDING_CALL_REGISTER_SHM.
Updates the return values from yielding calls to use the TEE_Result values instead of FF-A one to use the error code from the correct layer.
Defines OPTEE_MSG_FMEM_INVALID_GLOBAL_ID to 0xffffffffffffffffff which is used as an invalid global id instead of 0.
This is an ABI breakage which must be done in sync with the FF-A v4 patchset in the Linux kernel.
Acked-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 185b4595 | 02-Apr-2021 |
Marouene Boubakri <marouene.boubakri@nxp.com> |
core: mm: move mobj.c to core/mm
mobj is abstract and it is used by many sources which are not architecture-specific such as core/kernel, core/pta and core/tee. Therefore, move mobj.c to core/mm and
core: mm: move mobj.c to core/mm
mobj is abstract and it is used by many sources which are not architecture-specific such as core/kernel, core/pta and core/tee. Therefore, move mobj.c to core/mm and its corresponding header file mobj.h to core/include/mm.
Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 83117aed | 16-Mar-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: mm: update description of vm.h exported functions
Update vm_va2pa() and vm_va2pa() inline description comments to state these are not deprecated and add some details. These 2 functions are nee
core: mm: update description of vm.h exported functions
Update vm_va2pa() and vm_va2pa() inline description comments to state these are not deprecated and add some details. These 2 functions are needed in debug mode to assert that va/pa conversion is consistent with core implementation.
Move information about user mapping and ASID from core/mm/vm.h to arm specific core_mmu.h since ASID is specific to Arm architectures.
Update style for vm_info_init() and vm_info_final() inline description for consistency in the header file.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| d6ad67f6 | 11-Mar-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: mm: change vm_pa2va() to return a virtual address
Change vm_pa2va() to return target virtual address or NULL if the physical address cannot be resolved which can happen when pager is enabled a
core: mm: change vm_pa2va() to return a virtual address
Change vm_pa2va() to return target virtual address or NULL if the physical address cannot be resolved which can happen when pager is enabled and the target physical page belongs to the pager page pool. This change makes vm_pa2va() helper function simpler and its only caller doesn't differentiate error return codes.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 2230fc67 | 25-Jan-2021 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add fobj_get_iv_vaddr()
Adds fobj_get_iv_vaddr() which returns the virtual address of the tag and IV needed to restore a particular page.
Acked-by: Etienne Carriere <etienne.carriere@linaro.o
core: add fobj_get_iv_vaddr()
Adds fobj_get_iv_vaddr() which returns the virtual address of the tag and IV needed to restore a particular page.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 3acae62c | 02-Mar-2021 |
Marouene Boubakri <marouene.boubakri@nxp.com> |
core: mm: move core_memprot.h to core/include/mm
This commit moves core_memprot.h to core/include/mm since it is architecture-independent.
Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.co
core: mm: move core_memprot.h to core/include/mm
This commit moves core_memprot.h to core/include/mm since it is architecture-independent.
Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com> Reviewed-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 89c9728d | 19-Oct-2020 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: replace tee_mmu prefix with vm
Replaces the tee_mmu prefix with vm. tee_mmu.h is renamed to vm.h and core/arch/arm/mm/tee_mmu.c is moved to core/mm/vm.c. Public functions belonging to these fi
core: replace tee_mmu prefix with vm
Replaces the tee_mmu prefix with vm. tee_mmu.h is renamed to vm.h and core/arch/arm/mm/tee_mmu.c is moved to core/mm/vm.c. Public functions belonging to these files are renamed with a vm prefix.
Introduces: vm_map_param(), vm_clean_param(), vm_buf_is_inside_private(), vm_buf_intersects_private(), vm_buf_to_mboj_offs(), vm_buf_is_inside_um_private(), vm_buf_intersects_um_private(), vm_add_rwmem(), vm_rem_rwmem(), vm_va2pa(), vm_pa2va(), vm_check_access_rights(), vm_set_ctx() replacing their tee_mmu_*() counterpart.
Acked-by: Joakim Bech <joakim.bech@linaro.org> Acked-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| a0937af2 | 19-Oct-2020 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: rename to core_mmu_init_ta_ram()
Renames teecore_init_ta_ram() to core_mmu_init_ta_ram() and moves it to core_mmu.c.
Acked-by: Joakim Bech <joakim.bech@linaro.org> Acked-by: Jerome Forissier
core: rename to core_mmu_init_ta_ram()
Renames teecore_init_ta_ram() to core_mmu_init_ta_ram() and moves it to core_mmu.c.
Acked-by: Joakim Bech <joakim.bech@linaro.org> Acked-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|