qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>,
	qemu-arm@nongnu.org, qemu-devel@nongnu.org
Cc: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: Re: [PATCH v2 11/24] hw/arm/mps2-tz: Correct wrong interrupt numbers for DMA and SPI
Date: Sun, 28 Feb 2021 19:48:32 -0800	[thread overview]
Message-ID: <b6b5a8f2-1ed1-24eb-5feb-040c75b45c50@linaro.org> (raw)
In-Reply-To: <20210215115138.20465-12-peter.maydell@linaro.org>

On 2/15/21 3:51 AM, Peter Maydell wrote:
> On the MPS2 boards, the first 32 interrupt lines are entirely
> internal to the SSE; interrupt lines for devices outside the SSE
> start at 32.  In the application notes that document each FPGA image,
> the interrupt wiring is documented from the point of view of the CPU,
> so '0' is the first of the SSE's interrupts and the devices in the
> FPGA image itself are '32' and up: so the UART 0 Receive interrupt is
> 32, the SPI #0 interrupt is 51, and so on.
> 
> Within our implementation, because the external interrupts must be
> connected to the EXP_IRQ[0...n] lines of the SSE object, we made the
> get_sse_irq_in() function take an irqno whose values start at 0 for
> the first FPGA device interrupt.  In this numbering scheme the UART 0
> Receive interrupt is 0, the SPI #0 interrupt is 19, and so on.
> 
> The result of these two different numbering schemes has been that
> half of the devices were wired up to the wrong IRQs: the UART IRQs
> are wired up correctly, but the DMA and SPI devices were passing
> start-at-32 values to get_sse_irq_in() and so being mis-connected.
> 
> Fix the bug by making get_sse_irq_in() take values specified with the
> same scheme that the hardware manuals use, to avoid confusion.
> 
> Signed-off-by: Peter Maydell<peter.maydell@linaro.org>
> ---
>   hw/arm/mps2-tz.c | 24 +++++++++++++++++-------
>   1 file changed, 17 insertions(+), 7 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~



  reply	other threads:[~2021-03-01  3:49 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-15 11:51 [PATCH v2 00/24] hw/arm: New board model mps3-an524 Peter Maydell
2021-02-15 11:51 ` [PATCH v2 01/24] hw/arm/mps2-tz: Make SYSCLK frequency board-specific Peter Maydell
2021-02-20 22:42   ` Richard Henderson
2021-02-15 11:51 ` [PATCH v2 02/24] hw/misc/mps2-scc: Support configurable number of OSCCLK values Peter Maydell
2021-02-15 12:02   ` Philippe Mathieu-Daudé
2021-02-15 13:06     ` Peter Maydell
2021-03-01  2:51   ` Richard Henderson
2021-02-15 11:51 ` [PATCH v2 03/24] hw/arm/mps2-tz: Correct the OSCCLK settings for mps2-an505 and mps2-an511 Peter Maydell
2021-03-01  2:53   ` Richard Henderson
2021-02-15 11:51 ` [PATCH v2 04/24] hw/arm/mps2-tz: Make the OSCCLK settings be configurable per-board Peter Maydell
2021-03-01  2:58   ` Richard Henderson
2021-02-15 11:51 ` [PATCH v2 05/24] hw/misc/mps2-fpgaio: Make number of LEDs configurable by board Peter Maydell
2021-03-01  3:04   ` Richard Henderson
2021-02-15 11:51 ` [PATCH v2 06/24] hw/misc/mps2-fpgaio: Support SWITCH register Peter Maydell
2021-03-01  3:10   ` Richard Henderson
2021-02-15 11:51 ` [PATCH v2 07/24] hw/arm/mps2-tz: Make FPGAIO switch and LED config per-board Peter Maydell
2021-03-01  3:14   ` Richard Henderson
2021-02-15 11:51 ` [PATCH v2 08/24] hw/arm/mps2-tz: Condition IRQ splitting on number of CPUs, not board type Peter Maydell
2021-02-15 12:04   ` Philippe Mathieu-Daudé
2021-03-04  2:01   ` Richard Henderson
2021-02-15 11:51 ` [PATCH v2 09/24] hw/arm/mps2-tz: Make number of IRQs board-specific Peter Maydell
2021-03-01  3:18   ` Richard Henderson
2021-02-15 11:51 ` [PATCH v2 10/24] hw/misc/mps2-scc: Implement CFG_REG5 and CFG_REG6 for MPS3 AN524 Peter Maydell
2021-03-01  3:38   ` Richard Henderson
2021-02-15 11:51 ` [PATCH v2 11/24] hw/arm/mps2-tz: Correct wrong interrupt numbers for DMA and SPI Peter Maydell
2021-03-01  3:48   ` Richard Henderson [this message]
2021-02-15 11:51 ` [PATCH v2 12/24] hw/arm/mps2-tz: Allow PPCPortInfo structures to specify device interrupts Peter Maydell
2021-03-01  3:51   ` Richard Henderson
2021-02-15 11:51 ` [PATCH v2 13/24] hw/arm/mps2-tz: Move device IRQ info to data structures Peter Maydell
2021-03-01  4:21   ` Richard Henderson
2021-02-15 11:51 ` [PATCH v2 14/24] hw/arm/mps2-tz: Size the uart-irq-orgate based on the number of UARTs Peter Maydell
2021-03-01  4:29   ` Richard Henderson
2021-03-05 11:53   ` Philippe Mathieu-Daudé
2021-02-15 11:51 ` [PATCH v2 15/24] hw/arm/mps2-tz: Allow boards to have different PPCInfo data Peter Maydell
2021-03-01  4:37   ` Richard Henderson
2021-02-15 11:51 ` [PATCH v2 16/24] hw/arm/mps2-tz: Make RAM arrangement board-specific Peter Maydell
2021-03-01  4:41   ` Richard Henderson
2021-02-15 11:51 ` [PATCH v2 17/24] hw/arm/mps2-tz: Set MachineClass default_ram info from RAMInfo data Peter Maydell
2021-03-01  4:43   ` Richard Henderson
2021-02-15 11:51 ` [PATCH v2 18/24] hw/arm/mps2-tz: Support ROMs as well as RAMs Peter Maydell
2021-03-01  4:46   ` Richard Henderson
2021-03-05 11:53   ` Philippe Mathieu-Daudé
2021-02-15 11:51 ` [PATCH v2 19/24] hw/arm/mps2-tz: Get armv7m_load_kernel() size argument from RAMInfo Peter Maydell
2021-03-01  5:09   ` Richard Henderson
2021-02-15 11:51 ` [PATCH v2 20/24] hw/arm/mps2-tz: Add new mps3-an524 board Peter Maydell
2021-03-04  2:03   ` Richard Henderson
2021-02-15 11:51 ` [PATCH v2 21/24] hw/arm/mps2-tz: Stub out USB controller for mps3-an524 Peter Maydell
2021-03-04  2:16   ` Richard Henderson
2021-02-15 11:51 ` [PATCH v2 22/24] hw/arm/mps2-tz: Provide PL031 RTC on mps3-an524 Peter Maydell
2021-03-04  2:21   ` Richard Henderson
2021-02-15 11:51 ` [PATCH v2 23/24] docs/system/arm/mps2.rst: Document the new mps3-an524 board Peter Maydell
2021-03-04  2:25   ` Richard Henderson
2021-02-15 11:51 ` [PATCH v2 24/24] hw/arm/mps2: Update old infocenter.arm.com URLs Peter Maydell
2021-03-04  2:27   ` Richard Henderson
2021-03-05 11:55   ` Philippe Mathieu-Daudé
2021-02-15 12:27 ` [PATCH v2 00/24] hw/arm: New board model mps3-an524 no-reply
2021-03-05 11:52 ` Philippe Mathieu-Daudé

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=b6b5a8f2-1ed1-24eb-5feb-040c75b45c50@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=f4bug@amsat.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /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;
as well as URLs for NNTP newsgroup(s).