[PATCH 5/15] bootwrapper: occuppied memory ranges

David Gibson david at gibson.dropbear.id.au
Mon Sep 24 13:09:37 EST 2007


On Fri, Sep 21, 2007 at 06:04:18PM -0500, Milton Miller wrote:
> Add a set of library routines to manage gross memory allocations.
> 
> This code uses an array in bss to store upto 32 entrys with merging
> representing a range of memory below rma_end (aka end of real mode
> memory at 0).
> 
> To use this code, a platform would set rma_end (find_rma_end), mark
> memory ranges occupied (add_known_ranges et al), initialize malloc in
> the spaces between (ranges_init_malloc), and optionally use the supplied
> vmlinux_alloc may be used.
> 
> Signed-off-by: Milton Miller <miltonm at bga.com>
> --- 
> vs 12172
> rename rmo_end to rma_end (real mode area, as used in papr)
> removed section labels (now in ops.h)
> rediff ops.h, Makefile
> moved find_rma_end here (from kexec.c in a later patch)
> find_rma_end searches by node type for "memory", checks that
> 	the parent is the root node, then looks for a reg property
> 	with the first address/size pair starting at 0.

Urg.  It's an awful lot of code for the bootwrapper.  Am I right in
understanding that the only reason to use the ranges code is for the
ranges based malloc() and vmlinux_alloc() you get out of it?

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson



More information about the Linuxppc-dev mailing list