qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 5/7] sysbus: Add new platform bus helper devi


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v3 5/7] sysbus: Add new platform bus helper device
Date: Mon, 29 Sep 2014 10:30:17 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1

Il 29/09/2014 10:24, Alexander Graf ha scritto:
> 
> 
> On 26.09.14 14:44, Paolo Bonzini wrote:
>> Il 26/09/2014 14:26, Alexander Graf ha scritto:
>>>
>>> Are you sure? Imagine one sysbus device includes another. We only want
>>> to look at the region the lowest sysbus device exposes, no?
>>
>> IIUC this function is used to build the device tree.
> 
> Yes, it's used to figure out the map of "start of region x of my device"
> to "offset y in the platform bus mmio space".
> 
>> Say you have 2
>> consecutive memory regions and the device tree requires separate "reg"
>> entries for them.  But because they are consecutive (or perhaps because
>> you have a PCI version of the same device that sticks them in a single
>> BAR) you use a single MMIO area at the sysbus level.
>>
>> In that case, you will use platform_bus_get_mmio_addr on the two inner
>> regions, not the outer one.
> 
> In that case, you will use platform_bus_get_mmio_addr on the outer
> region because that's what the device model exposes. The parameter to
> this function that tells us which region we want is the "mmio region
> number" that sysbus exposes.
> 
> If in device tree there are 2 reg properties, the device tree assembling
> code has to do the conversion from sysbus granularity to device tree
> granularity :).

Thanks for the clarification.  Series

Reviewed-by: Paolo Bonzini <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]