ia64/xen-unstable

changeset 13927:a2614e94c7df

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

Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
author Ryan Harper <ryanh@us.ibm.com>
date Thu Jan 11 13:39:27 2007 -0600 (2007-01-11)
parents 90bba403a710
children 0fedda56fed4
files tools/libxc/powerpc64/flatdevtree.c tools/libxc/powerpc64/flatdevtree.h
line diff
     1.1 --- a/tools/libxc/powerpc64/flatdevtree.c	Thu Jan 11 13:39:27 2007 -0600
     1.2 +++ b/tools/libxc/powerpc64/flatdevtree.c	Thu Jan 11 13:39:27 2007 -0600
     1.3 @@ -14,7 +14,7 @@
     1.4   * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
     1.5   *
     1.6   * Copyright Pantelis Antoniou 2006
     1.7 - * Copyright (C) IBM Corporation 2006
     1.8 + * Copyright IBM Corporation 2006, 2007
     1.9   * 2006 (c) MontaVista, Software, Inc.
    1.10   *
    1.11   * Authors: Pantelis Antoniou <pantelis@embeddedalley.com>
    1.12 @@ -209,7 +209,7 @@ void ft_add_rsvmap(struct ft_cxt *cxt, u
    1.13  	((u64 *) cxt->pres)[0] = cpu_to_be64(physaddr);	/* phys = 0, size = 0, terminate */
    1.14  	((u64 *) cxt->pres)[1] = cpu_to_be64(size);
    1.15  
    1.16 -	cxt->pres += 18;	/* advance */
    1.17 +	cxt->pres += 16;	/* advance two u64s worth */
    1.18  
    1.19  	((u64 *) cxt->pres)[0] = 0;	/* phys = 0, size = 0, terminate */
    1.20  	((u64 *) cxt->pres)[1] = 0;
    1.21 @@ -318,6 +318,9 @@ int ft_end_tree(struct ft_cxt *cxt)
    1.22  	cxt->pstr_begin = cxt->p_begin + cxt->struct_size;
    1.23  	cxt->pstr = cxt->pstr_begin + cxt->strings_size;
    1.24  
    1.25 +	/* mark the size of string structure in bph */
    1.26 +	bph->size_dt_strings = cxt->strings_size;
    1.27 +
    1.28  	return 0;
    1.29  }
    1.30  
     2.1 --- a/tools/libxc/powerpc64/flatdevtree.h	Thu Jan 11 13:39:27 2007 -0600
     2.2 +++ b/tools/libxc/powerpc64/flatdevtree.h	Thu Jan 11 13:39:27 2007 -0600
     2.3 @@ -40,7 +40,7 @@ struct boot_param_header {
     2.4  	/* version 2 fields below */
     2.5  	u32 boot_cpuid_phys;    /* Physical CPU id we're booting on */
     2.6  	/* version 3 fields below */
     2.7 -	u32 dt_strings_size;    /* size of the DT strings block */
     2.8 +	u32 size_dt_strings;    /* size of the DT strings block */
     2.9  };
    2.10  
    2.11  struct ft_cxt {