[Skiboot] [PATCH v3 2/3] debug_descriptor: Claim reserved field for host kernel log buffer

Joel Stanley joel at jms.id.au
Thu May 31 14:29:42 AEST 2018


This will be used by the dump region opal call.

This bumps the version of the debug descriptor to indicate this field is
now in use. However, any users of the descriptor should remain
compatible as the non-reserved fields behave in the same way as
previously.

Signed-off-by: Joel Stanley <joel at jms.id.au>
---
 include/skiboot.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/skiboot.h b/include/skiboot.h
index b4bdf37795dd..9a49bfca74a5 100644
--- a/include/skiboot.h
+++ b/include/skiboot.h
@@ -69,13 +69,13 @@ static inline bool is_rodata(const void *p)
  */
 struct debug_descriptor {
 	u8	eye_catcher[8];	/* "OPALdbug" */
-#define DEBUG_DESC_VERSION	1
+#define DEBUG_DESC_VERSION	2
 	u32	version;
 	u8	console_log_levels;	/* high 4 bits in memory,
 					 * low 4 bits driver (e.g. uart). */
 	u8	state_flags; /* various state flags - OPAL_BOOT_COMPLETE etc */
-	u16	reserved2;
-	u32	reserved[2];
+	u16	reserved;
+	u64	log_buf_phys;		/* Pointer to kernel log buffer */
 
 	/* Memory console */
 	u64	memcons_phys;
@@ -90,7 +90,7 @@ struct debug_descriptor {
 	u64	trace_phys[DEBUG_DESC_MAX_TRACES];
 	u32	trace_size[DEBUG_DESC_MAX_TRACES];
 	u32	trace_tce[DEBUG_DESC_MAX_TRACES];
-};
+} __packed;
 extern struct debug_descriptor debug_descriptor;
 
 static inline bool opal_booting(void)
-- 
2.17.0



More information about the Skiboot mailing list