From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51917) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XIGLN-0000od-Fs for qemu-devel@nongnu.org; Fri, 15 Aug 2014 08:10:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XIGLH-0004E1-Q4 for qemu-devel@nongnu.org; Fri, 15 Aug 2014 08:10:53 -0400 Received: from os.inf.tu-dresden.de ([2002:8d4c:3001:48::99]:42941) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XIGLH-00049O-HJ for qemu-devel@nongnu.org; Fri, 15 Aug 2014 08:10:47 -0400 Date: Fri, 15 Aug 2014 14:10:43 +0200 From: Adam Lackorzynski Message-ID: <20140815121043.GA4553@os.inf.tu-dresden.de> References: <1407056027-7522-1-git-send-email-adam@os.inf.tu-dresden.de> <1407056027-7522-3-git-send-email-adam@os.inf.tu-dresden.de> <20140815120714.GA19635@cbox> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20140815120714.GA19635@cbox> Subject: Re: [Qemu-devel] [PATCH 2/3] arm_gic: SGIs for GICD_ICFGR are WI List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christoffer Dall Cc: qemu-devel@nongnu.org On Fri Aug 15, 2014 at 14:07:14 +0200, Christoffer Dall wrote: > On Sun, Aug 03, 2014 at 10:53:46AM +0200, Adam Lackorzynski wrote: > > Writes to SGIs for GICD_ICFGR register must be ignored. > > > > Signed-off-by: Adam Lackorzynski > > --- > > hw/intc/arm_gic.c | 11 +++++++---- > > 1 file changed, 7 insertions(+), 4 deletions(-) > > > > diff --git a/hw/intc/arm_gic.c b/hw/intc/arm_gic.c > > index d2b1aaf..cd6e6ea 100644 > > --- a/hw/intc/arm_gic.c > > +++ b/hw/intc/arm_gic.c > > @@ -566,10 +566,13 @@ static void gic_dist_writeb(void *opaque, hwaddr offset, > > } else { > > GIC_CLEAR_MODEL(irq + i); > > } > > - if (value & (2 << (i * 2))) { > > - GIC_SET_EDGE_TRIGGER(irq + i); > > - } else { > > - GIC_CLEAR_EDGE_TRIGGER(irq + i); > > + /* SGIs are WI */ > > They're actually WI/RAO, so we should set them to edge-triggered > somewhere or always return 1 for reads of these values as well as part > of this fix. SGIs are initialized to edge triggered in arm_gic_common_reset(), i.e. this is already the case. > > + if (irq >= 16) { > > + if (value & (2 << (i * 2))) { > > + GIC_SET_EDGE_TRIGGER(irq + i); > > + } else { > > + GIC_CLEAR_EDGE_TRIGGER(irq + i); > > + } > > } > > } > > } else if (offset < 0xf10) { > > -- > > 2.0.1 > > > > Adam -- Adam adam@os.inf.tu-dresden.de Lackorzynski http://os.inf.tu-dresden.de/~adam/