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

[Xen-devel] [PATCH] libxc: arm: Load the zImage to the rambase address + 2MB



Currently libxc is loading the kernel zImage at rambase + 32KB (0x8000).

Kernel are usually using 1MB (or 2MB) mapping for the early page table. If
the kernel doesn't relocate itself this would require to virtual address
starting at 0xXXXX8000. This is not part of the zImage protocol, but a
convenience for Linux after the decompressor stage. Linux is able to
load at any address in the memory and it will relocate itself to respect
it own constraint.

Load the zImage at rambase address + 2MB to make life easier for other
kernel (such as FreeBSD, Mini-OS). FWIW, this is already the case for DOM0.

Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx>

---

This patch is candidate for backporting. Xen 4.4 is suitable to boot any
guest OS, but without this patch it will require some modification in the
guest kernel.

Hence, with this patch DOM0 and the guest will have the same requirement
for booting.
---
 tools/libxc/xc_dom_armzimageloader.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/libxc/xc_dom_armzimageloader.c 
b/tools/libxc/xc_dom_armzimageloader.c
index 2b28781..2cf95a5 100644
--- a/tools/libxc/xc_dom_armzimageloader.c
+++ b/tools/libxc/xc_dom_armzimageloader.c
@@ -87,7 +87,7 @@ static int xc_dom_parse_zimage32_kernel(struct xc_dom_image 
*dom)
     zimage = (uint32_t *)dom->kernel_blob;
 
     /* Do not load kernel at the very first RAM address */
-    v_start = rambase + 0x8000;
+    v_start = rambase + 0x200000;
 
     if ( dom->kernel_size > UINT64_MAX - v_start )
     {
-- 
1.7.10.4


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