WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [TOOLS][POWERPC] oops, forgot load_elf_ke

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [TOOLS][POWERPC] oops, forgot load_elf_kernel()
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 13 Dec 2006 17:34:43 +0000
Delivery-date: Wed, 13 Dec 2006 09:37:57 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
# Node ID 95cf2e3e7e0abea620e8ce86269bf77975e8da18
# Parent  1a3c1168db6a09f939e320291c8814ec074a6cc8
[TOOLS][POWERPC] oops, forgot load_elf_kernel()
Signed-off-by: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx>
---
 tools/libxc/powerpc64/utils.c |   49 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 49 insertions(+)

diff -r 1a3c1168db6a -r 95cf2e3e7e0a tools/libxc/powerpc64/utils.c
--- a/tools/libxc/powerpc64/utils.c     Wed Oct 18 09:01:37 2006 -0400
+++ b/tools/libxc/powerpc64/utils.c     Wed Oct 18 11:29:57 2006 -0400
@@ -160,3 +160,52 @@ void *load_file(const char *path, unsign
     close(fd);
     return img;
 }
+
+int load_elf_kernel(
+    int xc_handle,
+    int domid,
+    const char *kernel_path,
+    struct domain_setup_info *dsi,
+    xen_pfn_t *page_array)
+{
+    struct load_funcs load_funcs;
+    char *kernel_img;
+    unsigned long kernel_size;
+    int rc;
+
+    /* load the kernel ELF file */
+    kernel_img = load_file(kernel_path, &kernel_size);
+    if (kernel_img == NULL) {
+        rc = -1;
+        goto out;
+    }
+
+    DPRINTF("probe_elf\n");
+    rc = probe_elf(kernel_img, kernel_size, &load_funcs);
+    if (rc < 0) {
+        rc = -1;
+        printf("%s is not an ELF file\n", kernel_path);
+        goto out;
+    }
+
+    DPRINTF("parseimage\n");
+    rc = (load_funcs.parseimage)(kernel_img, kernel_size, dsi);
+    if (rc < 0) {
+        rc = -1;
+        goto out;
+    }
+
+    DPRINTF("loadimage\n");
+    (load_funcs.loadimage)(kernel_img, kernel_size, xc_handle, domid,
+            page_array, dsi);
+
+    DPRINTF("  v_start     %016"PRIx64"\n", dsi->v_start);
+    DPRINTF("  v_end       %016"PRIx64"\n", dsi->v_end);
+    DPRINTF("  v_kernstart %016"PRIx64"\n", dsi->v_kernstart);
+    DPRINTF("  v_kernend   %016"PRIx64"\n", dsi->v_kernend);
+    DPRINTF("  v_kernentry %016"PRIx64"\n", dsi->v_kernentry);
+
+out:
+    free(kernel_img);
+    return rc;
+}

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [TOOLS][POWERPC] oops, forgot load_elf_kernel(), Xen patchbot-unstable <=