Skip to contentSkip to conversation

Add udbg support for RTAS console

PATCH In review Michael Ellerman 1 participant 1 message Jun 23, 2006 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 6/8 Add udbg support for RTAS console

Add udbg hooks for the RTAS console, based on the RTAS put-term-char and get-term-char calls. Along with my previous patches, this should enable debugging as soon as early_init_dt_scan_rtas() is called.

---

 arch/powerpc/Kconfig       |    4 ++
 arch/powerpc/Kconfig.debug |    9 +++++
 arch/powerpc/kernel/rtas.c |   72 ++++++++++++++++++++++++++++++++++++++++++++-
 arch/powerpc/kernel/udbg.c |    7 +++-
 include/asm-powerpc/udbg.h |    3 +
 5 files changed, 90 insertions(+), 5 deletions(-)
arch/powerpc/Kconfig +4 -0
Index: to-merge/arch/powerpc/Kconfig
===================================================================
@@ -420,6 +420,10 @@ config PPC_IBM_CELL_BLADE
 	select MMIO_NVRAM
 	select PPC_UDBG_16550
 
+config UDBG_RTAS_CONSOLE
+	bool
+	default n
+
 config XICS
 	depends on PPC_PSERIES
 	bool
arch/powerpc/Kconfig.debug +8 -1
Index: to-merge/arch/powerpc/Kconfig.debug
===================================================================
@@ -134,12 +134,19 @@ config PPC_EARLY_DEBUG_G5
 	help
 	  Select this to enable early debugging for Apple G5 machines.
 
-config PPC_EARLY_DEBUG_RTAS
+config PPC_EARLY_DEBUG_RTAS_PANEL
 	bool "RTAS Panel"
 	depends on PPC_RTAS
 	help
 	  Select this to enable early debugging via the RTAS panel.
 
+config PPC_EARLY_DEBUG_RTAS_CONSOLE
+	bool "RTAS Console"
+	depends on PPC_RTAS
+	select UDBG_RTAS_CONSOLE
+	help
+	  Select this to enable early debugging via the RTAS console.
+
 config PPC_EARLY_DEBUG_MAPLE
 	bool "Maple real mode"
 	depends on PPC_MAPLE
arch/powerpc/kernel/rtas.c +71 -1

88 lines not on this page · raw message

arch/powerpc/kernel/udbg.c +5 -2
Index: to-merge/arch/powerpc/kernel/udbg.c
===================================================================
@@ -34,9 +34,12 @@ void __init udbg_early_init(void)
 #elif defined(CONFIG_PPC_EARLY_DEBUG_G5)
 	/* For use on Apple G5 machines */
 	udbg_init_pmac_realmode();
-#elif defined(CONFIG_PPC_EARLY_DEBUG_RTAS)
+#elif defined(CONFIG_PPC_EARLY_DEBUG_RTAS_PANEL)
 	/* RTAS panel debug */
-	udbg_init_rtas();
+	udbg_init_rtas_panel();
+#elif defined(CONFIG_PPC_EARLY_DEBUG_RTAS_CONSOLE)
+	/* RTAS console debug */
+	udbg_init_rtas_console();
 #elif defined(CONFIG_PPC_EARLY_DEBUG_MAPLE)
 	/* Maple real mode debug */
 	udbg_init_maple_realmode();
include/asm-powerpc/udbg.h +2 -1
Index: to-merge/include/asm-powerpc/udbg.h
===================================================================
@@ -42,7 +42,8 @@ extern void __init udbg_init_debug_lpar(
 extern void __init udbg_init_pmac_realmode(void);
 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_rtas_panel(void);
+extern void __init udbg_init_rtas_console(void);
 
 #endif /* __KERNEL__ */
 #endif /* _ASM_POWERPC_UDBG_H */