[Skiboot] [PATCH v2] mpipl: Rework memory reservation for OPAL dump

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Tue Feb 11 03:31:00 AEDT 2020


On 2/10/20 9:46 PM, Vasant Hegde wrote:
> During boot, OPAL reserves memory required to capture OPAL dump and
> architected register data. During MPIPL, hostboot will copy OPAL dump
> to this memory. Post MPIPL kernel will use this memory to create opalcore.
> We use mem_reserve_fw() for this reservation. At present this reservation
> happens late in the init path. It may clash with memory allocated by
> local_alloc().
> 
> We have two option to fix above issue:
>    - Use local_alloc() for allocating memory for OPAL dump
>      This works fine on first boot. We can use this method to reserve
>      memory. But Post MPIPL we still want to reserve destination
>      memory to make sure no one is stomping this area. Also this reservation
>      might have happened in between other local_allocations. So in Post MPIPL
>      boot allocator may not find enough memory in first region for other
>      local_alloc() requests and may throw mem_alloc() error before trying to
>      allocate from other regions.
> 
>    - Early memory reservation for OPAL dump
>      Allocate and reserve memory just after memory region init. >
> 
> This patch uses second approach to fix reservation issue.
> 
> Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>


Missed to mention changes in v2:
   - V1 fix borke mambo boot as it assumed `opal_node` is created before memory 
region init. Its fixed in v2.

-Vasant



More information about the Skiboot mailing list