| #
ef1ebdc2 |
| 01-Oct-2024 |
Vignesh Raghavendra <vigneshr@ti.com> |
plat-k3: Add initial support for AM62Lx SoC
AM62Lx newest among on the K3 class of SoCs designed to be low footprint system where DDR can be as small as 128M. Hence, move the DDR location to the beg
plat-k3: Add initial support for AM62Lx SoC
AM62Lx newest among on the K3 class of SoCs designed to be low footprint system where DDR can be as small as 128M. Hence, move the DDR location to the beginning of DDR right after TF-A.
Disable TI SCI, secure boot info and HW unique ID support for now, they will be incrementally at later point in time as the underlying communication layer is different than AM62x.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Dhruva Gole <d-gole@ti.com>
show more ...
|
| #
b1eb945e |
| 27-Aug-2024 |
Manorit Chawdhry <m-chawdhry@ti.com> |
plat-k3: drivers: Change SA2UL_init service to service_init_crypto
Since commit 11d8578d93f0 ("core: arm: call call_driver_initcalls() late"), driver_init is deferred and thread_update_canaries trie
plat-k3: drivers: Change SA2UL_init service to service_init_crypto
Since commit 11d8578d93f0 ("core: arm: call call_driver_initcalls() late"), driver_init is deferred and thread_update_canaries tries to get random_stack_canaries which requires the TRNG driver to be setup. Since it was being setup as part of driver_init, it lead to crash on K3 platforms.
Change driver_init to service_init_crypto which is meant to be used for initialization of crypto operations. Also, for the TISCI services to be available before service_init_crypto, change init_ti_sci invocation to early_init_late.
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Kamlesh Gurudasani <kamlesh@ti.com> Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
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 ...
|
| #
159238dd |
| 22-Nov-2023 |
Jens Wiklander <jens.wiklander@linaro.org> |
plat-k3: 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> Tested-by: Andrew Davis <afd@ti.com>
|
| #
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 ...
|
| #
31a550cb |
| 14-Jun-2023 |
Jorge Ramirez-Ortiz <jorge@foundries.io> |
plat-k3: main: Print the provisioned key information
During provisioning these values are fused using the signing certificate.
The maximum value of Key Count is 2 (when BMPK is used).
Signed-off-b
plat-k3: main: Print the provisioned key information
During provisioning these values are fused using the signing certificate.
The maximum value of Key Count is 2 (when BMPK is used).
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
c6ed64dd |
| 13-Jun-2023 |
Jorge Ramirez-Ortiz <jorge@foundries.io> |
plat-k3: main: coding standard consistency
The coding standard requires a line between function definitions.
Add such a line to make it visually consistent with the recently added secure_boot_infor
plat-k3: main: coding standard consistency
The coding standard requires a line between function definitions.
Add such a line to make it visually consistent with the recently added secure_boot_information(void).
This commit also removes a duplicated include directive.
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
19418a37 |
| 13-Jun-2023 |
Jorge Ramirez-Ortiz <jorge@foundries.io> |
plat-k3: main: Print the revision of the Secure Board Configuration
If the board is booting with hardware authentication, print the software revision.
The Software Revision is the value written to
plat-k3: main: Print the revision of the Secure Board Configuration
If the board is booting with hardware authentication, print the software revision.
The Software Revision is the value written to the OTP eFuse during board provisioning and it is only available in HS boards.
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
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 ...
|
| #
0a4589e6 |
| 18-Aug-2022 |
Andrew Davis <afd@ti.com> |
plat-k3: Add high DDR memory region
K3 devices support more than 2GB of DRAM, the extra is placed at a highmem address of 0x880000000. If memory from this area is passed to OP-TEE one will get the f
plat-k3: Add high DDR memory region
K3 devices support more than 2GB of DRAM, the extra is placed at a highmem address of 0x880000000. If memory from this area is passed to OP-TEE one will get the following error:
E/TC:1 0 std_entry_with_parg:235 Bad arg address 0x881585000
Add the highmem area to fix this.
Fixes: dfd994436ac3 ("plat-k3: Add DDR setup in k3 platform") Signed-off-by: Andrew Davis <afd@ti.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| #
de991335 |
| 10-May-2022 |
Andrew Davis <afd@ti.com> |
plat-k3: Move TI-SCI setup out of HUK function
The TI-SCI components are used for more than just the hardware unique key, move the setup out into a service_init so it is not tied to just HUK.
While
plat-k3: Move TI-SCI setup out of HUK function
The TI-SCI components are used for more than just the hardware unique key, move the setup out into a service_init so it is not tied to just HUK.
While here remove the device check for HUK, it works on all supported K3 devices.
Signed-off-by: Andrew Davis <afd@ti.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
dfd99443 |
| 12-May-2022 |
Ivan Mikhaylov <ivan.mikhaylov@siemens.com> |
plat-k3: Add DDR setup in k3 platform
This patch introduces DDR setup for possible use of CFG_CORE_DYN_SHM/dynamic shared memory on k3 platform.
Acked-by: Jerome Forissier <jerome.forissier@linaro.
plat-k3: Add DDR setup in k3 platform
This patch introduces DDR setup for possible use of CFG_CORE_DYN_SHM/dynamic shared memory on k3 platform.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Manorit Chawdhry <m-chawdhry@ti.com> Signed-off-by: Ivan Mikhaylov <ivan.mikhaylov@siemens.com>
show more ...
|
| #
e15d035e |
| 03-Mar-2022 |
Manorit Chawdhry <m-chawdhry@ti.com> |
plat-k3: Initialize Secure Storage with DKEK
K3 HS devices have a randomly generated 256 bit key written into the efuses in TI Factory. This key is called a Key Encryption Key (KEK) and is unique to
plat-k3: Initialize Secure Storage with DKEK
K3 HS devices have a randomly generated 256 bit key written into the efuses in TI Factory. This key is called a Key Encryption Key (KEK) and is unique to each device.
KEK is fed in hardware into the AES engine inside DMSC/SMS. The efuses carrying the KEK are marked as read and write protected. As a result, KEK is only accessible via the AES engine in DMSC/SMS.
System Firmware provides API to obtain a key derived from KEK(DKEK) for encryption/decryption which is accessible through TI-SCI protocol.
The DKEK will be used in K3 SOCs to initialize HUK for Secure Storage.
Adds TI_SCI_MSG_SA2UL_GET_DKEK in TISCI protocol to extract the DKEK from K3 SOCs and initialize HUK.
Further details can be found in the TISCI documentation: https://software-dl.ti.com/tisci/esd/latest/index.html
Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com> Acked-by: Andrew Davis <afd@ti.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| #
cf20f0a4 |
| 03-Mar-2022 |
Manorit Chawdhry <m-chawdhry@ti.com> |
plat-k3: drivers: Add secure proxy driver for communication with System Controller
Secure Proxy is a communication scheme in Texas Instrument's devices intended to provide an unique communication pa
plat-k3: drivers: Add secure proxy driver for communication with System Controller
Secure Proxy is a communication scheme in Texas Instrument's devices intended to provide an unique communication path from various processors in the System on Chip(SoC) to a central System Controller.
Secure Proxy instance exposes "threads" or "proxies" which is primary representation of "a" communication channel. Each thread is preconfigured by System controller configuration based on SoC usage requirements. Secure proxy by itself represents a single "queue" of communication but allows the proxies to be independently operated.
For communication with TISCI, Secure Proxy driver is required in OP-TEE.
NOTE: Secure proxy configuration is only done by System Controller, hence these are assumed to be pre-configured instances.
Provide the driver support for Secure Proxy and thread instances.
Tested on AM65x.
See AM65x Technical Reference Manual (SPRUID7E, April 2018) for further details: https://www.ti.com/lit/ug/spruid7e/spruid7e.pdf
Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com> Acked-by: Andrew Davis <afd@ti.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| #
0e501a9b |
| 12-Apr-2022 |
Andrew Davis <afd@ti.com> |
plat: arm: fix refactor GIC initialization
Commit 60801696667d ("plat: arm: refactor GIC initialization") converts functions gic_init_base_addr() and gic_init() to take physical addresses instead of
plat: arm: fix refactor GIC initialization
Commit 60801696667d ("plat: arm: refactor GIC initialization") converts functions gic_init_base_addr() and gic_init() to take physical addresses instead of virtual, but only converts half the platforms. This causes boot failure on all the others.
Convert the rest here.
Fixes: 60801696667d ("plat: arm: refactor GIC initialization") Signed-off-by: Andrew Davis <afd@ti.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> [jf: wrap lines >80 characters; cite commit using commonly used format] Signed-off-by: Jerome Forissier <jerome.forissier@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 ...
|
| #
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 ...
|
| #
e9f46c74 |
| 13-Aug-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: replace thread_nintr_handler_ptr with weak function
Removes registration of platform specific secure interrupt handler in thread_nintr_handler_ptr. Instead a __weak overridable itr_core_handle
core: replace thread_nintr_handler_ptr with weak function
Removes registration of platform specific secure interrupt handler in thread_nintr_handler_ptr. Instead a __weak overridable itr_core_handler() is provided. Platforms which expects to receive secure interrupts must override the default function. The default function calls panic() if called.
With this also nintr is removed from struct thread_handlers and consequently all platforms are updated to stop using that field.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
2dd2ca5f |
| 13-Aug-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: replace thread_std_smc_handler_ptr with weak function
Removes registration of platform specific standard SMC entry function in thread_std_smc_handler_ptr. Instead a __weak overridable tee_entr
core: replace thread_std_smc_handler_ptr with weak function
Removes registration of platform specific standard SMC entry function in thread_std_smc_handler_ptr. Instead a __weak overridable tee_entry_std() is provided. Platforms that need a special tee_entry_std() (currently on some STM platform) provides their own tee_entry_std() instead which at the end should call __tee_entry_std() which does the generic standard call handling.
With this also std_smc is removed from struct thread_handlers and consequently all platforms are updated to stop using that field.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
a5e82dc7 |
| 11-Feb-2019 |
Jerome Forissier <jerome.forissier@linaro.org> |
core_mmu: do not restrict device memory mapping to PGDIR_SIZE granularity
Device memory registered via register_phys_mem() is currently rounded up/down to CORE_MMU_PGDIR_SIZE (1 MiB, or 2 MiB for LP
core_mmu: do not restrict device memory mapping to PGDIR_SIZE granularity
Device memory registered via register_phys_mem() is currently rounded up/down to CORE_MMU_PGDIR_SIZE (1 MiB, or 2 MiB for LPAE). This is not needed and possibly incorrect for SoCs that define I/O memory maps with regions aligned on a small page (4 KiB), because using a larger granularity could result in overlaps between secure and non-secure mappings. This could cause issues depending on the type of memory firewall used by the SoC and its configuration. In any case, memory types other than MEM_AREA_IO_{SEC,NSEC} *can* be mapped with small page granularity using register_phys_mem(), so the situation is a bit inconsistent.
This commit removes the rounding by default and provides a new macro: register_phys_mem_pgdir(). Platforms that still need to use PGDIR_SIZE granularity (typically because it consumes less page table space) need to replace register_phys_mem() by register_phys_mem_pgdir().
In order to avoid any functional change in platform code, all calls to register_phys_mem() with device memory are replaced with register_phys_mem_pgdir(). In addition, CORE_MMU_DEVICE_SIZE is removed and replaced with CORE_MMU_PGDIR_SIZE since there is no unique mapping size 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>
show more ...
|
| #
940a2437 |
| 14-Nov-2016 |
Andrew F. Davis <afd@ti.com> |
Add new platform for the TI K3 class of SoCs
Add platform 'k3' for the TI K3 family. These are ARMv8 devices and are quite different from our line of existing ARMv7 OMAP style SoCs, hence the new pl
Add new platform for the TI K3 class of SoCs
Add platform 'k3' for the TI K3 family. These are ARMv8 devices and are quite different from our line of existing ARMv7 OMAP style SoCs, hence the new platform.
Signed-off-by: Andrew F. Davis <afd@ti.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|