Skip to content

Commit

Permalink
MPIPL: Clear tags and metadata
Browse files Browse the repository at this point in the history
Post dump process, kernel sends FREE_PRESERVE_MEMEORY notification
to OPAL. OPAL will clear metadata section and tags. Subsequent
opal_mpipl_query_tag() call will return OPAL_EMPTY.

Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
[oliver: rebased]
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
  • Loading branch information
Vasant Hegde authored and oohal committed Aug 15, 2019
1 parent 19a8694 commit 7fa3c1e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/opal-dump.c
Expand Up @@ -301,6 +301,12 @@ static int64_t opal_mpipl_update(enum opal_mpipl_ops ops,
prlog(PR_NOTICE, "Payload unregistered for MPIPL\n");
break;
case OPAL_MPIPL_FREE_PRESERVED_MEMORY:
/* Clear tags */
memset(&opal_mpipl_tags, 0, (sizeof(u64) * MAX_OPAL_MPIPL_TAGS));
opal_mpipl_max_tags = 0;
/* Release memory */
free(opal_mpipl_data);
opal_mpipl_data = NULL;
/* Clear MDRT table */
memset((void *)MDRT_TABLE_BASE, 0, MDRT_TABLE_SIZE);
/* Set MDRT count to max allocated count */
Expand Down

0 comments on commit 7fa3c1e

Please sign in to comment.