[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [POWERPC][LIBXC] Fix pointer math in ft_add_rsvmap(), rename string block to match DTC spec.



# HG changeset patch
# User Ryan Harper <ryanh@xxxxxxxxxx>
# Date 1168544367 21600
# Node ID a2614e94c7df0091a4f3d480974cdd4e13d5386c
# Parent  90bba403a710ad82194387a6382fa8e34dfe69f3
[POWERPC][LIBXC] Fix pointer math in ft_add_rsvmap(), rename string block to 
match DTC spec.

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

diff -r 90bba403a710 -r a2614e94c7df 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 <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 90bba403a710 -r a2614e94c7df 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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.