[Skiboot] [PATCH v7 07/22] fadump: Define destination memory for OPAL boot crash

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Sat Apr 13 19:15:33 AEST 2019


We will hardcode OPAL dump source/destination memory region in SPIRAH
so that we can capture early OPAL dump.

OPAL stack size depends on PIR and OPAL calculates runtime size (including
stack) during OPAL init. Hence use MAX possible PIR to calculate destination
memory for OPAL dump.

Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
---
 include/mem-map.h | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/include/mem-map.h b/include/mem-map.h
index 3f4fda2dd..01b8945b6 100644
--- a/include/mem-map.h
+++ b/include/mem-map.h
@@ -127,6 +127,26 @@
  */
 #define CPU_STACKS_BASE		(SKIBOOT_BASE + SKIBOOT_SIZE)
 
+/* Destination memory to capture OPAL dump. We use max possible PIR to
+ * calculate destination memory start address and size.
+ *
+ * XXX: Use continuguous memory for OPAL destination memory so that we can
+ *      create single reserve node entry in device tree for OPAL destination
+ *      memory.
+ */
+#define OPAL_DUMP_DEST_BASE	(CPU_STACKS_BASE + \
+				 ((SPR_PIR_P9_MASK + 1) * STACK_SIZE))
+
+#define DUMP_DEST_CON_BASE	(OPAL_DUMP_DEST_BASE)
+#define DUMP_DEST_CON_SIZE	(INMEM_CON_LEN)
+
+#define DUMP_DEST_HBRT_BASE	(DUMP_DEST_CON_BASE + DUMP_DEST_CON_SIZE)
+#define DUMP_DEST_HBRT_SIZE	(HBRT_CON_LEN)
+
+#define DUMP_DEST_SKIBOOT_BASE	(DUMP_DEST_HBRT_BASE + DUMP_DEST_HBRT_SIZE)
+/* Collect OPAL core including max possible CPU stack data */
+#define DUMP_DEST_SKIBOOT_SIZE	(OPAL_DUMP_DEST_BASE - SKIBOOT_BASE)
+
 /*
  * Address at which we load the kernel LID. This is also where
  * we expect a passed-in kernel if booting without FSP and
-- 
2.14.3



More information about the Skiboot mailing list