| 2e84663d | 09-Apr-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: tee_pager_set_uta_area_attr(): save flags
Prior to this patch is tee_pager_set_uta_area_attr() saving the mattr bits instead of just the protection bits derived from the flags parameter. This
core: tee_pager_set_uta_area_attr(): save flags
Prior to this patch is tee_pager_set_uta_area_attr() saving the mattr bits instead of just the protection bits derived from the flags parameter. This leads to tee_pager_set_uta_area_attr() updating permission even when not needed. With this patch is only the effective protection bits saved in the different struct tee_pager_area which are updated when changing permissions.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| fead5511 | 07-Feb-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add get_tag() to struct user_ta_store_ops
Adds get_tag() method to struct user_ta_store_ops.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wi
core: add get_tag() to struct user_ta_store_ops
Adds get_tag() method to struct user_ta_store_ops.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 0b345c6c | 07-Feb-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add tee_tadb_get_tag()
Adds the function tee_tadb_get_tag() which returns a tag that uniquely identifies a TA.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens
core: add tee_tadb_get_tag()
Adds the function tee_tadb_get_tag() which returns a tag that uniquely identifies a TA.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 9f31ef5a | 07-Feb-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add a file abstraction
Adds a struct file which is used to share fobjs with other memory mappings or contexts.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wik
core: add a file abstraction
Adds a struct file which is used to share fobjs with other memory mappings or contexts.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 2616b103 | 07-Feb-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add prot arg to tee_pager_add_uta_area()
Adds a prot argument to tee_pager_add_uta_area() to set the initial protection instead of the previous TEE_MATTR_PRW | TEE_MATTR_URWX;
Reviewed-by: Et
core: add prot arg to tee_pager_add_uta_area()
Adds a prot argument to tee_pager_add_uta_area() to set the initial protection instead of the previous TEE_MATTR_PRW | TEE_MATTR_URWX;
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| c0d24921 | 07-Feb-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: remove unused tee_pager_transfer_uta_region()
Removes the now unused function tee_pager_transfer_uta_region()
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wikl
core: remove unused tee_pager_transfer_uta_region()
Removes the now unused function tee_pager_transfer_uta_region()
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| c17351f4 | 07-Feb-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: remove unused pgt_transfer()
Removes the now unused function pgt_transfer()
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> |
| 6cc3087f | 07-Feb-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: user_ta: support mapping paged parameters
Supports mapping shared paged parameters for user TA.
vm_map() is modified to map objects with the TEE_MATTR_EPHEMERAL attribute which is an indicati
core: user_ta: support mapping paged parameters
Supports mapping shared paged parameters for user TA.
vm_map() is modified to map objects with the TEE_MATTR_EPHEMERAL attribute which is an indication that it's a parameter instead of TA code/data or permanent mapping.
tee_mmu_clean_param() is added to clean out all parameters added with tee_mmu_map_param().
In tee_mmu_map_param() instead of clearing out any old parameters there's a check to see that there's no old parameters hanging around.
Finally mobj_update_mapping() is removed since the pager now supports shared mappings.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 74e903b2 | 07-Feb-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add get_fobj() to mobj_seccpy_shm
Adds get_fobj() method to the mobj_seccpy_shm object.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wikland
core: add get_fobj() to mobj_seccpy_shm
Adds get_fobj() method to the mobj_seccpy_shm object.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| b83c0d5f | 07-Feb-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: pager: record fobj in pmem instead of area
Records the fobj backing the physical page represented by a pmem instead of struct tee_pager_area which was used prior to this patch. Each fobj can
core: pager: record fobj in pmem instead of area
Records the fobj backing the physical page represented by a pmem instead of struct tee_pager_area which was used prior to this patch. Each fobj can be used by several unrelated areas in the end allowing real shared memory between multiple user context.
Reference counting for the page tables is increasing in activity since entries which are hidden/unhidden also decrease/increase the count. This is because there's no difference between unhiding a pmem or just mapping it again in another page table.
The memory sharing is not fully taken advantage of in this patch.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 985e1822 | 07-Feb-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: pager: fix tbl_usage_count()
Fixes tbl_usage_count() to tell if a page is mapped with the more reliably attribute instead of the presence of a physical address.
Reviewed-by: Etienne Carriere
core: pager: fix tbl_usage_count()
Fixes tbl_usage_count() to tell if a page is mapped with the more reliably attribute instead of the presence of a physical address.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| a8777fc0 | 07-Feb-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: pager: add missing tzsram physical pages
init_runtime() adds the physical pages used for paging. Prior to this patch only pages covered by the memory using by the binary was added. If TZSRAM i
core: pager: add missing tzsram physical pages
init_runtime() adds the physical pages used for paging. Prior to this patch only pages covered by the memory using by the binary was added. If TZSRAM is large enough there will remain a range of physical pages after the "pageable_end" address. With this patch this last range is also added.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| f7a26db3 | 07-Feb-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: pgt_{in,de}c_used_entries() check wrapping
In pgt_inc_used_entries() and pgt_dec_used_entries() assert that pgt->num_used_entries doesn't wrap.
Reviewed-by: Etienne Carriere <etienne.carriere
core: pgt_{in,de}c_used_entries() check wrapping
In pgt_inc_used_entries() and pgt_dec_used_entries() assert that pgt->num_used_entries doesn't wrap.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| a2b67780 | 07-Feb-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: pager: don't store hidden page pa in table
When a page is hidden the associated pmem->flags is updated with PMEM_FLAG_HIDDEN. From a pmem it's also possible to derive the physical address of t
core: pager: don't store hidden page pa in table
When a page is hidden the associated pmem->flags is updated with PMEM_FLAG_HIDDEN. From a pmem it's also possible to derive the physical address of the page. This makes storing the physical address of a hidden (and possibly dirty) page redundant. So always store 0 instead of physical address of hidden pages to simplify.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| e595a5f0 | 07-Feb-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: remove TEE_MATTR_HIDDEN_*
Removes the now unused TEE_MATTR_HIDDEN_BLOCK and TEE_MATTR_HIDDEN_DIRTY_BLOCK.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wikla
core: remove TEE_MATTR_HIDDEN_*
Removes the now unused TEE_MATTR_HIDDEN_BLOCK and TEE_MATTR_HIDDEN_DIRTY_BLOCK.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| aa06d687 | 07-Feb-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: pager: fix tee_pager_unhide_page()
Prior to this patch was tee_pager_unhide_page() searching for a physical page which was used at a certain page index in an area. What wasn't checked was that
core: pager: fix tee_pager_unhide_page()
Prior to this patch was tee_pager_unhide_page() searching for a physical page which was used at a certain page index in an area. What wasn't checked was that the area in addition to the page index matched. This leads sometimes unhiding the wrong page which will result in rapid aborts in succession until the correct page has been handled. With this patch the area is also checked fixing the problem.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 53a68c38 | 07-Feb-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: pager: add pmem flags
Adds a flags field to struct tee_pager_pmem which is used to keep track of the hidden and dirty state of a physical page instead of relying on TEE_MATTR_* bits.
Reviewed
core: pager: add pmem flags
Adds a flags field to struct tee_pager_pmem which is used to keep track of the hidden and dirty state of a physical page instead of relying on TEE_MATTR_* bits.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 04752f69 | 07-Feb-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: allocate TA memory with fobj_ta_mem_alloc()
Uses fobj_ta_mem_alloc() to allocate TA memory when creating a new context.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-
core: allocate TA memory with fobj_ta_mem_alloc()
Uses fobj_ta_mem_alloc() to allocate TA memory when creating a new context.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| fbcaa411 | 07-Feb-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add fobj_sec_mem_alloc()
Adds fobj_sec_mem_alloc() which allocates physical memory from tee_mm_sec_ddr, to be used as TA memory.
Support is added in the MOBJ of with_fobj type to handle this
core: add fobj_sec_mem_alloc()
Adds fobj_sec_mem_alloc() which allocates physical memory from tee_mm_sec_ddr, to be used as TA memory.
Support is added in the MOBJ of with_fobj type to handle this new kind of fobj.
A fobj_ta_mem_alloc() macro is added to use either fobj_rw_paged_alloc() if paging of user TAs is enabled or else to use fobj_sec_mem_alloc() instead.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 5d06920a | 07-Feb-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: pager: remove useless debug print
Removes a useless debug print from tee_pager_unhide_page().
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.w
core: pager: remove useless debug print
Removes a useless debug print from tee_pager_unhide_page().
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| ca0bd72f | 07-Feb-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: remove mobj_paged_alloc()
Removes the now useless mobj_paged_alloc().
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> |
| ae02ae98 | 07-Feb-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: change tee_pager_add_uta_area() arguments
Simplifies tee_pager_add_uta_area() by taking a pointer to a struct fobj instead instead of a size. The return value is changed to a TEE_Result to har
core: change tee_pager_add_uta_area() arguments
Simplifies tee_pager_add_uta_area() by taking a pointer to a struct fobj instead instead of a size. The return value is changed to a TEE_Result to harmonize better with other functions.
vm_map() is changed to expect a mobj with an assigned fobj when paging is enabled. This requires that the pager allocations done with mobj_paged_alloc() are replaced with fobj_rw_paged_alloc().
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 71e2b567 | 07-Feb-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: change tee_pager_add_core_area() arguments
Simplifies the tee_pager_add_core_area() arguments by taking an enum tee_pager_area_type and a pointer to a struct fobj instead of the old size, flag
core: change tee_pager_add_core_area() arguments
Simplifies the tee_pager_add_core_area() arguments by taking an enum tee_pager_area_type and a pointer to a struct fobj instead of the old size, flags, store and hashes.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 2bb1139b | 07-Feb-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: pager: share fobj between areas
pager_add_uta_area() and tee_pager_add_core_area() allocates one fobj which is shared between all areas allocated during this function call.
Acked-by: Etienne
core: pager: share fobj between areas
pager_add_uta_area() and tee_pager_add_core_area() allocates one fobj which is shared between all areas allocated during this function call.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 7513149e | 07-Feb-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: remove flags argument from tee_pager_alloc()
Removes the flags argument from tee_pager_alloc() since it's only used with TEE_MATTR_LOCKED. The exception is the bignum pool, but since it still
core: remove flags argument from tee_pager_alloc()
Removes the flags argument from tee_pager_alloc() since it's only used with TEE_MATTR_LOCKED. The exception is the bignum pool, but since it still releases all locked pages each time the pool becomes unused it's efficient usage of memory.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|