[PATCH v3 2/4] powerpc/fadump: fix additional param memory reservation for HASH MMU

Sourabh Jain sourabhjain at linux.ibm.com
Tue Feb 11 14:49:01 AEDT 2025




On 10/02/25 12:48, Hari Bathini wrote:
> Hi Sourabh,
>
> On 23/01/25 5:12 pm, Sourabh Jain wrote:
>> Commit 683eab94da75bc ("powerpc/fadump: setup additional parameters for
>> dump capture kernel") introduced the additional parameter feature in
>> fadump for HASH MMU with the understanding that GRUB does not use the
>> memory area between 640MB and 768MB for its operation.
>>
>> However, the third patch in this series ("powerpc: increase MIN RMA
>> size for CAS negotiation") changes the MIN RMA size to 768MB, allowing
>> GRUB to use memory up to 768MB. This makes the fadump reservation for
>> the additional parameter feature for HASH MMU unreliable.
>>
>> To address this, adjust the memory range for the additional parameter in
>> fadump for HASH MMU. This will ensure that GRUB does not overwrite the
>> memory reserved for fadump's additional parameter in HASH MMU.
>>
>> The new policy for the memory range for the additional parameter in HASH
>> MMU is that the first memory block must be larger than the MIN_RMA size,
>> as the bootloader can use memory up to the MIN_RMA size. The range
>> should be between MIN_RMA and the RMA size (ppc64_rma_size), and it must
>> not overlap with the fadump reserved area.
>>
>> Cc: Avnish Chouhan <avnish at linux.ibm.com>
>> Cc: Brian King <brking at linux.ibm.com>
>> Cc: Hari Bathini <hbathini at linux.ibm.com>
>> Cc: Madhavan Srinivasan <maddy at linux.ibm.com>
>> Cc: Michael Ellerman <mpe at ellerman.id.au>
>> Reviewed-by: Mahesh Salgaonkar <mahesh at linux.ibm.com>
>> Signed-off-by: Sourabh Jain <sourabhjain at linux.ibm.com>
>> ---
>>   arch/powerpc/kernel/fadump.c | 21 +++++++++++----------
>>   1 file changed, 11 insertions(+), 10 deletions(-)
>>
>> diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
>> index 4b371c738213..26e3d151e048 100644
>> --- a/arch/powerpc/kernel/fadump.c
>> +++ b/arch/powerpc/kernel/fadump.c
>> @@ -33,6 +33,7 @@
>>   #include <asm/fadump-internal.h>
>>   #include <asm/setup.h>
>>   #include <asm/interrupt.h>
>> +#include <asm/prom.h>
>>     /*
>>    * The CPU who acquired the lock to trigger the fadump crash should
>> @@ -1764,19 +1765,19 @@ void __init fadump_setup_param_area(void)
>>           range_end = memblock_end_of_DRAM();
>>       } else {
>>           /*
>> -         * Passing additional parameters is supported for hash MMU only
>> -         * if the first memory block size is 768MB or higher.
>> +         * Memory range for passing additional parameters for HASH MMU
>> +         * must meet the following conditions:
>> +         * 1. The first memory block size must be higher than the
>> +         *    minimum RMA (MIN_RMA) size. Bootloader can use memory
>
>> +         *    upto RMA size. So it should be avoided.
>
> I believe you mean "upto MIN_RMA size." here?

Yeah it should MIN_RMA.

>
> Rest looks good.
>
> Reviewed-by: Hari Bathini <hbathini at linux.ibm.com>

Thanks for the review.

- Sourabh Jain


More information about the Linuxppc-dev mailing list