Home
last modified time | relevance | path

Searched hist:b1df82f10633e8f452b30698cbef2062ddba71f6 (Results 1 – 2 of 2) sorted by relevance

/optee_os/core/mm/
H A Dvm.cb1df82f10633e8f452b30698cbef2062ddba71f6 Wed Jun 08 18:36:19 UTC 2022 Jens Wiklander <jens.wiklander@linaro.org> core: use set_um_region() to update translation tables

Adds an internal function in core/mm/vm.c which is called when
translation tables needs to be updated.

With a cache for recently used translation tables
core_mmu_populate_user_map() will only update translation tables which
are new and not populated yet.

Each user space context has a linked list of struct vm_region describing
the logical memory map. To ensure that this logical memory map is kept
in sync with the translation tables in use set_um_region() must be used
to copy the content of a struct vm_region into translation tables as
needed.

If the current context is updated then the pgts currently in use are
updated. However, if the context isn't current then the cached tables
are updated instead. When cached tables are updated some of the needed
translation tables may actually be missing. This is ignored at this
stage and later taken care of by core_mmu_populate_user_map() since
those tables will be new and have the "populated" entry set to false.
Once core_mmu_populate_user_map() has initialized tables "populated" is
set to true for each table.

Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
H A Dcore_mmu.cb1df82f10633e8f452b30698cbef2062ddba71f6 Wed Jun 08 18:36:19 UTC 2022 Jens Wiklander <jens.wiklander@linaro.org> core: use set_um_region() to update translation tables

Adds an internal function in core/mm/vm.c which is called when
translation tables needs to be updated.

With a cache for recently used translation tables
core_mmu_populate_user_map() will only update translation tables which
are new and not populated yet.

Each user space context has a linked list of struct vm_region describing
the logical memory map. To ensure that this logical memory map is kept
in sync with the translation tables in use set_um_region() must be used
to copy the content of a struct vm_region into translation tables as
needed.

If the current context is updated then the pgts currently in use are
updated. However, if the context isn't current then the cached tables
are updated instead. When cached tables are updated some of the needed
translation tables may actually be missing. This is ignored at this
stage and later taken care of by core_mmu_populate_user_map() since
those tables will be new and have the "populated" entry set to false.
Once core_mmu_populate_user_map() has initialized tables "populated" is
set to true for each table.

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