All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libxc: arm: Load the zImage to the rambase address + 2MB
@ 2014-06-30 14:05 Julien Grall
  2014-07-03 10:01 ` Ian Campbell
  0 siblings, 1 reply; 11+ messages in thread
From: Julien Grall @ 2014-06-30 14:05 UTC (permalink / raw)
  To: xen-devel; +Cc: stefano.stabellini, Julien Grall, tim, ian.campbell

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@linaro.org>

---

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

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-07-03 13:55 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-30 14:05 [PATCH] libxc: arm: Load the zImage to the rambase address + 2MB Julien Grall
2014-07-03 10:01 ` Ian Campbell
2014-07-03 10:12   ` Julien Grall
2014-07-03 10:37     ` Thomas Leonard
2014-07-03 11:12       ` Julien Grall
2014-07-03 11:19         ` Ian Campbell
2014-07-03 10:39     ` Thomas Leonard
2014-07-03 11:18       ` Ian Campbell
2014-07-03 12:21         ` Julien Grall
2014-07-03 13:54           ` Ian Campbell
2014-07-03 11:17     ` Ian Campbell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.