From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH 16/16] HACK: xen: arm: map PCI controller ranges region MMIOs to dom0. Date: Thu, 21 Nov 2013 15:42:31 +0000 Message-ID: <528E29E7.9070403@linaro.org> References: <1384958746.6071.64.camel@kazak.uk.xensource.com> <1384958897-13074-16-git-send-email-ian.campbell@citrix.com> <528E197D.10802@linaro.org> <1385045846.6071.158.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1385045846.6071.158.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: pranavkumar@linaro.org, stefano.stabellini@eu.citrix.com, tim@xen.org, Anup Patel , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 11/21/2013 02:57 PM, Ian Campbell wrote: > On Thu, 2013-11-21 at 14:32 +0000, Julien Grall wrote: >> >> On 11/20/2013 02:48 PM, Ian Campbell wrote: >>> The ranges property of a node with device_type = "pci" is defined in ePAPR >>> 2.3.8. Map the appropriate MMIO regions through to dom0. >>> >>> This is a hack/PoC since it actually crashes for some reason. Hence it >>> contains a hacked in hardcoded list suitable for Xgene while I figure this >>> out. >>> >>> This should also eventually handle the interrupt-map and (ePAPR 2.4.3.1) and >>> possibly dma-ranges (ePAPR 2.3.9) and msi-ranges (unspeciifed?) too. >> >> >> For pci ranges, you can add a new bus in dt_bues. So you won't need >> specific code in domain_build.c and we will be able to use it later. >> You can take a look to linux/drivers/of/address.c > > Won't we still need to handle the resulting extra MMIO addresses which > are not part of the reg region? Which MMIO addresses are you talking about? I though all the ranges are described by "reg"? If the modification is too hard to implement for Xen 4.4, you can implement specific_mapping callback for APM. > >> Mapping interrupt should be OK. I don't see any reason that will fail >> with the current code because IRQ are all under the GIC controller. > > We need to parse interrupt-map because the child interrupts are not > listed in the regular interrupts property. Right, I didn't notice that the interrupt-map is difference for pci. -- Julien Grall