Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Jan 2014 13:49:40 +0000
From:      Julien Grall <julien.grall@linaro.org>
To:        Ian Campbell <Ian.Campbell@citrix.com>
Cc:        stefano.stabellini@eu.citrix.com, xen-devel@lists.xen.org, freebsd-xen@freebsd.org, freebsd-arm@FreeBSD.org, gibbs@freebsd.org, roger.pau@citrix.com
Subject:   Re: [RFC] Add support for Xen ARM guest on FreeBSD
Message-ID:  <52D934F4.709@linaro.org>
In-Reply-To: <1389950962.6697.33.camel@kazak.uk.xensource.com>
References:  <1389733267-20822-1-git-send-email-julien.grall@linaro.org>	 <24851B79-7EC7-4E3A-94DB-4B9B86FDFFFC@bsdimp.com>	 <52D6B62A.9000208@linaro.org> <52D73C4E.2080306@freebsd.org>	 <52D87B15.5090208@linaro.org> <1389950962.6697.33.camel@kazak.uk.xensource.com>

next in thread | previous in thread | raw e-mail | index | archive | help


On 01/17/2014 09:29 AM, Ian Campbell wrote:
> On Fri, 2014-01-17 at 00:36 +0000, Julien Grall wrote:
>>
>> On 01/16/2014 01:56 AM, Nathan Whitehorn wrote:
>>> On the subject of simple-bus, they usually aren't necessary. For
>>> example, all hypervisor devices on IBM hardware live under /vdevice,
>>> which is attached to the device tree root. They don't use MMIO, so
>>> simple-bus doesn't really make sense. How does Xen communicate with the
>>> OS in these devices?
>>> -Nathan
>>
>> As I understand, only the simple bus code (see simplebus_attach) is
>> translating the interrupts in the device on a resource.
>> So if you have a node directly attached to the root node with interrupts
>> and MMIO, the driver won't be able to retrieve and translate the
>> interrupts via bus_alloc_resources.
>
> Is the root node not considered to be a "top-level simple-bus" with a
> 1:1 mapping of MMIO and interrupts? (Linux seems to treat it this way,
> but I haven't trawled the docs for a spec reference to back that
> behaviour up). I take it BSD doesn't do this?

There is 2 different paths on FreeBSD to decode interrupt/MMIO 
(depending if you are under the root node or a simple-bus node). Most of 
the code is duplicated but there are some parts which differs (for 
instance interrupt decoding, see my answer to Nathan).

I will look at closer to the code this week-end and see if I can fix it.

-- 
Julien Grall



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?52D934F4.709>