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

Re: [Xen-devel] [PATCH ARM v4 10/12] mini-os: get RAM base and size from the FDT



On 06/19/2014 09:39 AM, Thomas Leonard wrote:
> On 18 June 2014 18:38, Julien Grall <julien.grall@xxxxxxxxxx> wrote:
>> Hi Thomas,
>>
>> On 06/18/2014 04:08 PM, Thomas Leonard wrote:
>>> +        const char *device_type = fdt_getprop(device_tree, node, 
>>> "device_type", NULL);
>>> +        if (device_type && !strcmp(device_type, "memory"))
>>> +        {
>>> +            /* Note: we assume there's only a single region of memory.
>>> +             * Since Xen is already translating our "physical"
>>> +             * addresses to the real physical RAM, there's no
>>> +             * reason for it to give us multiple blocks. */
>>
>> This comment looks wrong to me. Even tho, Xen is providing a stage-2
>> translation to show you a virtual layout (your guest physical memory),
>> the new layout in Xen upstream may contain multiple banks. The first
>> bank will contain up to 3G of RAM.
> 
> Hi Julien,

Hello Thomas,

> At the Hackathon, we decided Mini-OS could always rely on Xen to
> provide the memory in a single block:
> 
> "ARM guests are allowed to assume one bank of memory. We need to
> document this in the ABI. ARM guests should assume the presence of an
> FDT."

I'm not against only supporting one bank... I pointed that your comment
is wrong and doesn't reflect this sentence.

I didn't attend to this meeting, but I guess it was meant that the guest
can assume there is always one bank of memory.

I would change your comment into:

"Xen will always provide us at least one bank of memory. Mini-os will
use the first bank for the time-being"

> http://lists.xenproject.org/archives/html/mirageos-devel/2014-06/msg00004.html
> 
> A lot of the value of running on Xen is that we only have to support a
> small number of configurations, because Xen hides the details of the
> physical hardware. I assume the only reason for using the (very
> flexible) FDT format to provide this information is that it's simpler
> for full OSs which already use FDTs.

As specified in the ABI, the guest layout may change from time to time.
Actually, the layout is not compatible between Xen 4.4 and 4.5.

Unless you want your OS tight to a Xen specific version, I don't think
we want that for mini-os. You have to correctly support FDT and retrieve
every information (MMIO, IRQ) from it.

> Is the ARM guest ABI documented somewhere?

You can find the guest layout described in xen/include/public/arch-arm.h

Regards

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.