[Skiboot] [PATCH v9 22/25] MPIPL: Clear tags and metadata

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Fri Jul 12 21:17:59 AEST 2019


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 at linux.vnet.ibm.com>
---
 core/opal-dump.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/core/opal-dump.c b/core/opal-dump.c
index 2ff3a2f60..6aefefdf7 100644
--- a/core/opal-dump.c
+++ b/core/opal-dump.c
@@ -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 */
-- 
2.14.3



More information about the Skiboot mailing list