diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2006-01-10 19:54:08 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-01-10 22:48:13 -0500 |
commit | bf6a7112bda99aadd6675526423a96be6b356a3d (patch) | |
tree | e3a0e144ac933e7f35d6fa5f95bc0e0fb0ba6309 /arch | |
parent | f481f1edee77b3d623457685add1c6b507c25d6f (diff) |
[PATCH] powerpc: Early debugging support for iSeries
Connect iSeries up to the standard early debugging infrastructure.
To actually use this you need to enable the iSeries early debugging
in setup_64.c. Then after the messages are logged hit Ctrl-x Ctrl-x on
your console to dump the Hypervisor console buffer.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/kernel/setup_64.c | 14 | ||||
-rw-r--r-- | arch/powerpc/platforms/iseries/setup.c | 18 |
2 files changed, 24 insertions, 8 deletions
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index c4b76961d6de..177d8249078d 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c | |||
@@ -75,22 +75,26 @@ | |||
75 | * but your kernel will not boot on anything else if you do so | 75 | * but your kernel will not boot on anything else if you do so |
76 | */ | 76 | */ |
77 | 77 | ||
78 | /* This one is for use on LPAR machines that support an HVC console | 78 | /* For use on LPAR machines that support an HVC console on vterm 0 */ |
79 | * on vterm 0 | ||
80 | */ | ||
81 | extern void udbg_init_debug_lpar(void); | 79 | extern void udbg_init_debug_lpar(void); |
82 | /* This one is for use on Apple G5 machines | 80 | |
83 | */ | 81 | /* This one is for use on Apple G5 machines */ |
84 | extern void udbg_init_pmac_realmode(void); | 82 | extern void udbg_init_pmac_realmode(void); |
83 | |||
85 | /* That's RTAS panel debug */ | 84 | /* That's RTAS panel debug */ |
86 | extern void call_rtas_display_status_delay(unsigned char c); | 85 | extern void call_rtas_display_status_delay(unsigned char c); |
86 | |||
87 | /* Here's maple real mode debug */ | 87 | /* Here's maple real mode debug */ |
88 | extern void udbg_init_maple_realmode(void); | 88 | extern void udbg_init_maple_realmode(void); |
89 | 89 | ||
90 | /* For iSeries - hit Ctrl-x Ctrl-x to see the output */ | ||
91 | extern void udbg_init_iseries(void); | ||
92 | |||
90 | #define EARLY_DEBUG_INIT() do {} while(0) | 93 | #define EARLY_DEBUG_INIT() do {} while(0) |
91 | 94 | ||
92 | #if 0 | 95 | #if 0 |
93 | #define EARLY_DEBUG_INIT() udbg_init_debug_lpar() | 96 | #define EARLY_DEBUG_INIT() udbg_init_debug_lpar() |
97 | #define EARLY_DEBUG_INIT() udbg_init_iseries() | ||
94 | #define EARLY_DEBUG_INIT() udbg_init_maple_realmode() | 98 | #define EARLY_DEBUG_INIT() udbg_init_maple_realmode() |
95 | #define EARLY_DEBUG_INIT() udbg_init_pmac_realmode() | 99 | #define EARLY_DEBUG_INIT() udbg_init_pmac_realmode() |
96 | #define EARLY_DEBUG_INIT() \ | 100 | #define EARLY_DEBUG_INIT() \ |
diff --git a/arch/powerpc/platforms/iseries/setup.c b/arch/powerpc/platforms/iseries/setup.c index ad5ef80500ce..25cdebdf6f2e 100644 --- a/arch/powerpc/platforms/iseries/setup.c +++ b/arch/powerpc/platforms/iseries/setup.c | |||
@@ -52,6 +52,7 @@ | |||
52 | #include <asm/iseries/mf.h> | 52 | #include <asm/iseries/mf.h> |
53 | #include <asm/iseries/hv_lp_event.h> | 53 | #include <asm/iseries/hv_lp_event.h> |
54 | #include <asm/iseries/lpar_map.h> | 54 | #include <asm/iseries/lpar_map.h> |
55 | #include <asm/udbg.h> | ||
55 | 56 | ||
56 | #include "naca.h" | 57 | #include "naca.h" |
57 | #include "setup.h" | 58 | #include "setup.h" |
@@ -62,10 +63,8 @@ | |||
62 | #include "call_sm.h" | 63 | #include "call_sm.h" |
63 | #include "call_hpt.h" | 64 | #include "call_hpt.h" |
64 | 65 | ||
65 | extern void hvlog(char *fmt, ...); | ||
66 | |||
67 | #ifdef DEBUG | 66 | #ifdef DEBUG |
68 | #define DBG(fmt...) hvlog(fmt) | 67 | #define DBG(fmt...) udbg_printf(fmt) |
69 | #else | 68 | #else |
70 | #define DBG(fmt...) | 69 | #define DBG(fmt...) |
71 | #endif | 70 | #endif |
@@ -984,3 +983,16 @@ static int __init early_parsemem(char *p) | |||
984 | return 0; | 983 | return 0; |
985 | } | 984 | } |
986 | early_param("mem", early_parsemem); | 985 | early_param("mem", early_parsemem); |
986 | |||
987 | static void hvputc(char c) | ||
988 | { | ||
989 | if (c == '\n') | ||
990 | hvputc('\r'); | ||
991 | |||
992 | HvCall_writeLogBuffer(&c, 1); | ||
993 | } | ||
994 | |||
995 | void __init udbg_init_iseries(void) | ||
996 | { | ||
997 | udbg_putc = hvputc; | ||
998 | } | ||