| #
51203030 |
| 04-Oct-2024 |
Etienne Carriere <etienne.carriere@foss.st.com> |
plat-ls: use fdt_reg_info()
Use fdt_reg_info() instead of fdt_reg_base_address() and fdt_reg_size() to optimize look up in the DT due to finding parent node.
Signed-off-by: Etienne Carriere <etienn
plat-ls: use fdt_reg_info()
Use fdt_reg_info() instead of fdt_reg_base_address() and fdt_reg_size() to optimize look up in the DT due to finding parent node.
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
55ab8f06 |
| 27-Feb-2024 |
Alvin Chang <alvinga@andestech.com> |
core: Refactor console_init() and introduce plat_console_init()
Since there are some cross-platform console drivers, we let console_init() be common code to have a chance to initialize those console
core: Refactor console_init() and introduce plat_console_init()
Since there are some cross-platform console drivers, we let console_init() be common code to have a chance to initialize those console drivers (e.g., semihosting console).
If the cross-platform console drivers are not configured to be compiled, plat_console_init() will be invoked to initialize platform-specific console driver.
Signed-off-by: Alvin Chang <alvinga@andestech.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
9e5b467d |
| 22-Nov-2023 |
Jens Wiklander <jens.wiklander@linaro.org> |
plat-ls: use gic_init_per_cpu()
Call gic_init_per_cpu() instead of the now deprecated gic_cpu_init().
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Sahil Malhotra <sahil.ma
plat-ls: use gic_init_per_cpu()
Call gic_init_per_cpu() instead of the now deprecated gic_cpu_init().
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Sahil Malhotra <sahil.malhotra@nxp.com>
show more ...
|
| #
eeca5233 |
| 11-Oct-2022 |
Carl Lamb <calamb@microsoft.com> |
core: arm: plat-ls: Add CFG_WITH_ARM_TRUSTED_FW flag
If using ARM Trusted Firmware-A, then the GIC initialization is done in BL31.
Fixes: 2b9f23923175 ("plat-ls: Add support for armv8 platform flav
core: arm: plat-ls: Add CFG_WITH_ARM_TRUSTED_FW flag
If using ARM Trusted Firmware-A, then the GIC initialization is done in BL31.
Fixes: 2b9f23923175 ("plat-ls: Add support for armv8 platform flavours") Signed-off-by: Carl Lamb <calamb@microsoft.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Sahil Malhotra <sahil.malhotra@nxp.com>
show more ...
|
| #
df913c6d |
| 02-Aug-2023 |
Alvin Chang <alvinga@andestech.com> |
core: arm: Rename primary_init_intc() to boot_primary_init_intc()
Since interrupt controllers are usually initialized in boot stage, rename primary_init_intc() to boot_primary_init_intc().
Signed-o
core: arm: Rename primary_init_intc() to boot_primary_init_intc()
Since interrupt controllers are usually initialized in boot stage, rename primary_init_intc() to boot_primary_init_intc().
Signed-off-by: Alvin Chang <alvinga@andestech.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| #
8aae4669 |
| 31-Jul-2023 |
Alvin Chang <alvinga@andestech.com> |
core: arm: Rename main_secondary_init_intc() to boot_secondary_init_intc()
main_secondary_*() is an ambiguous name since it conveys no meaning relative to the purpose of the function. Fix it by rena
core: arm: Rename main_secondary_init_intc() to boot_secondary_init_intc()
main_secondary_*() is an ambiguous name since it conveys no meaning relative to the purpose of the function. Fix it by renameing to boot_secondary_init_intc(), since interrupt controllers are always initialized in boot stage.
Signed-off-by: Alvin Chang <alvinga@andestech.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| #
ef50391e |
| 19-Jul-2023 |
Marouene Boubakri <marouene.boubakri@nxp.com> |
core: rename interrupt controller functions
This commit renames interrupt controller function names to be more generic: - Rename main_init_gic() to primary_init_intc() - Rename secondary_init_gic()
core: rename interrupt controller functions
This commit renames interrupt controller function names to be more generic: - Rename main_init_gic() to primary_init_intc() - Rename secondary_init_gic() to secondary_init_intc()
Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| #
0ee3f52e |
| 16-May-2023 |
Etienne Carriere <etienne.carriere@linaro.org> |
drivers: gic: factorize call to gic_init() or gic_init_base_addr()
Platforms call either gic_init() or gic_init_base_addr() depending on whether CFG_WITH_ARM_TRUSTED_FW is defined or not. This chang
drivers: gic: factorize call to gic_init() or gic_init_base_addr()
Platforms call either gic_init() or gic_init_base_addr() depending on whether CFG_WITH_ARM_TRUSTED_FW is defined or not. This change factorize this logic from gic_init() implementation and makes gic_init_base_addr() local to gic.c.
For that purpose functions gic_init_base_address() and gic_dt_get_irq() are moved inside gic.c source file. source file.
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
67e55c51 |
| 16-May-2023 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: define main interrupt controller data from its driver
All but one platforms define CPU core interrupt controller from their platform main.c source file next to its main interrupt handler. This
core: define main interrupt controller data from its driver
All but one platforms define CPU core interrupt controller from their platform main.c source file next to its main interrupt handler. This change factorize these implementation by moving the definition of the controller data instance straight in the controller driver source file. This change makes each controller driver to implement straight itr_core_handler() function, preventing a extra branch on interrupt execution. Interrupt controller driver initialization function now straight calls itr_core_init().
This changes treats case when CFG_CORE_WORKAROUND_ARM_NMFI is enable to not conflict with core/arch/arm/kernel/thread.c that already overrides itr_core_handler() weak implementation.
With this change, the main controller initialization function (gic_init(), gic_init_base_addr(), gic_cpu_init() and hfic_init()) no more gets the controller data as input argument.
As a consequence, definition of struct hfic_data and struct gic_data moves from their respective driver header file to the respective driver source file.
As a consequence, gic_dump() no more requires an argument.
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@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 ...
|
| #
60801696 |
| 15-Feb-2022 |
Volodymyr Babchuk <volodymyr_babchuk@epam.com> |
plat: arm: refactor GIC initialization
All platforms (except STM32MP1) follow the same pattern during GIC initialization: get virtual addresses for distributor (and optionally, for CPU interface), c
plat: arm: refactor GIC initialization
All platforms (except STM32MP1) follow the same pattern during GIC initialization: get virtual addresses for distributor (and optionally, for CPU interface), check that they are not NULL, call either gic_init() or gic_init_base_addr().
We can move most of this logic into gic_init_base_addr(), while platform-specific code will supply only base physical addresses for distributor and CPU interface. This will simplify and align platform code.
ST32MP1 had more complex logic, as it used io_pa_or_va_secure() to get MMIO range addresses. However, as main_init_gic() called assert(cpu_mmu_enabled()), there is no sense in using io_pa_or_va_secure(), because we already ensured that VA will be always used. Thus assert() call was moved to gic_init_base_addr(), and STM32MP1 were aligned with other platforms.
Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
45800c40 |
| 23-Dec-2020 |
Sahil Malhotra <sahil.malhotra@nxp.com> |
core: ls: fix GIC offset for ls1043a rev1 and rev1.1
GIC offsets are different on ls1043a depending of the SoC revision 1 or 1.1
Signed-off-by: Sahil Malhotra <sahil.malhotra@nxp.com> Signed-off-by
core: ls: fix GIC offset for ls1043a rev1 and rev1.1
GIC offsets are different on ls1043a depending of the SoC revision 1 or 1.1
Signed-off-by: Sahil Malhotra <sahil.malhotra@nxp.com> Signed-off-by: Clement Faure <clement.faure@nxp.com> Acked-by: Jerome Forissier <jerome@forissier.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
df7cecc0 |
| 03-Nov-2021 |
Lionel Debieve <lionel.debieve@foss.st.com> |
core: kernel: use size_t instead of ssize_t for _fdt_reg_size()
Size is read from the reg device tree property as an unsigned value coming from fdt32_to_cpu(). Use a size_t with associated error cod
core: kernel: use size_t instead of ssize_t for _fdt_reg_size()
Size is read from the reg device tree property as an unsigned value coming from fdt32_to_cpu(). Use a size_t with associated error code DT_INFO_INVALID_REG_SIZE as return in prototype. Update the current users according to this change.
Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
c2e4eb43 |
| 23-May-2021 |
Anton Rybakov <a.rybakov@omp.ru> |
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
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 doesn`t 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)
show more ...
|
| #
203ee23d |
| 20-Apr-2021 |
Sahil Malhotra <sahil.malhotra@nxp.com> |
core: plat-ls: get HW unique key using OP-TEE CAAM driver
Previously HW Unique key on LS platforms came through ATF via SMC, since we have CAAM driver available in OP-TEE itself, will use that direc
core: plat-ls: get HW unique key using OP-TEE CAAM driver
Previously HW Unique key on LS platforms came through ATF via SMC, since we have CAAM driver available in OP-TEE itself, will use that directly from now on.
Signed-off-by: Sahil Malhotra <sahil.malhotra@nxp.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
1c2924e5 |
| 04-Feb-2021 |
Sahil Malhotra <sahil.malhotra@nxp.com> |
core: ls: lx2160aqds: get GIC base address from dtb
CFG_EMBED_DT option is enabled by default for LX2160A-QDS GIC base address was hardcoded for LX2160A-QDS, now will get the base address from dtb f
core: ls: lx2160aqds: get GIC base address from dtb
CFG_EMBED_DT option is enabled by default for LX2160A-QDS GIC base address was hardcoded for LX2160A-QDS, now will get the base address from dtb file.
Signed-off-by: Sahil Malhotra <sahil.malhotra@nxp.com> Acked-by: Jerome Forissier <jerome@forissier.org>
show more ...
|
| #
1a121401 |
| 03-Jun-2020 |
Manish Tomar <manish.tomar@nxp.com> |
core: ls: add LX2160A-QDS platform
Add support for Layerscape® LX2160A-QDS from NXP. Dynamic shared memory is also enabled.
Signed-off-by: Manish Tomar <manish.tomar@nxp.com> Signed-off-by: Sahil M
core: ls: add LX2160A-QDS platform
Add support for Layerscape® LX2160A-QDS from NXP. Dynamic shared memory is also enabled.
Signed-off-by: Manish Tomar <manish.tomar@nxp.com> Signed-off-by: Sahil Malhotra <sahil.malhotra@nxp.com> Acked-by: Jerome Forissier <jerome@forissier.org>
show more ...
|
| #
a10b1b23 |
| 03-Feb-2021 |
Sahil Malhotra <sahil.malhotra@nxp.com> |
core: ls: lx2160ardb: get GIC base address from dtb
CFG_EMBED_DT option is enabled by default for LX2160A-RDB GIC base address was hardcoded for LX2160A-RDB, now will get the base address from dtb f
core: ls: lx2160ardb: get GIC base address from dtb
CFG_EMBED_DT option is enabled by default for LX2160A-RDB GIC base address was hardcoded for LX2160A-RDB, now will get the base address from dtb file.
Signed-off-by: Sahil Malhotra <sahil.malhotra@nxp.com> Acked-by: Jerome Forissier <jerome@forissier.org>
show more ...
|
| #
04f3ad1b |
| 22-May-2020 |
Ruchika Gupta <ruchika.gupta@nxp.com> |
core: ls: Remove GIC initialization for ARM-TF based platforms
On ARMv8, GIC configuration is initialized in ARM-TF
Signed-off-by: Ruchika Gupta <ruchika.gupta@nxp.com> Signed-off-by: Sahil Malhotr
core: ls: Remove GIC initialization for ARM-TF based platforms
On ARMv8, GIC configuration is initialized in ARM-TF
Signed-off-by: Ruchika Gupta <ruchika.gupta@nxp.com> Signed-off-by: Sahil Malhotra <sahil.malhotra@nxp.com> Acked-by: Jerome Forissier <jerome@forissier.org>
show more ...
|
| #
a8a14b78 |
| 24-Apr-2020 |
Ruchika Gupta <ruchika.gupta@nxp.com> |
core: ls: lx2160ardb: Add regions for dynamic shared memory
To enable use of dynamic shared memory, DDR regions need to be added in the platform MMU map.
Signed-off-by: Ruchika Gupta <ruchika.gupta
core: ls: lx2160ardb: Add regions for dynamic shared memory
To enable use of dynamic shared memory, DDR regions need to be added in the platform MMU map.
Signed-off-by: Ruchika Gupta <ruchika.gupta@nxp.com> Signed-off-by: Sahil Malhotra <sahil.malhotra@nxp.com> Acked-by: Jerome Forissier <jerome@forissier.org>
show more ...
|
| #
e989a6c4 |
| 01-Feb-2021 |
Sahil Malhotra <sahil.malhotra@nxp.com> |
console: lx2160A: fix uart clock and baud rate
Currently there are garbled messages from OP-TEE due to assumption that platform clock is always 700MHz. This is not correct as LX2 supports variable p
console: lx2160A: fix uart clock and baud rate
Currently there are garbled messages from OP-TEE due to assumption that platform clock is always 700MHz. This is not correct as LX2 supports variable platform frequency. It could be one of the 600, 650, 700, 750 Mhz based on the RCW configuration.
Ideally OPTEE should read RCW registers from Global Utilities Register block and derive the uart clock based on platform pll frequency. But there is no need for this as Baud Rate is already configured in PL011 by the previous boot stages in TF-A. This fix calls pl011_init() with zero for baud rate => It won't be reinitalized in OP-TEE.
Signed-off-by: Thirupathaiah Annapureddy <thiruan@linux.microsoft.com> Signed-off-by: Sahil Malhotra <sahil.malhotra@nxp.com> Acked-by: Jerome Forissier <jerome@forissier.org>
show more ...
|
| #
1eacd17c |
| 25-Aug-2020 |
Sumit Garg <sumit.garg@linaro.org> |
drivers: ns16550: Allow customizable serial IO config
Add io_width and reg_shift configurable parameters to struct ns16550_data in order to support 32 bit register read/write.
Signed-off-by: Sumit
drivers: ns16550: Allow customizable serial IO config
Add io_width and reg_shift configurable parameters to struct ns16550_data in order to support 32 bit register read/write.
Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Reviewed-by: Jerome Forissier <jerome@forissier.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
651d7537 |
| 07-Jun-2020 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: remove boot_get_handlers()
struct thread_handlers is used to pass the entry functions for different power management events. In practice only .cpu_on is used and with the default function at t
core: remove boot_get_handlers()
struct thread_handlers is used to pass the entry functions for different power management events. In practice only .cpu_on is used and with the default function at that. In the ARMv7 case where the secure monitor replaces TF-A not even that function entry is used.
Remove struct thread_handlers and boot_get_handlers(). When configured with TF-A initialize thread_*_handler_ptr with __weak default functions.
The __weak default PM functions - thread_cpu_off_handler() - thread_cpu_suspend_handler() - thread_cpu_resume_handler() - thread_system_off_handler() - thread_system_reset_handler() can be overridden by platforms when needed.
Reviewed-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
65401337 |
| 07-Jun-2020 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: remove generic_ from generic_boot
Now that the CFG_GENERIC_BOOT configuration flag has been removed also remove "generic_" prefix from and in the related files.
Acked-by: Etienne Carriere <et
core: remove generic_ from generic_boot
Now that the CFG_GENERIC_BOOT configuration flag has been removed also remove "generic_" prefix from and in the related files.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
665fa256 |
| 20-Nov-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add plat_primary_init_early()
Adds plat_primary_init_early() which replaces plat_cpu_reset_late(). plat_cpu_reset_late() was called for each cpu, but plat_primary_init_early() is only called o
core: add plat_primary_init_early()
Adds plat_primary_init_early() which replaces plat_cpu_reset_late(). plat_cpu_reset_late() was called for each cpu, but plat_primary_init_early() is only called on the primary cpu.
In practice that's not a problem (except for plat-stm, more on that later) since all the platform specific plat_cpu_reset_late() only does something if get_core_pos() returns 0, that is on the primary cpu.
On plat-stm SCR is now updated in plat_cpu_reset_early() instead.
This patch is needed because ASLR may relocate OP-TEE to a virtual base address which differs from the physical base address. This means that it's not possible to execute C code before MMU has been enabled.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|