Date: Tue, 15 Dec 2015 00:28:30 +0000 From: Andrew Turner <andrew@fubar.geek.nz> To: Marius Strobl <marius@alchemy.franken.de> Cc: freebsd-sparc64@FreeBSD.org, freebsd-ppc@FreeBSD.org Subject: Re: Testing an Open Firmware interrupt-map patch Message-ID: <20151215002830.2531673d@zapp> In-Reply-To: <20151214234710.GA32903@alchemy.franken.de> References: <20151214134625.79283652@zapp> <20151214234710.GA32903@alchemy.franken.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 15 Dec 2015 00:47:10 +0100 Marius Strobl <marius@alchemy.franken.de> wrote: > On Mon, Dec 14, 2015 at 01:46:25PM +0000, Andrew Turner wrote: > > Hello, > > > > I'm looking for testers for a patch to update how we parse the > > interrupt-map property to follow the ePAPR spec. This property is > > commonly used with PCIe controllers. > > > > The current code doesn't take the parent address size property. When > > this is non-zero we need to also read these values. This is needed > > on an arm64 board I have as the interrupt parent has memory-mapped > > children so needs this to be set. > > > > I have a patch at [1] to add this, however would like it if this > > could be tested on other platforms using this code to check it > > doesn't break these platforms before I commit it. > > + "#address-cells", &paddrsz, sizeof(paddrsz)) == > -1) > + paddrsz = 0; /* default */ > > According to IEEE 1275-1994 (page 110) the default in case of a > "#address-cells" property is 2 (see also ofw_bus_setup_iinfo()), > with the latter also being known as the correct default value > for sparc64 machines. However both Linux and NetBSD have similar code, both assume a missing interrupt-parent #address-size property the correct value is 0. > In any case, this will have quite an impact on the offset > calculation on sparc64 machines for e. g. EBusses beneath PCI > busses (which use 3 address cells there) and, thus, most likely > will cause havoc. Maybe the parent unit address should be only > taken into account on platforms using interrupt parents? It would seem there is a difference between the encoding on Sparc64 and ePAPR. Using the the parent #address-size may lead to incorrect parsing on Sparc64, as such I will disable it there. Andrew
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20151215002830.2531673d>