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

RE: [XenPPC] Changeset with 3 files on Friday (I think) has brokenXen on

To: Mark F Mergen <mergen@xxxxxxxxxx>
Subject: RE: [XenPPC] Changeset with 3 files on Friday (I think) has brokenXen on Mambo
From: Hollis Blanchard <hollisb@xxxxxxxxxx>
Date: Mon, 22 Jan 2007 16:15:59 -0600
Cc: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 22 Jan 2007 14:16:28 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <OF790C1C22.A2CA32B3-ON8525726B.007030E4-8525726B.0070B5CF@xxxxxxxxxx>
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>
Organization: IBM Linux Technology Center
References: <OF790C1C22.A2CA32B3-ON8525726B.007030E4-8525726B.0070B5CF@xxxxxxxxxx>
Reply-to: Hollis Blanchard <hollisb@xxxxxxxxxx>
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi Mark, you didn't mention this but I understand you are loading your
dom0 in an unusual way. Does this patch solve your problem?

diff -r ed5ee9dde0bd xen/arch/powerpc/boot_of.c
--- a/xen/arch/powerpc/boot_of.c        Sun Jan 21 08:17:46 2007 -0500
+++ b/xen/arch/powerpc/boot_of.c        Mon Jan 22 16:14:28 2007 -0600
@@ -488,6 +488,23 @@ static void boot_of_free(ulong addr, ulo
 }
 #endif
 
+static void boot_of_reserve(ulong addr, ulong size)
+{
+    ulong bits;
+    ulong pos;
+    ulong i;
+
+    size = ALIGN_UP(size, PAGE_SIZE);
+    bits = size >> PAGE_SHIFT;
+    pos = addr >> PAGE_SHIFT;
+
+    for (i = 0; i < bits; i++) {
+        if (test_bit(pos + i, mem_available_pages))
+            of_panic("%s: pg :0x%lx already reserved.\n", __func__, pos + i);
+        set_bit(pos + i, mem_available_pages);
+    }
+}
+
 static ulong boot_of_alloc(ulong size)
 {
     ulong bits;
@@ -1121,6 +1138,7 @@ static void * __init boot_of_module(ulon
         /* was it handed to us in registers ? */
         mod0_start = r3;
         mod0_size = r4;
+        boot_of_reserve(r3, r4);
             of_printf("%s: Dom0 was loaded and found using r3/r4:"
                       "0x%lx[size 0x%lx]\n",
                       __func__, mod0_start, mod0_size);


-- 
Hollis Blanchard
IBM Linux Technology Center

On Mon, 2007-01-22 at 15:31 -0500, Mark F Mergen wrote:
> 
> I cannot replicate Stuart's successful report.  I'm sure my simulator
> is a much older build than his and Hollis' guess about device trees is
> another reason I should bring my simulator up to date.  I apologize
> for raising a problem without doing that first.  I might not get to it
> right away, but I will do it.  Hollis, why don't you not waste your
> time with simulator until I test with a current one. 
> 
> Mark 
> 



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