[PATCH 2/2] systemsim: add early debug options for HVC_FSS

Eric Van Hensbergen ericvh at gmail.com
Sat Feb 25 09:58:55 EST 2006


>From nobody Mon Sep 17 00:00:00 2001
From: Eric Van Hensbergen <ericvh at gmail.com>
Date: Fri Feb 24 16:47:36 2006 -0600
Subject: [PATCH] systemsim: add early debug option when using systemsim console

This patch adds udbg hooks for early-printk debug when using the IBM
Full System Simulator console support.

Signed-off-by: Eric Van Hensbergen <bergevan at us.ibm.com>

---

 arch/powerpc/kernel/udbg.c |    3 +++
 drivers/char/Kconfig       |    7 +++++++
 drivers/char/hvc_fss.c     |   15 +++++++++++++++
 include/asm-powerpc/udbg.h |    1 +
 4 files changed, 26 insertions(+), 0 deletions(-)

b4e4add5d57f130a422e68787626f96f311658a0
diff --git a/arch/powerpc/kernel/udbg.c b/arch/powerpc/kernel/udbg.c
index 3774e80..66b63ad 100644
--- a/arch/powerpc/kernel/udbg.c
+++ b/arch/powerpc/kernel/udbg.c
@@ -39,6 +39,9 @@ void __init udbg_early_init(void)
 #elif defined(CONFIG_PPC_EARLY_DEBUG_MAPLE)
 	/* Maple real mode debug */
 	udbg_init_maple_realmode();
+#elif defined(CONFIG_PPC_EARLY_DEBUG_FSS)
+	/* Maple real mode debug */
+	udbg_init_fss();
 #elif defined(CONFIG_PPC_EARLY_DEBUG_ISERIES)
 	/* For iSeries - hit Ctrl-x Ctrl-x to see the output */
 	udbg_init_iseries();
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
index 74f9932..1973869 100644
--- a/drivers/char/Kconfig
+++ b/drivers/char/Kconfig
@@ -586,6 +586,13 @@ config HVC_FSS
 	  IBM Full System Simulator Console device driver which makes use of
 	  the HVC_DRIVER front end.
 
+config PPC_EARLY_DEBUG_FSS
+	bool "IBM Full System Simulator Console early debug support"
+	depends on PPC_SYSTEMSIM
+	select HVC_FSS
+	help
+	  Display early debug info over the Full System simulator console
+
 config HVC_RTAS
 	bool "IBM RTAS Console support"
 	depends on PPC_RTAS
diff --git a/drivers/char/hvc_fss.c b/drivers/char/hvc_fss.c
index e87c03a..84aa34f 100644
--- a/drivers/char/hvc_fss.c
+++ b/drivers/char/hvc_fss.c
@@ -38,6 +38,7 @@
 #include <asm/prom.h>
 #include <asm/irq.h>
 #include <asm/systemsim.h>
+#include <asm/udbg.h>
 
 #include "hvc_console.h"
 
@@ -74,6 +75,20 @@ static int hvc_fss_read_console(uint32_t
 	return got;
 }
 
+#ifdef CONFIG_PPC_EARLY_DEBUG_FSS
+void udbg_fss_real_putc(char c)
+{
+	callthru3(SIM_WRITE_CONSOLE_CODE, (unsigned long)&c, 1, 1);
+}
+
+void __init udbg_init_fss(void)
+{
+	udbg_putc = udbg_fss_real_putc;
+	udbg_getc = NULL;
+	udbg_getc_poll = NULL;
+}
+#endif /* CONFIG_PPC_EARLY_DEBUG_FSS */
+
 static struct hv_ops hvc_fss_get_put_ops = {
 	.get_chars = hvc_fss_read_console,
 	.put_chars = hvc_fss_write_console,
diff --git a/include/asm-powerpc/udbg.h b/include/asm-powerpc/udbg.h
index 5c4236c..46b100a 100644
--- a/include/asm-powerpc/udbg.h
+++ b/include/asm-powerpc/udbg.h
@@ -42,6 +42,7 @@ extern void __init udbg_init_pmac_realmo
 extern void __init udbg_init_maple_realmode(void);
 extern void __init udbg_init_iseries(void);
 extern void __init udbg_init_rtas(void);
+extern void __init udbg_init_fss(void);
 
 #endif /* __KERNEL__ */
 #endif /* _ASM_POWERPC_UDBG_H */
-- 





More information about the Linuxppc64-dev mailing list