[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH v2 2/4] target/nios2: Exteral Interrupt Controller (EIC)
From: |
Amir Gonnen |
Subject: |
RE: [PATCH v2 2/4] target/nios2: Exteral Interrupt Controller (EIC) |
Date: |
Thu, 3 Mar 2022 09:54:42 +0000 |
> This looks wrong. Of course, so does nios2_cpu_set_irq, from which you've
> cribbed this.
> For our purposes, I think simply re-using env->regs[CR_IPENDING] as the
> external hw
> request word is the right thing to do. But we need to update RDCTL to
> compute the
> correct value from CR_IPENDING & CR_IENABLE, and update WRCTL to ignore
> writes.
Since you've already fixed that on " target/nios2: Rewrite interrupt handling"
patchset, I guess I'll need to rebase on it once it's merged.
Until then for my next version I plan to just keep that with a "TODO" comment.
> > + if (cpu->rnmi) {
> > + return !(env->regs[CR_STATUS] & CR_STATUS_NMI);
> > + }
> I think this should be a separate
> #define CPU_INTERRUPT_NMI CPU_INTERRUPT_TGT_EXT_0
The NMI is not a separate interrupt line. It's part of the interrupt sideband
and is set just like the Requested-Handler-Address or any other EIC field.
Could you explain why NMI should be separate? What makes it different from
other EIC fields?
Amir
- RE: [PATCH v2 2/4] target/nios2: Exteral Interrupt Controller (EIC),
Amir Gonnen <=