[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH for-7.1 v6 44/51] target/nios2: Implement EIC interrupt proce
|
From: |
Peter Maydell |
|
Subject: |
Re: [PATCH for-7.1 v6 44/51] target/nios2: Implement EIC interrupt processing |
|
Date: |
Thu, 17 Mar 2022 19:11:10 +0000 |
On Thu, 17 Mar 2022 at 05:51, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> This is the cpu side of the operation. Register one irq line,
> called EIC. Split out the rather different processing to a
> separate function.
>
> Delay initialization of gpio irqs until realize. We need to
> provide a window after init in which the board can set eic_present.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> diff --git a/target/nios2/helper.c b/target/nios2/helper.c
> index bf40cff779..00f27165d9 100644
> --- a/target/nios2/helper.c
> +++ b/target/nios2/helper.c
> @@ -57,6 +57,9 @@ static void do_exception(Nios2CPU *cpu, uint32_t
> exception_addr,
> uint32_t old_status = env->ctrl[CR_STATUS];
> uint32_t new_status = old_status;
>
> + /* With shadow regs, exceptions are always taken into CRS 0. */
Hmm. Table 3-9 agrees with this, saying that CRS is set to 0 for
non-interrupt exceptions, but Table 3-38 disagrees -- it has status.CRS
listed as "No change" for non-interrupt exceptions... 3-9 seems to
be backed up by other text, so let's go with that.
> + new_status &= ~R_CR_STATUS_CRS_MASK;
We're missing the "copy status.CRS to status.PRS" part of
taking an exception, I think ?
thanks
-- PMM
- [PATCH for-7.1 v6 40/51] linux-user/nios2: Handle various SIGILL exceptions, (continued)
- [PATCH for-7.1 v6 40/51] linux-user/nios2: Handle various SIGILL exceptions, Richard Henderson, 2022/03/17
- [PATCH for-7.1 v6 41/51] target/nios2: Introduce shadow register sets, Richard Henderson, 2022/03/17
- [PATCH for-7.1 v6 42/51] target/nios2: Implement rdprs, wrprs, Richard Henderson, 2022/03/17
- [PATCH for-7.1 v6 43/51] target/nios2: Update helper_eret for shadow registers, Richard Henderson, 2022/03/17
- [PATCH for-7.1 v6 44/51] target/nios2: Implement EIC interrupt processing, Richard Henderson, 2022/03/17
- Re: [PATCH for-7.1 v6 44/51] target/nios2: Implement EIC interrupt processing,
Peter Maydell <=
- [PATCH for-7.1 v6 46/51] hw/nios2: Introduce Nios2MachineState, Richard Henderson, 2022/03/17
- [PATCH for-7.1 v6 45/51] hw/intc: Vectored Interrupt Controller (VIC), Richard Henderson, 2022/03/17
- [PATCH for-7.1 v6 50/51] test/tcg/nios2: Add semihosting multiarch tests, Richard Henderson, 2022/03/17
- [PATCH for-7.1 v6 51/51] tests/tcg/nios2: Add test-shadow-1, Richard Henderson, 2022/03/17
- [PATCH for-7.1 v6 47/51] hw/nios2: Move memory regions into Nios2Machine, Richard Henderson, 2022/03/17
- [PATCH for-7.1 v6 48/51] hw/nios2: Machine with a Vectored Interrupt Controller, Richard Henderson, 2022/03/17
- [PATCH for-7.1 v6 49/51] tests/tcg: Expose AR to test build environment if needed, Richard Henderson, 2022/03/17
- RE: [PATCH for-7.1 v6 00/51] target/nios2: Shadow register set, EIC and VIC, Amir Gonnen, 2022/03/22