JJérôme Forissiervirt: rename CFG_VIRTUALIZATION to CFG_NS_VIRTUALIZATION
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
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 doesnt 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) | 4 年前 | |
virt: rename CFG_VIRTUALIZATION to CFG_NS_VIRTUALIZATION With the advent of virtualization support at S-EL2 in the Armv8.4-A architecture, CFG_VIRTUALIZATION has become ambiguous. Let's rename it to CFG_NS_VIRTUALIZATION to indicate more clearly that it is about supporting virtualization on the non-secure side. This commit is the result of the following command: $ for f in $(git grep -l -w CFG_VIRTUALIZATION); do \ sed -i -e 's/CFG_VIRTUALIZATION/CFG_NS_VIRTUALIZATION/g' $f; \ done ...plus the compatibility line in mk/config.mk: CFG_NS_VIRTUALIZATION ?= $(CFG_VIRTUALIZATION) Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com> | 3 年前 | |
core: file: refactor interface to be thread safe Adds file_lock() and file_unlock() to change the lock state of a file. file_new() is removed, the only way to create a file is with file_get_by_tag() which will return an empty newly allocated file if none can be found. file_add_slice() is added to add slices to a file, one by one. With this can multiple threads try to load a TA at once, the first one taking the lock will add all the slices to the file. The code in user_ta.c and elf_load.c using the <file.h> interface can be optimized to allow more operations in parallel. Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> | 6 年前 | |
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> | 5 年前 | |
core: map TA memory using TEE_MATTR_MEM_TYPE_TAGGED Maps TA memory using the TEE_MATTR_MEM_TYPE_TAGGED which results in tagged cached memory if the system has it enabled. Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> | 4 年前 | |
core: simplify pgt interface provided by pgt_cache.h Many of the function in the pgt interface takes more than one pointer to struct pgt_cache, struct vm_info or struct ts_ctx. All these pointers are available in struct user_mode_ctx so pass a pointer to that struct instead. This saves a few function arguments and also makes it a bit more clear how a function can be used. pgt_clear_ctx_range(), pgt_flush_ctx_range() and pgt_flush_ctx() are renamed to drop the "_ctx" part in their names since it's not relevant any longer. Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> | 3 年前 | |
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> | 4 年前 | |
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> | 4 年前 | |
core: mm: return true for mattr_is_cached() and TEE_MATTR_MEM_TYPE_TAGGED Memory areas tagged with TEE_MATTR_MEM_TYPE_TAGGED attributes are cached. Modify mattr_is_cached() accordingly. Fixes: 7c3ab7744d ("core: mm: add TEE_MATTR_MEM_TYPE_TAGGED") Signed-off-by: Clement Faure <clement.faure@nxp.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> | 3 年前 | |
core: tee_pager.h: provide stubbed tee_pager_pgt_save_and_release_entries() Provides a stubbed static inline tee_pager_pgt_save_and_release_entries() when CFG_PAGED_USER_TA isn't defined. Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> | 3 年前 | |
core: initialize struct user_mode_ctx with vm_info_init() Broadens the scope of vm_info_init() to initialize the entire struct user_mode_ctx. Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> | 3 年前 |