diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-09-19 13:44:59 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-09-20 02:09:54 -0400 |
commit | daea1175a9f0f70eab5b33e2827d57ba8c686816 (patch) | |
tree | aac48bd8bdfb9c7ee8e3e5058aea07e04e105da3 /arch/powerpc/kernel | |
parent | 6e35d5dac0c83ebb616ff3b9c2d6155c9a9ccb86 (diff) |
powerpc/powernv: Support for OPAL console
This adds a udbg and an hvc console backend for supporting a console
using the OPAL console interfaces.
On OPAL v1 we have hvc0 mapped to whatever console the system was
configured for (network or hvsi serial port) via the service
processor.
On OPAL v2 we have hvcN mapped to the Nth console provided by OPAL
which generally corresponds to:
hvc0 : network console (raw protocol)
hvc1 : serial port S1 (hvsi)
hvc2 : serial port S2 (hvsi)
Note: At this point, early debug console only works with OPAL v1
and shouldn't be enabled in a normal kernel.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/head_64.S | 14 | ||||
-rw-r--r-- | arch/powerpc/kernel/udbg.c | 4 |
2 files changed, 17 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index dea8191253d2..06c7251c1bf7 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel/head_64.S | |||
@@ -53,7 +53,8 @@ | |||
53 | * 2. The kernel is entered at __start | 53 | * 2. The kernel is entered at __start |
54 | * -or- For OPAL entry: | 54 | * -or- For OPAL entry: |
55 | * 1. The MMU is off, processor in HV mode, primary CPU enters at 0 | 55 | * 1. The MMU is off, processor in HV mode, primary CPU enters at 0 |
56 | * with device-tree in gpr3 | 56 | * with device-tree in gpr3. We also get OPAL base in r8 and |
57 | * entry in r9 for debugging purposes | ||
57 | * 2. Secondary processors enter at 0x60 with PIR in gpr3 | 58 | * 2. Secondary processors enter at 0x60 with PIR in gpr3 |
58 | * | 59 | * |
59 | * For iSeries: | 60 | * For iSeries: |
@@ -335,6 +336,11 @@ _GLOBAL(__start_initialization_multiplatform) | |||
335 | /* Save parameters */ | 336 | /* Save parameters */ |
336 | mr r31,r3 | 337 | mr r31,r3 |
337 | mr r30,r4 | 338 | mr r30,r4 |
339 | #ifdef CONFIG_PPC_EARLY_DEBUG_OPAL | ||
340 | /* Save OPAL entry */ | ||
341 | mr r28,r8 | ||
342 | mr r29,r9 | ||
343 | #endif | ||
338 | 344 | ||
339 | #ifdef CONFIG_PPC_BOOK3E | 345 | #ifdef CONFIG_PPC_BOOK3E |
340 | bl .start_initialization_book3e | 346 | bl .start_initialization_book3e |
@@ -711,6 +717,12 @@ _INIT_STATIC(start_here_multiplatform) | |||
711 | bdnz 3b | 717 | bdnz 3b |
712 | 4: | 718 | 4: |
713 | 719 | ||
720 | #ifdef CONFIG_PPC_EARLY_DEBUG_OPAL | ||
721 | /* Setup OPAL entry */ | ||
722 | std r28,0(r11); | ||
723 | std r29,8(r11); | ||
724 | #endif | ||
725 | |||
714 | #ifndef CONFIG_PPC_BOOK3E | 726 | #ifndef CONFIG_PPC_BOOK3E |
715 | mfmsr r6 | 727 | mfmsr r6 |
716 | ori r6,r6,MSR_RI | 728 | ori r6,r6,MSR_RI |
diff --git a/arch/powerpc/kernel/udbg.c b/arch/powerpc/kernel/udbg.c index 5b3e98e03158..35f948203ec5 100644 --- a/arch/powerpc/kernel/udbg.c +++ b/arch/powerpc/kernel/udbg.c | |||
@@ -69,6 +69,10 @@ void __init udbg_early_init(void) | |||
69 | udbg_init_wsp(); | 69 | udbg_init_wsp(); |
70 | #elif defined(CONFIG_PPC_EARLY_DEBUG_PS3GELIC) | 70 | #elif defined(CONFIG_PPC_EARLY_DEBUG_PS3GELIC) |
71 | udbg_init_ps3gelic(); | 71 | udbg_init_ps3gelic(); |
72 | #elif defined(CONFIG_PPC_EARLY_DEBUG_OPAL_RAW) | ||
73 | udbg_init_debug_opal_raw(); | ||
74 | #elif defined(CONFIG_PPC_EARLY_DEBUG_OPAL_HVSI) | ||
75 | udbg_init_debug_opal_hvsi(); | ||
72 | #endif | 76 | #endif |
73 | 77 | ||
74 | #ifdef CONFIG_PPC_EARLY_DEBUG | 78 | #ifdef CONFIG_PPC_EARLY_DEBUG |