summaryrefslogtreecommitdiff
path: root/plat/imx/imx8qm/imx8qm_bl31_setup.c
AgeCommit message (Collapse)Author
2020-05-07MA-17076 plat: imx8: Only save data section for cold rebootJi Luo
In some cases, the bl31 won't be reloaded when spl is not supported, commit 17de039 adds the save/restore data section to fix boot issues which is caused by the dirty data in data section of previous boot. However, sometimes the backup data section in dram won't be erased totally in board cold reboot, it will be restored and modify the 'correct' data section which will cause the board hang. This commit uses a global flag 'data_section_restore_flag' which is initialized as '0x1' and should be stored in data section to indicate the save/restore behavior. Test: cold/warm reboot on imx8qm/imx8qxp. Signed-off-by: Ji Luo <ji.luo@nxp.com>
2020-03-27TEE-532-5: plat: imx8qm: add optee supportSilvano di Ninno
Port and cleanup OP-TEE support. Signed-off-by: Silvano di Ninno <silvano.dininno@nxp.com>
2020-03-27plat: imx: Add data section restore for i.MX8 SoCs with partition rebootAnson Huang
i.MX8 SoC with SCU inside support partition reboot, the partition reboot will NOT reload the bl31.bin, so the data section could have some dirty data of previous boot up, it will impact the reboot, so need to restore the data section for partition reboot. Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
2020-03-09MA-15289-4 Integrate SCFW API lib to trustyJi Luo
Open the power domain of MU4 and assign it to secure world so trusty can call the SCFW API. Test: Get SCFW and SECO-FW by trusty. Change-Id: I6188f905426fd66072346089505fb1945e4362e3 Signed-off-by: Ji Luo <ji.luo@nxp.com> (cherry-picked from commit 4dd8919a805336c6df8a791f238e8da1830dfe7b)
2020-03-09imx8q: [trusty] Kick CAAM powerJi Luo
JR0 and JR1 of CAAM are owned by SECO, only kick the power of JR2 and JR3 here and assign the resources to be accessed by secure world. Signed-off-by: Ji Luo <ji.luo@nxp.com> (cherry picked from commit d82c0e65e74ce8b650ea3237a02249246080840d)
2020-03-09MA-11015 Support Trusty OS on imx8qm/qxpHaoran.Wang
Mapped the BL32 code into MMU due the Trusty SPD need to check the code status and decide the CPU executing mode. To reserve and protect the memory for secure world, modify the partition code to keep BL32 spaces in secure_part. Signed-off-by: Haoran.Wang <elven.wang@nxp.com> Signed-off-by: Ji Luo <ji.luo@nxp.com> Reviewed-by: Ye Li <ye.li@nxp.com> (cherry picked from commit 36ad60e46fd94eac7646218ae2b3e760bcfc33d6)
2020-03-09MA-16438 plat:imx8/imx8m: switch to xlat_tables_v2Ji Luo
spd trusty requires memory dynamic mapping feature to be enabled, so we have to use xlat table library v2 instead of v1. Test: builds. Signed-off-by: Ji Luo <ji.luo@nxp.com>
2019-12-13MLK-20986 imx8: Not protect OCRAM for rev AYe Li
On iMX8 Rev A the OCRAM is used to pass over ROM info, and u-boot needs to access it. So we can't assign the OCRAM to ATF partition. This will cause boot hang. Rev A does not support SPL, so it is ok to not protect the OCRAM. Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> (cherry picked from commit c9a168bfd16e06b4d6b9f94185910023e4923cf2)
2019-12-13imx8qm/qxp: Protect the lower 96K ocram used for SPLYe Li
Because the partition reboot won't reload the first level bootloader (SPL), the SPL won't be authenticated. Users can corrupt the SPL image to break the boot trust chain in secure boot if we don't protect that OCRAM area. This patch configures the memory area from 0x0 to 0x118000 only accessed by secure partition (ATF and OPTEE). Non-secure partitions (u-boot and kernel) can't access it. Signed-off-by: Ye Li <ye.li@nxp.com> (cherry picked from commit 1eff7d3ef6f121782e56bb1807744ede48b8580b) (cherry picked from commit 96d33120bb57895db73e669ef0aeccde0d4875d5)
2019-12-13MLK-23071: Update LPUART settings for correct behaviorTeo Hall
Update flags for expected behavior in ATF Signed-off-by: Teo Hall <teo.hall@nxp.com>
2019-12-13imx: fix partition reboot fail when debug console is enabledAnson Huang
With partition reboot enabled, console_list variable which is located in data section is NOT reset, system will be busy looping in early console operation of flush_loop() if console_list is NOT 0 while HW console is NOT initialized, so we have to clear this variable to make partition reboot work. Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
2019-12-13MA-13239 imx8qm: Touch correct pad for UART0Haoran.Wang
Due imx8qm_mek's UART0_RTS_B and UART0_CTS_0 pad reuse to be the UART2 for base bard which operated by M4_1, so don't touch these two pads in ATF. Signed-off-by: Haoran.Wang <elven.wang@nxp.com> Acked-by: Pete Zhang <pete.zhang@nxp.com>
2019-12-13imx8: postpone moving resources to non-secure partitionPeng Fan
With flash_uboot_cm4ddr in imx-mkimage, the m4 code will access ddr. However after m4 core moved to non-secure partition, the ddr memory is still in secure partition. Then m4 core will fault. So postpone moving resources including m4 core, until other resources, such as memory/pin moved to non-secure partition. Signed-off-by: Peng Fan <peng.fan@nxp.com> (cherry picked from commit 1c8ce0ad5f583ec41026d4ab5bef622f1b45aecd) (cherry picked from commit 5b026e05b8f71b3d86da0953c5ca196d5ba5cc66)
2019-01-29imx: power optimization for i.mx8qmAnson Huang
Current implementation of i.MX8QM power management related features does NOT optimize power number, all system resources like CCI, DDR, and A cluster etc. are kept in STBY mode (powered ON) when system suspend or CPU hotplug. To lower the power number, OFF mode should be adopted for those system resources whenever they can be OFF, A cluster will be OFF if the CPUs in the cluster are all off line, DDR/MU/DB can be OFF if system suspend, IRQ steer can be OFF if the wakeup source is belonged to system controller partition, so wakeup source runtime check is used to determine if IRQ steer can be OFF before system suspend. If resources are powered off for suspend, they should be restored properly after system resume. Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
2019-01-04Sanitise includes across codebaseAntonio Nino Diaz
Enforce full include path for includes. Deprecate old paths. The following folders inside include/lib have been left unchanged: - include/lib/cpus/${ARCH} - include/lib/el3_runtime/${ARCH} The reason for this change is that having a global namespace for includes isn't a good idea. It defeats one of the advantages of having folders and it introduces problems that are sometimes subtle (because you may not know the header you are actually including if there are two of them). For example, this patch had to be created because two headers were called the same way: e0ea0928d5b7 ("Fix gpio includes of mt8173 platform to avoid collision."). More recently, this patch has had similar problems: 46f9b2c3a282 ("drivers: add tzc380 support"). This problem was introduced in commit 4ecca33988b9 ("Move include and source files to logical locations"). At that time, there weren't too many headers so it wasn't a real issue. However, time has shown that this creates problems. Platforms that want to preserve the way they include headers may add the removed paths to PLAT_INCLUDES, but this is discouraged. Change-Id: I39dc53ed98f9e297a5966e723d1936d6ccf2fc8f Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2018-09-28imx8qm: imx8qx: Migrate to new interfacesAntonio Nino Diaz
- Migrate to new GIC interfaces. - Migrate to bl31_early_platform_setup2(). - Remove references to removed build options. Change-Id: Ia7c63f75325ea4b41e32a9de3f01b0007d0ae210 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2018-06-19Support for NXP's i.MX8QM SoCAnson Huang
NXP's i.MX8QM is an ARMv8 SoC with 2 clusters, 2 Cortex-A72 cores in one cluster and 4 Cortex-A53 in the other cluster, and also has system controller (Cortex-M4) inside, documentation can be found in below link: https://www.nxp.com/products/processors-and-microcontrollers/ applications-processors/i.mx-applications-processors/i.mx-8-processors:IMX8-SERIES This patch adds support for booting up SMP linux kernel (v4.9). Signed-off-by: Anson Huang <Anson.Huang@nxp.com>