From owner-freebsd-arm@FreeBSD.ORG Mon Apr 22 07:55:38 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 7E8959D7 for ; Mon, 22 Apr 2013 07:55:38 +0000 (UTC) (envelope-from br@bsdpad.com) Received: from mail.bsdpad.com (mail.bsdpad.com [109.107.176.56]) by mx1.freebsd.org (Postfix) with ESMTP id 3DD1D161E for ; Mon, 22 Apr 2013 07:55:37 +0000 (UTC) Received: from br by mail.bsdpad.com with local (Exim 4.80.1) (envelope-from ) id 1UUBWY-0003Ul-Pp; Mon, 22 Apr 2013 07:50:54 +0000 Date: Mon, 22 Apr 2013 07:50:54 +0000 From: Ruslan Bukin To: Damjan Marion Subject: Re: gic.c and interrupt priority mask register (GICC_PMR) Message-ID: <20130422075054.GA6831@jail.io> References: <5171C5C6.7080907@sbcglobal.net> <17C7A0BE-43E4-422C-8E0F-11897DBB188E@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <17C7A0BE-43E4-422C-8E0F-11897DBB188E@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-arm@freebsd.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Apr 2013 07:55:38 -0000 On Sat, Apr 20, 2013 at 11:50:53PM +0200, Damjan Marion wrote: > > On Apr 20, 2013, at 12:31 AM, Thomas Skibo wrote: > > > > > Hello. > > > > I mentioned this as an aside in another email but I'd like to revisit it. > > > > My Zynq port doesn't work unless I initialize the GIC interrupt priority mask register (GICC_PMR) which I do in a hack in zy7_machdep.c. The GICC_PMR register is never touched in gic.c and I wonder how other ARM ports work without having it initialized. I figure either they use a different interrupt controller, their GIC implementation has a different reset value for the PMR, or a boot-loader sets up the register before the kernel is entered. > > > > The ARM Generic Interrupt Controller Architecture Specification (version 2.0) states that the reset value of GICC_PMR is 0 which masks all interrupts. So shouldn't gic.c initialize it to 0xff if the PMR functionality isn't used? > > > > --Thomas > > Hi Thomas, > > Makes sense. GIC is used on several platforms so i guess those implementations have different reset value. > > I can commit this if nobody objects. > Exynos4,5 have also GICC_PMR == 0 masking all interrupts by default. So it is very important to commit it. -Ruslan