[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH] hw/nios2: Update interrupt request when CR_STATUS_PIE disabl
From: |
Wu, Wentong |
Subject: |
RE: [PATCH] hw/nios2: Update interrupt request when CR_STATUS_PIE disabled |
Date: |
Tue, 16 Jun 2020 15:05:24 +0000 |
>Hi,
>On 6/12/20 3:43 PM, Wu, Wentong wrote:
> > Hi,
> >Can any body help review this patch ? Thanks in advance!
> You just sent this patch yesterday... Please give reviewers more time.
> See:
> https://wiki.qemu.org/Contribute/SubmitAPatch#Participating_in_Code_Review
> In particular:
> https://wiki.qemu.org/Contribute/SubmitAPatch#If_your_patch_seems_to_have_been_ignored
> >
> > BR
> >
> > -----Original Message-----
> > From: Wu, Wentong <wentong.wu@intel.com>
> > Sent: Thursday, June 11, 2020 4:13 PM
> > To: qemu-devel@nongnu.org
> > Cc: qemu-trivial@nongnu.org; crwulff@gmail.com; marex@denx.de;
> > thuth@redhat.com; Wu, Wentong <wentong.wu@intel.com>
> > Subject: [PATCH] hw/nios2: Update interrupt request when CR_STATUS_PIE
> > disabled
> >
> > Update interrupt request when external interupt pends for STATUS_PIE
> > disabled. Otherwise on icount enabled nios2 target there will be cpu abort
> > when guest code changes state register with wrctl instruction.
> It'd help if you provide more information, what code where you testing, how
> you ran QEMU, enough for reviewers to reproduce the issue you had and test if
> your patch indeed resolves the issue you described.
Hi,
I’m running icount mode on qemu_nios2 with customized
platform(https://github.com/zephyrproject-rtos/sdk-ng/blob/master/meta-zephyr-sdk/recipes-devtools/qemu/files/0001-qemu-nios2-Add-Altera-MAX-10-board-support-for-Zephy.patch,
almost same with 10m50_devboard) but cpu abort happened(qemu: fatal: Raised
interrupt while not in I/O function) when guest code changes state register
with wrctl instruction
add some debug code finding that it’s caused by the interrupt_request mismatch.
Hope that will be helpful.
> Regards,
> Phil.
> >
> > Signed-off-by: Wentong Wu <wentong.wu@intel.com>
> > ---
> > hw/nios2/cpu_pic.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/hw/nios2/cpu_pic.c b/hw/nios2/cpu_pic.c index
> > 1c1989d5..2abc8fa8 100644
> > --- a/hw/nios2/cpu_pic.c
> > +++ b/hw/nios2/cpu_pic.c
> > @@ -42,6 +42,8 @@ static void nios2_pic_cpu_handler(void *opaque, int irq,
> > int level)
> > } else if (!level) {
> > env->irq_pending = 0;
> > cpu_reset_interrupt(cs, type);
> > + } else {
> > + cs->interrupt_request |= type;
> > }
> > } else {
> > if (level) {
> > --
> > 2.21.3
> >
> >