From owner-freebsd-arm@FreeBSD.ORG Mon Apr 22 08:31:03 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B4CEDE2C for ; Mon, 22 Apr 2013 08:31:03 +0000 (UTC) (envelope-from damjan.marion@gmail.com) Received: from mail-wi0-x22f.google.com (mail-wi0-x22f.google.com [IPv6:2a00:1450:400c:c05::22f]) by mx1.freebsd.org (Postfix) with ESMTP id 4E787174C for ; Mon, 22 Apr 2013 08:31:03 +0000 (UTC) Received: by mail-wi0-f175.google.com with SMTP id h11so3855154wiv.8 for ; Mon, 22 Apr 2013 01:31:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:content-type:mime-version:subject:from:in-reply-to:date :cc:content-transfer-encoding:message-id:references:to:x-mailer; bh=HPLSrJ97SSuqQEHxpVgimBFrmONzi8G9TjxJvi4syeM=; b=IGwAQFwHhqcs3O4W/TDB9HX9xp5YDQJmdhtoyL1WlTzycqAPLZ5pk8eJOPvCDPNo1S 9UU/ckAElucyP2mfql1szZKn7Tl5pjrx1dAjuqgUWjjLrJADGN7XqPEM07dz/TbEdldw UkuNKYOVpR40vrvhbPibKPtc78ru1OFoV1ut4Q6faPLreUt/OihdTIf39J5pcIucGGWV UDR35dyCuFq+pYwP6OqGQORT8pLiGpFXYZyTcVHmXzZpGHJD1idmezYKbYWdSWdh08qU O/X0yd2aVxDAoIQokeKUFZTPU7njx5Te8Ii9fxRdAUKly0n68ZLGoYlT4m+lBmlA7sVR E03g== X-Received: by 10.180.210.225 with SMTP id mx1mr22432544wic.15.1366619459580; Mon, 22 Apr 2013 01:30:59 -0700 (PDT) Received: from ?IPv6:2001:470:72bb::12c? ([2001:470:72bb::12c]) by mx.google.com with ESMTPS id s47sm39011666eeg.8.2013.04.22.01.30.58 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 22 Apr 2013 01:30:58 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Subject: Re: gic.c and interrupt priority mask register (GICC_PMR) From: Damjan Marion In-Reply-To: <20130422075054.GA6831@jail.io> Date: Mon, 22 Apr 2013 10:30:56 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <5171C5C6.7080907@sbcglobal.net> <17C7A0BE-43E4-422C-8E0F-11897DBB188E@gmail.com> <20130422075054.GA6831@jail.io> To: Ruslan Bukin X-Mailer: Apple Mail (2.1503) 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 08:31:03 -0000 On Apr 22, 2013, at 9:50 AM, Ruslan Bukin wrote: > On Sat, Apr 20, 2013 at 11:50:53PM +0200, Damjan Marion wrote: >>=20 >> On Apr 20, 2013, at 12:31 AM, Thomas Skibo = wrote: >>=20 >>>=20 >>> Hello. >>>=20 >>> I mentioned this as an aside in another email but I'd like to = revisit it. >>>=20 >>> 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. >>>=20 >>> 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? >>>=20 >>> --Thomas >>=20 >> Hi Thomas, >>=20 >> Makes sense. GIC is used on several platforms so i guess those = implementations have different reset value. >>=20 >> I can commit this if nobody objects. >>=20 >=20 > Exynos4,5 have also GICC_PMR =3D=3D 0 masking all interrupts by = default.=20 > So it is very important to commit it. Done in r249762 Damjan