Hello Sascha, On 21.10.24 09:21, Sascha Hauer wrote: > Right now we still use PPA on LS1046a. This has long been deprecated and > replaced with TF-A. Add support for starting the TF-A on LS1046a based > boards as a first step to get rid of PPA. > +void ls1046_start_tfa(void *barebox, struct dram_regions_info *dram_info) > +{ > + void (*bl31)(void) = (void *)0xfbe00000; > + size_t bl31_size; > + void *bl31_image; > + struct bl2_to_bl31_params_mem_v2 *params; > + > + get_builtin_firmware_ext(ls1046a_bl31_bin, barebox, &bl31_image, &bl31_size); > + memcpy(bl31, bl31_image, bl31_size); > + > + sync_caches_for_execution(); > + > + /* Setup an initial stack for EL2 */ > + asm volatile("msr sp_el2, %0" : : "r" ((unsigned long)barebox - 16) : "cc"); The - 16 shouldn't be necessary, see commit 6b3dc4abd884 ("ARM: Cleanup stack offset cargo cult"). > + > + params = bl2_plat_get_bl31_params_v2(0, (uintptr_t)barebox, 0); > + params->bl31_ep_info.args.arg3 = (unsigned long)dram_info; > + > + printf("Starting bl31\n"); Make it a pr_debug? > diff --git a/firmware/Makefile b/firmware/Makefile > index 7265c55c42..9351e24e86 100644 > --- a/firmware/Makefile > +++ b/firmware/Makefile > @@ -33,6 +33,7 @@ firmware-$(CONFIG_DRIVER_NET_FSL_FMAN) += fsl_fman_ucode_ls1046_r1.0_106_4_18.bi > > firmware-$(CONFIG_ARCH_LAYERSCAPE_PPA) += ppa-ls1046a.bin > fw-external-$(CONFIG_FIRMWARE_LS1028A_ATF) += ls1028a-bl31.bin > +fw-external-$(CONFIG_FIRMWARE_LS1046A_ATF) += ls1046a-bl31.bin This should be added to test/generate-dummy-fw.sh. Documentation also needs to be updated. Cheers, Ahmad -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |