util: define IS_ALIGNED macroKeep a single version of the macro definition.Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>Revi
util: define IS_ALIGNED macroKeep a single version of the macro definition.Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
core_mmu: fix phys_to_virt() to check lengthphys_to_virt() function without length parameter doesn`talways have ability to find the correct mapping forrequested physical address. This is because
core_mmu: fix phys_to_virt() to check lengthphys_to_virt() function without length parameter doesn`talways have ability to find the correct mapping forrequested physical address. This is because physicaladdress can be mapped in the same time in different virtualregions with different length. So the first found regionwhich contains the requested physical address possiblydoesn`t have enough mapped data. This is fixed by addingthe length parameter to phys_to_virt() function. Lengthparameter 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 aretake 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)
marvell: upgrade from write32() to io_write32() and friendsReplace use of readX() and writeX() with io_readX() and io_writeX().The former are about to be deprecated in favor to the later.Signed-
marvell: upgrade from write32() to io_write32() and friendsReplace use of readX() and writeX() with io_readX() and io_writeX().The former are about to be deprecated in favor to the later.Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
core_mmu: do not restrict device memory mapping to PGDIR_SIZE granularityDevice memory registered via register_phys_mem() is currently roundedup/down to CORE_MMU_PGDIR_SIZE (1 MiB, or 2 MiB for LP
core_mmu: do not restrict device memory mapping to PGDIR_SIZE granularityDevice memory registered via register_phys_mem() is currently roundedup/down to CORE_MMU_PGDIR_SIZE (1 MiB, or 2 MiB for LPAE). This is notneeded and possibly incorrect for SoCs that define I/O memory maps withregions aligned on a small page (4 KiB), because using a largergranularity could result in overlaps between secure and non-securemappings. This could cause issues depending on the type of memoryfirewall used by the SoC and its configuration. In any case, memorytypes other than MEM_AREA_IO_{SEC,NSEC} *can* be mapped with small pagegranularity using register_phys_mem(), so the situation is a bitinconsistent.This commit removes the rounding by default and provides a new macro:register_phys_mem_pgdir(). Platforms that still need to use PGDIR_SIZEgranularity (typically because it consumes less page table space) needto replace register_phys_mem() by register_phys_mem_pgdir().In order to avoid any functional change in platform code, all calls toregister_phys_mem() with device memory are replaced withregister_phys_mem_pgdir(). In addition, CORE_MMU_DEVICE_SIZE is removedand replaced with CORE_MMU_PGDIR_SIZE since there is no unique mappingsize for device memory anymore.Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>Reported-by: Zeng Tao <prime.zeng@hisilicon.com>Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Add SPDX license identifiersAdds one SPDX-License-Identifier line [1] to each source files thatcontains license text.Generated by [2]: spdxify.py --add-spdx optee_os/The scancode tool [3] wa
Add SPDX license identifiersAdds one SPDX-License-Identifier line [1] to each source files thatcontains license text.Generated by [2]: spdxify.py --add-spdx optee_os/The scancode tool [3] was used to double check the license matchingcode in the Python script. All the licenses detected by scancode areeither detected by spdxify.py, or have no SPDX identifier, or are falsematches.Link: [1] https://spdx.org/licenses/Link: [2] https://github.com/jforissier/misc/blob/f7b56c8/spdxify.pyLink: [3] https://github.com/nexB/scancode-toolkitSigned-off-by: Jerome Forissier <jerome.forissier@linaro.org>Acked-by: Joakim Bech <joakim.bech@linaro.org>
plat-marvell: Add initial support for ARMADA3700Only test 64bit mode with default configuration1. Build command make PLATFORM=marvell-armada37002. Pass xtestSigned-off-by: wangwen <wangwen
plat-marvell: Add initial support for ARMADA3700Only test 64bit mode with default configuration1. Build command make PLATFORM=marvell-armada37002. Pass xtestSigned-off-by: wangwen <wangwen@marvell.comi>Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>Acked-by: Kevin Peng <kevinp@marvell.com>