Commit graph

12 commits

Author SHA1 Message Date
Madhukar Pappireddy
278b0885eb Merge changes I44537ba2,Ia12d3577,I06b3012c,Iec885405,Idab8013a into integration
* changes:
  feat(imx8mp): optionally take params from BL2
  feat(imx8mn): optionally take params from BL2
  feat(imx8mm): optionally take params from BL2
  feat(imx93): optionally take params from BL2
  feat(imx): add helper to take params from BL2
2024-05-28 16:27:53 +02:00
Salman Nabi
af3e8e63b4 refactor(console): consolidate console runtime switch
Refactor console_flush() and console_switch_state(CONSOLE_FLAG_RUNTIME)
to bl31_main(). This has been done per the recommendation in TF-A
mailing list. These calls need to be the last calls, after any runtime
initialization has been done, before BL31 exits.

All platforms that override the generic implementation of
bl31_plat_runtime_setup() have been refactored. The console_flush()
and console_switch_state() calls have been removed as they become
part of bl31_main() function.

Any platform that don't need to make any change to the generic (weak)
implementation of bl31_plat_runtime_setup() don't need to override it
in their platforms.

Change-Id: I6d04d6daa9353daeaa7e3df9e9adf6f322a917b8
Signed-off-by: Salman Nabi <salman.nabi@arm.com>
2024-05-08 15:50:58 +02:00
Salman Nabi
d3c643c2dc refactor(imx): console runtime switch on bl31 exit
Flush the FIFO before switching to runtime. This is so that there are
no lingering chars in the FIFO when we move to the runtime console.

TF-A plans to refactor the console_Switch_state(CONSOLE_FLAG_RUNTIME)
and console_flush() calls and make them the last calls in bl31_main()
(before BL31 exits). Until then they are being left as the last calls
in bl31_plat_runtime_setup() for testing before refactoring.

This patch affects the Freescale/NXP SoCs imx93, imx8qm and imx8qx.

Change-Id: Iece74579e1d15eeeb8279db0c53d74bce45545bd
Signed-off-by: Salman Nabi <salman.nabi@arm.com>
2024-05-08 15:50:58 +02:00
Sascha Hauer
02d1813e87 feat(imx93): optionally take params from BL2
Optionally take params from BL2 to offer more flexibility to BL2 on
where and if a BL32 image is expected. This uses imx_bl31_params_parse()
to check if arg0 can safely be accessed as a pointer and actually
contains a bl_params_t structure. If not, the hardcoded parameter
values are used as before.

Change-Id: Iec885405efd31a6bf6c0e6c532f8d2f31c023333
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2024-04-26 11:04:56 +02:00
Sascha Hauer
7eae1db027 feat(imx): add helper to take params from BL2
So far the i.MX BL31 doesn't take any parameters. This means the BL32
image base address and whether or not a BL32 image is used at all has to
be hardcoded in BL31.

This adds a helper function that allows to take params from BL2 safely.
On i.MX BL2 is usually U-Boot SPL which passes random values in arg0,
so make sure arg0 is within the internal SRAM range before accessing it
as a pointer. Also make sure arg0 is sufficiently aligned and the header
type and version is correct.

Change-Id: Idab8013a1d6dabf50a83c75f3e6f831de4a537e9
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2024-04-26 11:04:56 +02:00
Clement Faure
27a0be77a0 feat(imx93): add OPTEE support
Add OPTEE support for imx93 platform.
Add support for the device tree overlay.

Signed-off-by: Clement Faure <clement.faure@nxp.com>
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: I99c7819665f8f746b0dd7941fb83dbec9d8651de
2023-06-30 10:24:05 +08:00
Ye Li
f560f843bd feat(imx93): protect OPTEE memory to secure access only
Configure TRDC_NIC MRC0 to protect OPTEE DDR memory to secure
access only from A55 cores and other peripherals' masters.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: Ie5363ecff67e3183fbde998a0bba93df4c099e1f
2023-06-30 10:24:05 +08:00
Jacky Bai
422d30c626 feat(imx93): add cpuidle and basic suspend support
Add cpuidle and basic suspend support. For now only
core & cluster will be put into low power mode when
system suspend.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: Ife0b6dc48738ae7a2322d6a7f6342ffe15d35342
2023-06-30 10:24:05 +08:00
Jacky Bai
cf7ef4c762 feat(imx93): add reset & poweroff support
Add system reset & system power off support on i.MX93.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: Id180461541a1b3f73b2dc00c9cad33f484c145e6
2023-06-30 10:24:05 +08:00
Yangbo Lu
3d3b769a7c feat(imx93): allow SoC masters access to system TCM
SoC masters should be allowed to access to system TCM. For example,
This makes it possible for M core to run ENET/ENET_QOS examples whose
DMA accesses system TCM in single boot mode.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Change-Id: I4149e047e49a66699015f92c25a7f5334a972835
2023-06-30 10:24:05 +08:00
Jacky Bai
eb76a2416a feat(imx93): update the ocram trdc config for did10
Update the ocram trdc config for DID10 to make sure NPU
can access the OCRAM. Need to fine tune the OCRAM config
in the future.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Change-Id: Iaa8518e0bea2c3939292202c116bd08444e07698
2023-06-30 10:24:05 +08:00
Jacky Bai
2368d7b157 feat(imx93): add the basic support
Add the basic boot support for i.MX93.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: I48bac2fd8bf2145133edf101a315908266c3f50a
2023-06-30 10:24:05 +08:00