From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Sascha Hauer <s.hauer@pengutronix.de>,
"open list:BAREBOX" <barebox@lists.infradead.org>
Subject: Re: [PATCH 5/9] ARM: Layerscape: LS1046a: add TF-A support
Date: Mon, 21 Oct 2024 11:12:32 +0200 [thread overview]
Message-ID: <c98d9841-8bb9-4c27-99fb-f03726add6c3@pengutronix.de> (raw)
In-Reply-To: <20241021-arm-layerscape-tfa-v1-5-0980697b6f66@pengutronix.de>
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 |
next prev parent reply other threads:[~2024-10-21 10:15 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-21 7:21 [PATCH 0/9] ARM: Layerscape: LS1046a: switch to TF-A Sascha Hauer
2024-10-21 7:21 ` [PATCH 1/9] ARM: Layerscape: TQMLS1046a: Update DDR timings Sascha Hauer
2024-10-21 7:21 ` [PATCH 2/9] ARM: Layerscape: TQMLS1046a: add support for 8GiB variant Sascha Hauer
2024-10-21 9:06 ` Ahmad Fatoum
2024-10-21 11:20 ` Sascha Hauer
2024-10-21 11:20 ` Ahmad Fatoum
2024-10-21 7:21 ` [PATCH 3/9] ARM: Layerscape: ls1046ardb: remove unused variable Sascha Hauer
2024-10-21 7:21 ` [PATCH 4/9] ARM: Layerscape: remove register arguments Sascha Hauer
2024-10-21 7:21 ` [PATCH 5/9] ARM: Layerscape: LS1046a: add TF-A support Sascha Hauer
2024-10-21 9:12 ` Ahmad Fatoum [this message]
2024-10-21 7:21 ` [PATCH 6/9] ARM: Layerscape: LS1046a-rdb: Switch to " Sascha Hauer
2024-10-21 7:21 ` [PATCH 7/9] ARM: Layerscape: TQMLS1046a: " Sascha Hauer
2024-10-21 7:21 ` [PATCH 8/9] ARM: Layerscape: LS1046a: remove PPA support Sascha Hauer
2024-10-21 8:55 ` Ahmad Fatoum
2024-10-21 14:18 ` Sascha Hauer
2024-10-22 7:46 ` Sascha Hauer
2024-10-21 7:21 ` [PATCH 9/9] ARM: Layerscape: LS1046a: add PSCI node Sascha Hauer
2024-10-21 7:33 ` Ahmad Fatoum
2024-10-21 7:57 ` Sascha Hauer
2024-10-21 8:02 ` Ahmad Fatoum
2024-10-21 8:03 ` Ahmad Fatoum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c98d9841-8bb9-4c27-99fb-f03726add6c3@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=s.hauer@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox