From owner-freebsd-mips@FreeBSD.ORG Mon Jan 5 16:47:56 2015 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 92389243 for ; Mon, 5 Jan 2015 16:47:56 +0000 (UTC) Received: from mail-ie0-f176.google.com (mail-ie0-f176.google.com [209.85.223.176]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 569D42E33 for ; Mon, 5 Jan 2015 16:47:56 +0000 (UTC) Received: by mail-ie0-f176.google.com with SMTP id tr6so19854504ieb.21 for ; Mon, 05 Jan 2015 08:47:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to; bh=bag0jbP6ZijNGERzcQVhzHD44V/jvQ/WaG84dEsqM8U=; b=V6XxlH9SsmH16IWllKtD4svpvVDh4WRTUMs9YZVRiyhBAtIMw/Pkn7cNdjDtjqslKv 5Z5fr0c/XQwtgfDj70sJGf/ml29bRVXsSgRsuwGnwh6LWcoNFW+HdDZfWPy+YeOKMyOG qu9wlt7TonpUOJA1HF4MT78MmEzWGpl3OK40lBQC6eBHsohMce9oYzwqtFXOrbHTddGL P0yGOyn8qaNAqBxJPNf3hF7mGWf0NJalhYz53Y0R0SFnhCoQnLE1V8mHr6JOpauBiitE qYH7WXG/lFoi5rNISa/aXBENuuHhDuWnRkBi729iLe6Ba6tjTEqKptXiK5rr33qzK1n9 lD3Q== X-Gm-Message-State: ALoCoQnqez6KLR0KJ9Q+zflR2X7TZm21z1CgSVv2cBOn7r4mkUgXywM/uQrO1y5Y3xdBvnmkIvE1 X-Received: by 10.107.170.98 with SMTP id t95mr79782582ioe.7.1420476081085; Mon, 05 Jan 2015 08:41:21 -0800 (PST) Received: from netflix-mac-wired.bsdimp.com ([50.253.99.174]) by mx.google.com with ESMTPSA id 5sm26807062iom.7.2015.01.05.08.41.18 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 05 Jan 2015 08:41:19 -0800 (PST) Sender: Warner Losh Subject: Re: interrupt muxes, bus memory space and other fun amusing things Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Content-Type: multipart/signed; boundary="Apple-Mail=_2A0DCA3C-28BD-4620-8D80-8CC4E9EB79BE"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b3 From: Warner Losh In-Reply-To: Date: Mon, 5 Jan 2015 09:41:17 -0700 Message-Id: <5F7CBB50-6C91-49C9-BF69-301496DDE792@bsdimp.com> References: To: Adrian Chadd X-Mailer: Apple Mail (2.1993) Cc: Warner Losh , Ian Lepore , John Baldwin , "freebsd-mips@freebsd.org" X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2015 16:47:56 -0000 --Apple-Mail=_2A0DCA3C-28BD-4620-8D80-8CC4E9EB79BE Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > So if I were Linux, I'd just implement a mux that pretends to trigger > interrupts in a much bigger IRQ space. Ie, they map IP0..IP7 to > irq0..7, then they pick another IRQ range for the AHB interrupts, and > another IRQ range for the IP2/IP3 interrupt mux. They have a > hard-coded mux that takes care of triggering the software IRQ based on > the hardware interrupt and mux register contents. >=20 > So, how should I approach this? Same way. You=E2=80=99d create an interrupt device that registers an = interrupt for the mux, then farms it out based on the contents of the registers. The MIPS interrupt handler might need some work (arm did) to allow this to happen, but it isn=E2=80=99t super difficult (though IIRc = it is tedious). Warner --Apple-Mail=_2A0DCA3C-28BD-4620-8D80-8CC4E9EB79BE Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJUqr6uAAoJEGwc0Sh9sBEADiUP/0E+HHna+qJYtDDPXDK+4VcA LZizeR3Eg1MOs58i4vBvkw4DUbJSKFQV2d3eowfh5bcZ9C7GxPin53Re0ckCG9zq W4VJgF2Pb7taZ1wEQH9R/djdX07/JGBiHE9lkVt/Z1mS4TFcQTjRXpHL29BZMO7k atswBinLFXKH0P6rTUlTNIylYaOJPWw3RkRpMMD/Li4LPQBxkBSgml86FP79oh6N h71kX3qeJSy1egzUxs2pfO6H6ksqQu7tL05hqhFcCB7KVctfKvuqVKHpDdMaZ37h HHvaq18cUl8QGsrlSrgZ1krhLvX+O9kIO0cIGqDBZctZpJO76opQfD55/YwlD0uy HGaRwzrCHnvoaI5j3uUprEF2GwfEpkS5VdY7FkjunYRjFEVLGCEwTWzgVFJ19fer ofz/PFFLF1ebby7AAlLi0e2lXYKj17d+lTJfzLD68FYHvwLILKV1/e9425ZxVeEt R60qe3iozSyMqcnfwnLF0x9N+tmZmyxLa3H/ybPg31W0y4JXwKyvMOxYoektRuXM Ne5X/7LOCj72if8pls+Ko3QJ9wEMj+VlFUUF8HnSkz/z3PELpwRONpszu3dUBHiG qc47nqPgyNP/9JHYZ+Bag919dTDnGMGUSP7lzwYKJjpAHNSdIgUAR7CEuntFlEUm TJCXMTGKOwRyk3BqtxNI =vqwO -----END PGP SIGNATURE----- --Apple-Mail=_2A0DCA3C-28BD-4620-8D80-8CC4E9EB79BE--