|
From: | Anthony Liguori |
Subject: | Re: [Qemu-devel] device assignment for embedded Power |
Date: | Fri, 01 Jul 2011 17:32:43 -0500 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110424 Lightning/1.0b2 Thunderbird/3.1.10 |
On 07/01/2011 11:43 AM, Scott Wood wrote:
On Fri, 1 Jul 2011 07:10:45 -0500 Anthony Liguori<address@hidden> wrote:I agree in principle but I think it should be done in a slightly different way. I think we ought to support composing a device by passthrough. For instance, something like: [physical-device "mydev"] region[0].file = "/dev/mem" region[0].guest_address = "0x42232000" region[0].file_offset = "0x23423400" region[0].size = "4096" irq[0].guest_irq = "10" irq[0].host_irq = "10" This should be independent of anything to do with device tree. This would be useful for x86 too to assign platform devices (like the HPET).That's fine, as long as there's something layered on top of it for the case where we do want to reference something in the device tree. However, we'll need to address the question of what it means to say "irq 10"
It depends on what the bus is. If you're going to declare "system bus" which is sort of what we call ISA for the PC, then it can map trivially to the interrupt controller's inputs.
-- outside of PC-land there often isn't a global IRQ numberspace that isn't a fiction created by some software layer.
PC's don't have a global IRQ number space FWIW. When we say: -device isa-serial,irq=4This really means, "ISA irq 4", which is mapped to the PIIX3 and then routed through GSI, then the APIC architecture to correspond to some interrupt for some physical CPU.
Addressing this is one of the device tree's strengths.
Not really. There's nothing magical about the device tree. It's just a guest visible description of the platform hardware that isn't probe-able in some bus framework. ACPI does exactly the same thing. I'll concede that the device tree is far nicer than ACPI but again, it's not magical :-)
Regards, Anthony Liguori
-Scott
[Prev in Thread] | Current Thread | [Next in Thread] |