[Skiboot] [PATCH 1/3] mem_region: Add reserved regions after memory init

Stewart Smith stewart at linux.vnet.ibm.com
Tue May 16 17:07:42 AEST 2017


Oliver O'Halloran <oohall at gmail.com> writes:
> When a new memory region is added (e.g for memory reserved by firmware)
> the list of existing memory regions is iterated through and a cut-out is
> made in any existing region that overlaps with the new one. Prior to the
> HDAT reservations being made the region init process was always:
>
> 1) Create regions from the memory@<addr> DT nodes. (mostly large)
> 2) Create reserved regions from the device-tree. (mostly small)
>
> When adding new regions we have assume that the new region will only
> every intersect with at most one existing region, which it will split.
> Adding reservations inside the HDAT parser breaks this because when
> adding the memory@<addr> node regions we can potentially overlap with
> multiple reserved regions. This patch fixes this by maintaining a
> seperate list of memory reservations and delaying merging them until
> after the normal memory init has finished, similar to how DT
> reservations are handled.
>
> Signed-off-by: Oliver O'Halloran <oohall at gmail.com>
> ---
>  core/mem_region.c | 37 ++++++++++++++++++++++++++++++-------
>  1 file changed, 30 insertions(+), 7 deletions(-)

Thanks, series  merged to master as of
5d1abb640e0bc400257233992956d430226b0d6b

-- 
Stewart Smith
OPAL Architect, IBM.



More information about the Skiboot mailing list