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

[Xen-devel] Re: Xen refuses to load minimal dom0 kernel



Grzegorz Milos wrote:
I am trying to link a minimal Domain 0 kernel (adapted from the Mini-OS), but when Xen tries to build the Domain 0 it panics:

"Domain 0 allocation is too small for kernel image."

which is caused by the following code in xen/arch/x86/domain_build.c:

    order = get_order_from_bytes(v_end - dsi.v_start);
    if ( (1UL << order) > nr_pages )
        panic("Domain 0 allocation is too small for kernel image.\n");

The linker script I am using is adapted from the Mini-OS and links .text at 0xC0000000 + 0x100000, just like the Linux kernel does. Does any one has any hints what I am doing wrong and what this test actually checks for?

Mini-OS assumes .text at 0x0. Since you've changed that, you better make corresponding changes to VIRT_BASE and ELF_PADDR_OFFSET in mini-os/arch/x86/x86_32.S. If that does not help, could you send an output of the following printk added just before the if statement?
printk("v_start=%lx v_end=(%lx, %lx)\n", dsi.v_start, v_end, dsi.v_end);

I finally got it to work by closely following what the startup code and linker script of the Linux kernel do. Is there any documentation on what the hypervisor expects from a Domain 0 and in general how the Domain 0 environment differs from that of a DomU (e.g., memory management, console, xenbus)?

Regards,
Julian


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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