diff mbox series

[v7,10/22] dump: Define fadump structure

Message ID 20190413091548.14329-11-hegdevasant@linux.vnet.ibm.com
State Changes Requested
Headers show
Series MPIPL support | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success Successfully applied on branch master (ff79070d1c4cdc38f2ecb42e45b8322cb1efb819)
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot success Test snowpatch/job/snowpatch-skiboot on branch master
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot-dco success Signed-off-by present

Commit Message

Vasant Hegde April 13, 2019, 9:15 a.m. UTC
Naming convention: Linux refers MPIPL as firmware assisted dump (fadump).

This structure is shared between OPAL and payload. During fadump registration
payload will use this structure to pass kernel memory reservation details to
OPAL. OPAL will use this structure to fill MDST, MDDT table. After fadump,
OPAL uses MDRT table to fill this structure and passes this to payload via
device tree.

Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
---
 include/opal-api.h | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)
diff mbox series

Patch

diff --git a/include/opal-api.h b/include/opal-api.h
index e461c9d27..e783540e1 100644
--- a/include/opal-api.h
+++ b/include/opal-api.h
@@ -1319,6 +1319,37 @@  enum {
 	OPAL_PCI_P2P_TARGET	= 1,
 };
 
+/*
+ * FADUMP memory region ID usable by kernel
+ * 0x80 - 0xff -> Payload
+ */
+#define FADUMP_REGION_HOST_START	0x80
+#define FADUMP_REGION_HOST_END		0xff
+
+/*
+ * fadump section details. This structure is shared between OPAL and payload.
+ * During fadump registration payload will use this structure to pass kernel
+ * memory reservation details to OPAL. OPAL will use this structure to fill
+ * MDST, MDDT table. After fadump, OPAL uses MDRT table to fill this structure.
+ * And passes this to payload via device tree.
+ */
+struct fadump_section {
+	u8	source_type;	/* FADUMP_REGION_* */
+	u8	reserved[7];
+	__be64	source_addr;
+	__be64	source_size;
+	__be64	dest_addr;
+	__be64	dest_size;
+} __packed;
+
+struct fadump {
+	__be16  fadump_section_size;	/* sizeof(struct fadump_section) */
+	__be16	section_count;
+	__be32	crashing_cpu;
+	__be64	reserved;
+	struct	fadump_section section[];
+};
+
 #endif /* __ASSEMBLY__ */
 
 #endif /* __OPAL_API_H */