From owner-freebsd-arm@freebsd.org Fri Aug 28 14:10:32 2015 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1A469C4A69 for ; Fri, 28 Aug 2015 14:10:32 +0000 (UTC) (envelope-from mihai.carabas@gmail.com) Received: from mail-wi0-x22c.google.com (mail-wi0-x22c.google.com [IPv6:2a00:1450:400c:c05::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8A2F61F52 for ; Fri, 28 Aug 2015 14:10:32 +0000 (UTC) (envelope-from mihai.carabas@gmail.com) Received: by wicne3 with SMTP id ne3so20750856wic.0 for ; Fri, 28 Aug 2015 07:10:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=4P/8Ni2bxUL80iFRCRptotdNL7MS2HdXoyEI0ga3ApM=; b=RhN9skftDiRz7xnYNsxTqSRekyfaqczW+cAsWrLVmxLXhATp1A2gT5Qo4P1PydpbzY /+RQZl3HpyWhw86M+1oFB2Hz+0XICKDPp6aO1TvnSuH3R5ZxeY5SppAREZnM/fO8K/7p 5LIBnI2Mq2H1WW+jSWDBr4Ft6WijzMkcOeQA3k63/qv3WAHmbHwigkvYuhv494aWCGTa SKhfauUX1VUPoePSHApBGUuhYvXjECR2vHoF04sOOUkQCPOiLAutZiDfEnvwzTJP2vvK fXJfR6DETiW4PTg+Q2beWijKNqAgspPK3c8+qlJtIhEUHQz/KQdDBibTnphPC+geyvK+ /PyQ== MIME-Version: 1.0 X-Received: by 10.194.117.70 with SMTP id kc6mr11558533wjb.13.1440771030807; Fri, 28 Aug 2015 07:10:30 -0700 (PDT) Received: by 10.28.21.132 with HTTP; Fri, 28 Aug 2015 07:10:30 -0700 (PDT) In-Reply-To: <55E05CC5.4040907@citrix.com> References: <55E05CC5.4040907@citrix.com> Date: Fri, 28 Aug 2015 17:10:30 +0300 Message-ID: Subject: Re: GIC - interrupts interpretation in DTS/FDT From: Mihai Carabas To: Julien Grall Cc: Zbigniew Bodek , "freebsd-arm@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Aug 2015 14:10:33 -0000 On Fri, Aug 28, 2015 at 4:06 PM, Julien Grall wrote: > Hi, > > On 28/08/15 09:40, Mihai Carabas wrote: > > On Fri, Aug 28, 2015 at 11:35 AM, Zbigniew Bodek > wrote: > > > >> Hello Mihai, > >> > >> This documents may be helpful: > >> > >> > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/arm/gic.txt > >> > >> The meaning of each interrupt cell (for ARM GIC) is described there. > >> > >> Thank you for pointing me out that document. > > > > The problem I was asking was specific to the FreeBSD gic code: > > """ > > 165 >------->------- * The hardware only supports active-high-level or > > rising-edge. > > 166 >------->------- */ > > 167 >------->-------if (fdt32_to_cpu(intr[2]) & 0x0a) { > > 168 >------->------->-------printf("unsupported trigger/polarity > > configuration " > > 169 >------->------->------- "0x%2x\n", fdt32_to_cpu(intr[2]) & 0x0f); > > 170 >------->------->-------return (ENOTSUP); > > 171 >------->-------} > > """ > > > > It is verified the not supported bits in both cases (PPIs and SPIs) and I > > didn't understand why. Probably a bug. > > It's a bug, based on the documentation pointed by Zbigniew this check > should > only be done for SPIs. > > I hit this problem when porting FreeBSD as Xen ARM guest because our Xen > interrupt is a PPI active-low level-sentive. I got a patch which I carry in > my branch but never took the time to upstream it: > > Did the same on my branch. But I wanted to point this out and be sure I'm not mistaking anything. May be someone will fix it on master too. Thank you all, Mihai