# HG changeset patch
# User Ryan Harper <[EMAIL PROTECTED]>
# Node ID d6481755ade6fbe72d8e519191f12160f92cd517
# Parent  47a43a108647a9c8523408c39ab0546ab9483c5a
[POWERPC][LIBXC] Fix pointer math in ft_add_rsvmap(), rename string block to 
match DTC spec.

Signed-off-by: Ryan Harper <[EMAIL PROTECTED]>
Signed-off-by: Hollis Blanchard <[EMAIL PROTECTED]>
---
 tools/libxc/powerpc64/flatdevtree.c |    7 +++++--
 tools/libxc/powerpc64/flatdevtree.h |    2 +-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff -r 47a43a108647 -r d6481755ade6 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, 2007
  * 2006 (c) MontaVista, Software, Inc.
  *
  * Authors: Pantelis Antoniou <[EMAIL PROTECTED]>
@@ -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 47a43a108647 -r d6481755ade6 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@lists.xensource.com
http://lists.xensource.com/xen-ppc-devel

Reply via email to