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
|