| 72a6827a | 28-Aug-2023 |
leisen <leisen1@huawei.com> |
core: arm: SPMC obtain device memory info from DTB
When CFG_CORE_SEL2_SPMC = y, obtain device memory info from the SP manifest DTB.
Signed-off-by: leisen <leisen1@huawei.com> Acked-by: Jens Wikland
core: arm: SPMC obtain device memory info from DTB
When CFG_CORE_SEL2_SPMC = y, obtain device memory info from the SP manifest DTB.
Signed-off-by: leisen <leisen1@huawei.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| 0bbbe306 | 13-Sep-2023 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: make core_mmu_set_secure_memory() available
Makes core_mmu_set_secure_memory() unconditionally available, but add a runtime_assert() to protect against calls without CFG_CORE_PHYS_RELOCATABLE=
core: make core_mmu_set_secure_memory() available
Makes core_mmu_set_secure_memory() unconditionally available, but add a runtime_assert() to protect against calls without CFG_CORE_PHYS_RELOCATABLE=y.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Leisen <leisen1@huawei.com> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| d4bd157e | 08-Sep-2023 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add MEM_AREA_MANIFEST_DT
Adds MEM_AREA_MANIFEST_DT for mapping an FF-A manifest FDT.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Leisen <leisen1@huawei.com> Acked-by:
core: add MEM_AREA_MANIFEST_DT
Adds MEM_AREA_MANIFEST_DT for mapping an FF-A manifest FDT.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Leisen <leisen1@huawei.com> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| 1a604375 | 01-Sep-2023 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: vm_info_final(): clear vm_info.asid only
vm_info_final() was prior to this patch clearing the entire uctx->vm_info when clearing uctx->vm_info.asid only is enough. So fix that by clearing uctx
core: vm_info_final(): clear vm_info.asid only
vm_info_final() was prior to this patch clearing the entire uctx->vm_info when clearing uctx->vm_info.asid only is enough. So fix that by clearing uctx->vm_info.asid only.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| 52a75a25 | 20-Jul-2023 |
Marouene Boubakri <marouene.boubakri@nxp.com> |
core: mm: move pgt_cache.c to core/mm
This commit moves core/arch/arm/mm/pgt_cache.c to core/mm/pgt_cache.c The implementation can be used by other architectures. The commit does not rename CFG_CORE
core: mm: move pgt_cache.c to core/mm
This commit moves core/arch/arm/mm/pgt_cache.c to core/mm/pgt_cache.c The implementation can be used by other architectures. The commit does not rename CFG_CORE_PREALLOC_EL0_TBLS flag and other depending flags (CFG_WITH_PAGER, CFG_WITH_LPAE). Therefore, an architecture implementation may set or not these flags.
Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Alvin Chang <alvinga@andestech.com>
show more ...
|
| 359c54b7 | 12-Jun-2023 |
Jose Quaresma <jose.quaresma@foundries.io> |
core: mm: Fix conflicting types due to enum/integer mismatch
This is an error with gcc13 [-Werror=enum-int-mismatch]
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Jose Quar
core: mm: Fix conflicting types due to enum/integer mismatch
This is an error with gcc13 [-Werror=enum-int-mismatch]
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
show more ...
|
| fe16b87b | 08-Jun-2023 |
Alvin Chang <alvinga@andestech.com> |
core: mm: Rename "mva" to "va" for TLB operations
The terminology "mva" is specific for older ARM architecture which has FCSE extension. To support multiple architecture, it would be good to rename
core: mm: Rename "mva" to "va" for TLB operations
The terminology "mva" is specific for older ARM architecture which has FCSE extension. To support multiple architecture, it would be good to rename "mva" to common terminology, such as "va". This PR renames "mva" to "va" in TLB operations for ARM64 and RISC-V. For ARM32, "mva" is reserved because it is really defined in ARM32's documentations.
Signed-off-by: Alvin Chang <alvinga@andestech.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| a21afdff | 11-Jun-2023 |
Alvin Chang <alvinga@andestech.com> |
core: mm: Introduce next_level field of struct core_mmu_table_info
The address translation rule is architecture specific, e.g., ARM adopts increasing style while the address is translated to finer-g
core: mm: Introduce next_level field of struct core_mmu_table_info
The address translation rule is architecture specific, e.g., ARM adopts increasing style while the address is translated to finer-grained table, while RISC-V adopts decreasing style. Therefore, we add a "next_level" field into the struct core_mmu_table_info, which represents the next finer-grained translation level. By doing this, we can decouple the core address translation rule from architecture specific manner.
Signed-off-by: Alvin Chang <alvinga@andestech.com> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 1e608aa1 | 11-Jun-2023 |
Alvin Chang <alvinga@andestech.com> |
core: mm: Introduce core_mmu_level_in_range()
Since the checking of the valid translation level is architecture specific, the core_mmu_level_in_range() is introduced and every architecture could imp
core: mm: Introduce core_mmu_level_in_range()
Since the checking of the valid translation level is architecture specific, the core_mmu_level_in_range() is introduced and every architecture could implement the function with their own translation rules.
Signed-off-by: Alvin Chang <alvinga@andestech.com> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| ab1ba412 | 02-Feb-2023 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add memory type MEM_AREA_NEX_NSEC_SHM
Adds the memory type MEM_AREA_NEX_NSEC_SHM used to map non-secure shared memory in the nexus.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
core: add memory type MEM_AREA_NEX_NSEC_SHM
Adds the memory type MEM_AREA_NEX_NSEC_SHM used to map non-secure shared memory in the nexus.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 0d928692 | 11-Apr-2023 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: support physically relocatable OP-TEE binary
With CFG_CORE_PHYS_RELOCATABLE=y enable support in OP-TEE to relocate itself to allow it to run from physical address that differs from the link ad
core: support physically relocatable OP-TEE binary
With CFG_CORE_PHYS_RELOCATABLE=y enable support in OP-TEE to relocate itself to allow it to run from physical address that differs from the link address.
This feature is currently only supported with CFG_CORE_SEL2_SPMC=y since the TEE core has to know the range of available memory. With SPMC at EL2 this is accomplished via get_sec_mem_from_manifest(). An SPMC at S-EL2 may need to load OP-TEE at a different address depending on configuration.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 75d90854 | 11-Apr-2023 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add core_mmu_set_secure_memory()
Adds core_mmu_set_secure_memory() for use with CFG_CORE_PHYS_RELOCATABLE where the secure physical memory range is determined at boot.
Reviewed-by: Etienne Ca
core: add core_mmu_set_secure_memory()
Adds core_mmu_set_secure_memory() for use with CFG_CORE_PHYS_RELOCATABLE where the secure physical memory range is determined at boot.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 5a7e4ab2 | 11-Apr-2023 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: core_mmu.c: only try to add pager vaspace when enabled
Only call add_pager_vaspace() when compiled with pager enabled to avoid redundant looping over the memory areas to map.
Reviewed-by: Eti
core: core_mmu.c: only try to add pager vaspace when enabled
Only call add_pager_vaspace() when compiled with pager enabled to avoid redundant looping over the memory areas to map.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| e09739a8 | 11-Apr-2023 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: core_mmu.c: use secure_only[] where possible
Avoid using TEE_RAM_START, TEE_RAM_PH_SIZE, TA_RAM_START, and TA_RAM_SIZE where secure_only[] can be used instead to calculate the same numbers.
R
core: core_mmu.c: use secure_only[] where possible
Avoid using TEE_RAM_START, TEE_RAM_PH_SIZE, TA_RAM_START, and TA_RAM_SIZE where secure_only[] can be used instead to calculate the same numbers.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 46417fc3 | 11-Apr-2023 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add core_mmu_get_ta_range()
Adds core_mmu_get_ta_range() to return the range of physical memory reserved for TAs.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Je
core: add core_mmu_get_ta_range()
Adds core_mmu_get_ta_range() to return the range of physical memory reserved for TAs.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 0b751ce4 | 11-Apr-2023 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add core_mmu_tee_load_pa address
Adds core_mmu_tee_load_pa for a dynamic record of where OP-TEE is loaded into memory.
With CFG_CORE_PHYS_RELOCATABLE=y core_mmu_tee_base_pa may need to be upd
core: add core_mmu_tee_load_pa address
Adds core_mmu_tee_load_pa for a dynamic record of where OP-TEE is loaded into memory.
With CFG_CORE_PHYS_RELOCATABLE=y core_mmu_tee_base_pa may need to be updated during early boot since the physical address to use isn't determined until then.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 86ce921f | 11-Apr-2023 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add core_mmu_get_secure_memory()
Adds core_mmu_get_secure_memory() with the primary purpose of being used to find out the memory range to pass to memtag_set_tags().
Signed-off-by: Jens Wiklan
core: add core_mmu_get_secure_memory()
Adds core_mmu_get_secure_memory() with the primary purpose of being used to find out the memory range to pass to memtag_set_tags().
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 439d2a89 | 11-Apr-2023 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: pass secure memory parameter to virt_init_memory()
Pass the physical secure memory range as a parameter from secure_only[]. This avoids using hard coded defines in virt_init_memory().
CFG_NS_
core: pass secure memory parameter to virt_init_memory()
Pass the physical secure memory range as a parameter from secure_only[]. This avoids using hard coded defines in virt_init_memory().
CFG_NS_VIRTUALIZATION=y depends on secure_only[] to have all memory as consecutive memory ranges, but that's unchanged behaviour from before since it was expected that the entire range from TEE_RAM_START to TA_RAM_START + TA_RAM_SIZE is usable memory.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| b1b8ad9d | 11-Apr-2023 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: core_mmu.c: use boot_mmu_config.map_offset
Use boot_mmu_config.map_offset instead of computing it with VCORE_START_VA and TEE_LOAD_ADDR.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.o
core: core_mmu.c: use boot_mmu_config.map_offset
Use boot_mmu_config.map_offset instead of computing it with VCORE_START_VA and TEE_LOAD_ADDR.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| c79fb6d4 | 11-Apr-2023 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: rename load_offset in struct core_mmu_config
Renames the field load_offset in struct core_mmu_config to the more accurate name map_offset.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro
core: rename load_offset in struct core_mmu_config
Renames the field load_offset in struct core_mmu_config to the more accurate name map_offset.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 31fabfa7 | 11-Apr-2023 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: core_mmu.c: replace register_phys_mem{_ul,}() usage
Replaces register_phys_mem_ul() and register_phys_mem() with direct calls to ADD_PHYS_MEM() for core and TA memory. This makes the code easi
core: core_mmu.c: replace register_phys_mem{_ul,}() usage
Replaces register_phys_mem_ul() and register_phys_mem() with direct calls to ADD_PHYS_MEM() for core and TA memory. This makes the code easier to read and also gives better control over supplied addresses since static initialization can be avoided.
This patch has no functional change.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| f354a5d8 | 05-Apr-2023 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
core: replace _fdt_ prefix with fdt_ for device tree API
As per upstream discussion, there is no reason to keep _fdt_ prefix. Replaces it with fdt_ for all occurrences.
Signed-off-by: Gatien Cheval
core: replace _fdt_ prefix with fdt_ for device tree API
As per upstream discussion, there is no reason to keep _fdt_ prefix. Replaces it with fdt_ for all occurrences.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| b76b2296 | 03-Feb-2023 |
Jerome Forissier <jerome.forissier@linaro.org> |
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
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>
show more ...
|
| 5a91ce76 | 27-Oct-2022 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: mm: fix error flushing unused pgt's
With commit b1df82f10633 ("core: use set_um_region() to update translation tables") a "populated" value is used for each pgt (translation table) to tell if
core: mm: fix error flushing unused pgt's
With commit b1df82f10633 ("core: use set_um_region() to update translation tables") a "populated" value is used for each pgt (translation table) to tell if it's up to date or if core_mmu_populate_user_map() should initialize it.
When a pgt becomes unused it must be marked as unused. Prior to this patch an error in the logic prevented pgt's to be marked as unused properly. This can prevent core_mmu_populate_user_map() from initializing a pgt. This can cause some new mappings to not be established properly.
So fix this by giving the correct arguments for pgt_flush_range() in rem_um_region() and core_is_buffer_inside() in pgt_entry_matches().
Fixes: b1df82f10633 ("core: use set_um_region() to update translation tables") Acked-by: Clement Faure <clement.faure@nxp.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 83ad3cdb | 27-Jun-2022 |
Jens Wiklander <jens.wiklander@linaro.org> |
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 ar
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>
show more ...
|