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] [PATCH 2 of 4] [PATCH] Fix pointer math in ft_add_rsvmap(), r

To: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Subject: [XenPPC] [PATCH 2 of 4] [PATCH] Fix pointer math in ft_add_rsvmap(), rename string block to match DTC spec
From: Ryan Harper <ryanh@xxxxxxxxxx>
Date: Thu, 11 Jan 2007 13:42:04 -0500
Delivery-date: Thu, 11 Jan 2007 11:42:14 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1168544522@xxxxxxxxxxxxxxxxxxxxx>
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>
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
2 files changed, 6 insertions(+), 3 deletions(-)
tools/libxc/powerpc64/flatdevtree.c |    7 +++++--
tools/libxc/powerpc64/flatdevtree.h |    2 +-


# HG changeset patch
# User Ryan Harper <ryanh@xxxxxxxxxx>
# Date 1168544367 21600
# Node ID 0279229b68453a4a1b3613ac02c8b8ca9a965875
# Parent  301aa30e95e2a7a76f98c4fbad5f3da4c4aaab42
[PATCH] Fix pointer math in ft_add_rsvmap(), rename string block to match DTC 
spec.

Signed-off-by: Ryan Harper <ryanh@xxxxxxxxxx>

diff -r 301aa30e95e2 -r 0279229b6845 tools/libxc/powerpc64/flatdevtree.c
--- a/tools/libxc/powerpc64/flatdevtree.c       Thu Jan 11 13:39:27 2007 -0600
+++ b/tools/libxc/powerpc64/flatdevtree.c       Thu Jan 11 13:39:27 2007 -0600
@@ -14,7 +14,7 @@
  * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  *
  * Copyright Pantelis Antoniou 2006
- * Copyright (C) IBM Corporation 2006
+ * Copyright IBM Corporation 2006
  * 2006 (c) MontaVista, Software, Inc.
  *
  * Authors: Pantelis Antoniou <pantelis@xxxxxxxxxxxxxxxxx>
@@ -209,7 +209,7 @@ void ft_add_rsvmap(struct ft_cxt *cxt, u
        ((u64 *) cxt->pres)[0] = cpu_to_be64(physaddr); /* phys = 0, size = 0, 
terminate */
        ((u64 *) cxt->pres)[1] = cpu_to_be64(size);
 
-       cxt->pres += 18;        /* advance */
+       cxt->pres += 16;        /* advance two u64s worth */
 
        ((u64 *) cxt->pres)[0] = 0;     /* phys = 0, size = 0, terminate */
        ((u64 *) cxt->pres)[1] = 0;
@@ -317,6 +317,9 @@ int ft_end_tree(struct ft_cxt *cxt)
        /* the new strings start */
        cxt->pstr_begin = cxt->p_begin + cxt->struct_size;
        cxt->pstr = cxt->pstr_begin + cxt->strings_size;
+
+       /* mark the size of string structure in bph */
+       bph->size_dt_strings = cxt->strings_size;
 
        return 0;
 }
diff -r 301aa30e95e2 -r 0279229b6845 tools/libxc/powerpc64/flatdevtree.h
--- a/tools/libxc/powerpc64/flatdevtree.h       Thu Jan 11 13:39:27 2007 -0600
+++ b/tools/libxc/powerpc64/flatdevtree.h       Thu Jan 11 13:39:27 2007 -0600
@@ -40,7 +40,7 @@ struct boot_param_header {
        /* version 2 fields below */
        u32 boot_cpuid_phys;    /* Physical CPU id we're booting on */
        /* version 3 fields below */
-       u32 dt_strings_size;    /* size of the DT strings block */
+       u32 size_dt_strings;    /* size of the DT strings block */
 };
 
 struct ft_cxt {

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

<Prev in Thread] Current Thread [Next in Thread>