Date: Sat, 04 Jan 2014 09:19:20 -0500 From: Nathan Whitehorn <nwhitehorn@freebsd.org> To: freebsd-mips@freebsd.org Subject: Re: mips_pic_if branch Message-ID: <52C81868.4050408@freebsd.org> In-Reply-To: <52B997AF.70407@freebsd.org> References: <52B997AF.70407@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Has anyone had a chance to try this out? I can't continue improvement work on dev/fdt without it and its blocking some patches to support some Microtik hardware, so testing would be really appreciated. -Nathan On 12/24/13 09:18, Nathan Whitehorn wrote: > I spent a little while trying to convert MIPS to use an interrupt domain > system that is orthogonal to the bus topology. The goal, from my end, is > to clean up some hacks in dev/fdt; the code is adapted with few changes > from PowerPC, which has supported this for a while. The changes should > provide a great deal more flexibility in terms of interrupt handling, in > particular by allowing discrete PIC drivers that handle their own > interrupt setup and configuration, while simultaneously reducing code > duplication. > > The wrinkle is that I don't have any MIPS hardware and can only test in > QEMU. So I'd appreciate any tests or comments. The branch can be found at: > svn://svn.freebsd.org/base/user/nwhitehorn/mips_pic_if > > The BERI kernels I suspect are broken due to some features I could not > figure out. Everything else should, in principle, work. > > The general layout of how this works is as follows: > - An individual PIC implements a set of KOBJ methods that map an IRQ > line to an opaque "vector" number and control masking/unmasking etc. > When an interrupt is taken, either through the PIC_DISPATCH method or a > cascaded interrupt via the PIC's IRQ line, the PIC calls > mips_dispatch_intr(vector, trapframe) to trigger interrupt processing. > - Interrupt domains are mapped using an interrupt domain identifier > number (usually the iparent phandle for FDT systems) and an IRQ line. > The function mips_get_irq() returns an opaque number that uniquely > describes this interrupt system-wide. > - Each PIC registers itself using mips_register_pic() in its attach > method with the system. Note that this can happen either before or after > its child interrupts are configured -- the code in intr_machdep.c delays > all interrupt configuration until the relevant PIC device attached. > -Nathan >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?52C81868.4050408>