[Skiboot] [PATCH v8 21/24] MPIPL: Invalidate dump

Nicholas Piggin npiggin at gmail.com
Fri Jun 28 11:47:04 AEST 2019


Vasant Hegde's on June 17, 2019 3:10 am:
> Post dump process, kernel sends FREE_PRESERVE_MEMEORY notification
> to OPAL. OPAL will clear metadata section and tags.
> 
> Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
> ---
>  core/opal-dump.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/core/opal-dump.c b/core/opal-dump.c
> index e53991784..555908114 100644
> --- a/core/opal-dump.c
> +++ b/core/opal-dump.c
> @@ -309,6 +309,16 @@ static int64_t opal_mpipl_update(enum mpipl_ops ops,
>  			prlog(PR_NOTICE, "Payload unregistered for MPIPL\n");
>  		break;
>  	case OPAL_MPIPL_FREE_PRESERVED_MEMORY:
> +		/* Clear tags */
> +		memset(&mpipl_tags, 0, (sizeof(u64) * MAX_MPIPL_TAGS));
> +		max_tags = 0;
> +		/* Release memory */
> +		free(mpipl_opal_data);
> +		mpipl_opal_data = NULL;
> +		/* Clear MDRT table */
> +		memset((void *)MDRT_TABLE_BASE, 0, MDRT_TABLE_SIZE);
> +		/* Set MDRT count to max allocated count */
> +		ntuple_mdrt->act_cnt = MDRT_TABLE_SIZE / sizeof(struct mdrt_table);

Any particular reason you add this here in this patch rather than where
the call type was defined?

Thanks,
Nick


More information about the Skiboot mailing list