qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mps3-an547: Add missing user ahb interfaces
@ 2022-02-10 21:02 Jimmy Brisson
  2022-02-24 10:18 ` Peter Maydell
  0 siblings, 1 reply; 2+ messages in thread
From: Jimmy Brisson @ 2022-02-10 21:02 UTC (permalink / raw)
  Cc: Peter Maydell, open list:MPS2, open list:All patches CC here,
	Jimmy Brisson

With these interfaces missing, TFM would delegate peripherals 0, 1,
2, 3 and 8, and qemu would ignore the delegation of interface 8, as
it thought interface 4 was eth & USB.

This patch corrects this behavior and allows TFM to delegate the
eth & USB peripheral to NS mode.

Signed-off-by: Jimmy Brisson <jimmy.brisson@linaro.org>
---
 hw/arm/mps2-tz.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/hw/arm/mps2-tz.c b/hw/arm/mps2-tz.c
index f40e854dec..e287ad4d06 100644
--- a/hw/arm/mps2-tz.c
+++ b/hw/arm/mps2-tz.c
@@ -1078,6 +1078,10 @@ static void mps2tz_common_init(MachineState *machine)
                 { "gpio1", make_unimp_dev, &mms->gpio[1], 0x41101000, 0x1000 },
                 { "gpio2", make_unimp_dev, &mms->gpio[2], 0x41102000, 0x1000 },
                 { "gpio3", make_unimp_dev, &mms->gpio[3], 0x41103000, 0x1000 },
+                { /* port 4 USER AHB interface 0 */ },
+                { /* port 5 USER AHB interface 1 */ },
+                { /* port 6 USER AHB interface 2 */ },
+                { /* port 7 USER AHB interface 3 */ },
                 { "eth-usb", make_eth_usb, NULL, 0x41400000, 0x200000, { 49 } },
             },
         },
-- 
2.33.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mps3-an547: Add missing user ahb interfaces
  2022-02-10 21:02 [PATCH] mps3-an547: Add missing user ahb interfaces Jimmy Brisson
@ 2022-02-24 10:18 ` Peter Maydell
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Maydell @ 2022-02-24 10:18 UTC (permalink / raw)
  To: Jimmy Brisson; +Cc: open list:MPS2, open list:All patches CC here

On Thu, 10 Feb 2022 at 21:02, Jimmy Brisson <jimmy.brisson@linaro.org> wrote:
>
> With these interfaces missing, TFM would delegate peripherals 0, 1,
> 2, 3 and 8, and qemu would ignore the delegation of interface 8, as
> it thought interface 4 was eth & USB.
>
> This patch corrects this behavior and allows TFM to delegate the
> eth & USB peripheral to NS mode.
>
> Signed-off-by: Jimmy Brisson <jimmy.brisson@linaro.org>
> ---
>  hw/arm/mps2-tz.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/hw/arm/mps2-tz.c b/hw/arm/mps2-tz.c
> index f40e854dec..e287ad4d06 100644
> --- a/hw/arm/mps2-tz.c
> +++ b/hw/arm/mps2-tz.c
> @@ -1078,6 +1078,10 @@ static void mps2tz_common_init(MachineState *machine)
>                  { "gpio1", make_unimp_dev, &mms->gpio[1], 0x41101000, 0x1000 },
>                  { "gpio2", make_unimp_dev, &mms->gpio[2], 0x41102000, 0x1000 },
>                  { "gpio3", make_unimp_dev, &mms->gpio[3], 0x41103000, 0x1000 },
> +                { /* port 4 USER AHB interface 0 */ },
> +                { /* port 5 USER AHB interface 1 */ },
> +                { /* port 6 USER AHB interface 2 */ },
> +                { /* port 7 USER AHB interface 3 */ },
>                  { "eth-usb", make_eth_usb, NULL, 0x41400000, 0x200000, { 49 } },
>              },

Yes; we implemented this against the revision B of the AN547
AppNote, which had an error in the relevant table. Revision C
of the AppNote corrects the docs to follow the FPGA image behaviour,
which is to have eth-usb on port 8. (I sent a patch the other day
that updates the URL in this source file to point to the latest
pdf rather than the old rev B.)

Applied to target-arm.next, thanks.

-- PMM


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-02-24 10:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-10 21:02 [PATCH] mps3-an547: Add missing user ahb interfaces Jimmy Brisson
2022-02-24 10:18 ` Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).