Skip to contentSkip to conversation

powerpc/nvram: Add compression to fit more oops output into NVRAM

PATCH New Jim Keniston 1 participant 1 message Jul 25, 2011 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc/nvram: Add compression to fit more oops output into NVRAM

Capture more than twice as much text from the printk buffer, and compress it to fit it in the lnx,oops-log NVRAM partition. You can view the compressed text using the new (as of July 20) --unzip option of the nvram command in the powerpc-utils package.

---

 arch/powerpc/include/asm/rtas.h        |    6 +
 arch/powerpc/platforms/pseries/nvram.c |  171 +++++++++++++++++++++++++++++++-
 2 files changed, 168 insertions(+), 9 deletions(-)
arch/powerpc/include/asm/rtas.h +4 -2
index 58625d1..41f69ae 100644
@@ -249,10 +249,12 @@ extern void pSeries_log_error(char *buf, unsigned int err_type, int fatal);
 #define ERR_FLAG_ALREADY_LOGGED	0x0
 #define ERR_FLAG_BOOT		0x1 	/* log was pulled from NVRAM on boot */
 #define ERR_TYPE_RTAS_LOG	0x2	/* from rtas event-scan */
-#define ERR_TYPE_KERNEL_PANIC	0x4	/* from panic() */
+#define ERR_TYPE_KERNEL_PANIC	0x4	/* from die()/panic() */
+#define ERR_TYPE_KERNEL_PANIC_GZ 0x8	/* ditto, compressed */
 
 /* All the types and not flags */
-#define ERR_TYPE_MASK	(ERR_TYPE_RTAS_LOG | ERR_TYPE_KERNEL_PANIC)
+#define ERR_TYPE_MASK \
+	(ERR_TYPE_RTAS_LOG | ERR_TYPE_KERNEL_PANIC | ERR_TYPE_KERNEL_PANIC_GZ)
 
 #define RTAS_DEBUG KERN_DEBUG "RTAS: "
  
arch/powerpc/platforms/pseries/nvram.c +164 -7

210 lines not on this page · raw message