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
_______________________________________________
freebsd-xen@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-xen
To unsubscribe, send any mail to "freebsd-xen-unsubscr...@freebsd.org"

Reply via email to