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-ppc-devel

[XenPPC] [linux-ppc-2.6] [POWERPC][XEN][LINUX] Create a start_info_t str

To: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Subject: [XenPPC] [linux-ppc-2.6] [POWERPC][XEN][LINUX] Create a start_info_t structure from devtree if start_info_t is not passed in.
From: Xen patchbot-linux-ppc-2.6 <patchbot-linux-ppc-2.6@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 06 Feb 2007 20:20:55 +0000
Delivery-date: Tue, 06 Feb 2007 12:19:58 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Hollis Blanchard <hollisb@xxxxxxxxxx>
# Node ID a6adf094e08e95e3bacaca62284062b7c7d3591a
# Parent  ab3b5849331da89e578ae0813021376d66b7f333
[POWERPC][XEN][LINUX] Create a start_info_t structure from devtree if 
start_info_t is not passed in.
Signed-off-by: Ryan Harper <ryanh@xxxxxxxxxx>
Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx>
---
 arch/powerpc/platforms/xen/setup.c |   28 +++++++++++++++++++++++++++-
 1 files changed, 27 insertions(+), 1 deletion(-)

diff -r ab3b5849331d -r a6adf094e08e arch/powerpc/platforms/xen/setup.c
--- a/arch/powerpc/platforms/xen/setup.c        Sun Jan 21 08:36:53 2007 -0500
+++ b/arch/powerpc/platforms/xen/setup.c        Tue Feb 06 13:55:48 2007 -0600
@@ -32,6 +32,7 @@ EXPORT_SYMBOL(HYPERVISOR_shared_info);
 EXPORT_SYMBOL(HYPERVISOR_shared_info);
 
 /* Raw start-of-day parameters from the hypervisor. */
+start_info_t xsi;
 start_info_t *xen_start_info;
 
 extern struct machdep_calls mach_maple_md;
@@ -94,7 +95,32 @@ static void __init xen_init_early(void)
        xen = of_find_node_by_path("/xen");
 
        si = (u64 *)get_property(xen, "start-info", NULL);
-       xen_start_info = (start_info_t *)__va(*si);
+
+       /* build our own start_info_t if start-info property is not present */
+       if (si != NULL) {
+               xen_start_info = (start_info_t *)__va(*si);
+       } else {
+               struct device_node *console;
+               struct device_node *store;
+
+               console = of_find_node_by_path("/xen/console");
+               store = of_find_node_by_path("/xen/store");
+
+               xen_start_info = &xsi;
+
+               /* fill out start_info_t from devtree */
+               xen_start_info->shared_info = *((u64 *)get_property(xen, 
+                  "shared-info", NULL));
+               xen_start_info->store_mfn = (*((u64 *)get_property(store,
+                  "reg", NULL))) >> PAGE_SHIFT;
+               xen_start_info->store_evtchn = *((u32 *)get_property(store,
+                  "interrupts", NULL));
+               xen_start_info->console.domU.mfn = (*((u64 
*)get_property(console,
+                  "reg", NULL))) >> PAGE_SHIFT;
+               xen_start_info->console.domU.evtchn = *((u32 
*)get_property(console,
+                  "interrupts", NULL));
+       }
+
        HYPERVISOR_shared_info = __va(xen_start_info->shared_info);
 
        udbg_init_xen();

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

<Prev in Thread] Current Thread [Next in Thread>
  • [XenPPC] [linux-ppc-2.6] [POWERPC][XEN][LINUX] Create a start_info_t structure from devtree if start_info_t is not passed in., Xen patchbot-linux-ppc-2 . 6 <=