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

Re: [Xen-devel] [PATCH v2] ARM/multiboot: use more flexible node naming



On 18.09.13 00:12, Ian Campbell wrote:
> On Tue, 2013-09-17 at 23:12 +0200, Andre Przywara wrote:
>> On 09/17/2013 04:53 PM, Ian Campbell wrote:
>>> On Wed, 2013-09-11 at 16:06 +0200, Andre Przywara wrote:
>>>> For the current "multiboot" on ARM support we look for a compatible
>>>> string of "xen,multiboot-module" in the device tree, and then
>>>> use "xen,linux-zimage" and "xen,linux-initrd" to differentiate
>>>> between the two supported module types.
>>>> To meet the more generic multiboot proposal in the device tree [1],
>>>> allow Xen to be more flexible in the compatible naming and also use
>>>> the new generic base name "boot,module".
>>>> The mapping to either Dom0 kernel or RAM disk works by providing a
>>>> more specific name ("xen,dom0-kernel" and "xen,ramdisk", preferably).
>>>> For compatibility reasons the older names above are still recognized.
>>>>
>>>> Changes from v1:
>>>> * whitespace / coding style fixes (sorry for that mess!)
>>>> * removed module enumeration by using module@address
>>>>    (this violates the EPAPR device tree spec).
>>>> * added __initconst to names array
>>>>
>>>> [1] http://lists.xen.org/archives/html/xen-devel/2013-09/msg00083.html
>>>>
>>>> Signed-off-by: Andre Przywara <andre.przywara@xxxxxxxxxx>
>>>> ---
>>>>   xen/common/device_tree.c | 44 
>>>> +++++++++++++++++++++++++++++++++++++-------
>>>>   1 file changed, 37 insertions(+), 7 deletions(-)
>>>>
>>>> diff --git a/xen/common/device_tree.c b/xen/common/device_tree.c
>>>> index eed77ce..3ae593f 100644
>>>> --- a/xen/common/device_tree.c
>>>> +++ b/xen/common/device_tree.c
>>>> @@ -433,22 +433,50 @@ static void __init process_cpu_node(const void *fdt, 
>>>> int node,
>>>>       cpumask_set_cpu(start, &cpu_possible_map);
>>>>   }
>>>>
>>>> +static const char * const __initconst kernel_module_names[] = {
>>>> +    "xen,linux-zimage",
>>>> +    "xen,dom0-kernel",
>>>> +    "boot,kernel",
>>>
>>> I'm wondering about this..
>>>
>>> The current "xen,linux-zimage" node does more than simply identifying
>>> the location in memory of the kernel, it actually tells us that the boot
>>> protocol used by that kernel is the Linux zImage protocol.
>>>
>>> For "xen,dom0-kernel" and "boot,kernel" we don't get that -- so how do
>>> we know how the kernel in question wants to be called?
>>
>> Good point. Yes, we could fix this by looking for magics (ARM zImage has 
>> one at 0x24, along with start and end address).
> 
> Yes, we already do that thankfully.
> 
>> Hopefully BSD has something similar or we have to use it the lack of a 
>> magic to detect those kernels.
> 
> I'm not sure, they may just be normal ELF kernels?

Right. BSD has nothing like zImage or bzImage. The kernels are normal
ELF binaries. You can use gdb on them, for example which you cannot do
with zImage or bzImage.

Christoph


_______________________________________________
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®.