diff options
author | Jack Miller <jack@codezen.org> | 2011-04-14 18:32:08 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-05-05 23:32:41 -0400 |
commit | a0496d450ab8c17f6c4d86979b1f6ba486fe9365 (patch) | |
tree | accb4fa5d2695770a1c6992f7437df57e9f14868 /arch/powerpc/kernel/exceptions-64e.S | |
parent | a1d0d98daf6ce580d017a43b09fe30a375cde3e8 (diff) |
powerpc: Add early debug for WSP platforms
Signed-off-by: Jack Miller <jack@codezen.org>
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/exceptions-64e.S')
-rw-r--r-- | arch/powerpc/kernel/exceptions-64e.S | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc/kernel/exceptions-64e.S index c98e9d260621..4d0abb4930a1 100644 --- a/arch/powerpc/kernel/exceptions-64e.S +++ b/arch/powerpc/kernel/exceptions-64e.S | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <asm/cputable.h> | 17 | #include <asm/cputable.h> |
18 | #include <asm/setup.h> | 18 | #include <asm/setup.h> |
19 | #include <asm/thread_info.h> | 19 | #include <asm/thread_info.h> |
20 | #include <asm/reg_a2.h> | ||
20 | #include <asm/exception-64e.h> | 21 | #include <asm/exception-64e.h> |
21 | #include <asm/bug.h> | 22 | #include <asm/bug.h> |
22 | #include <asm/irqflags.h> | 23 | #include <asm/irqflags.h> |
@@ -951,6 +952,22 @@ a2_tlbinit_after_linear_map: | |||
951 | .globl a2_tlbinit_after_iprot_flush | 952 | .globl a2_tlbinit_after_iprot_flush |
952 | a2_tlbinit_after_iprot_flush: | 953 | a2_tlbinit_after_iprot_flush: |
953 | 954 | ||
955 | #ifdef CONFIG_PPC_EARLY_DEBUG_WSP | ||
956 | /* Now establish early debug mappings if applicable */ | ||
957 | /* Restore the MAS0 we used for linear mapping load */ | ||
958 | mtspr SPRN_MAS0,r11 | ||
959 | |||
960 | lis r3,(MAS1_VALID | MAS1_IPROT)@h | ||
961 | ori r3,r3,(BOOK3E_PAGESZ_4K << MAS1_TSIZE_SHIFT) | ||
962 | mtspr SPRN_MAS1,r3 | ||
963 | LOAD_REG_IMMEDIATE(r3, WSP_UART_VIRT | MAS2_I | MAS2_G) | ||
964 | mtspr SPRN_MAS2,r3 | ||
965 | LOAD_REG_IMMEDIATE(r3, WSP_UART_PHYS | MAS3_SR | MAS3_SW) | ||
966 | mtspr SPRN_MAS7_MAS3,r3 | ||
967 | /* re-use the MAS8 value from the linear mapping */ | ||
968 | tlbwe | ||
969 | #endif /* CONFIG_PPC_EARLY_DEBUG_WSP */ | ||
970 | |||
954 | PPC_TLBILX(0,0,0) | 971 | PPC_TLBILX(0,0,0) |
955 | sync | 972 | sync |
956 | isync | 973 | isync |