aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/exceptions-64e.S
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2011-04-14 18:32:06 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-05-05 23:32:35 -0400
commita1d0d98daf6ce580d017a43b09fe30a375cde3e8 (patch)
tree8aaeff82e2d4edbb8ceec68f1cf5ceecc4c08be1 /arch/powerpc/kernel/exceptions-64e.S
parent82578e192bb837b984ed5d8389245ea1fee09dd5 (diff)
powerpc: Add WSP platform
Add a platform for the Wire Speed Processor, based on the PPC A2. This includes code for the ICS & OPB interrupt controllers, as well as a SCOM backend, and SCOM based cpu bringup. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Jack Miller <jack@codezen.org> Signed-off-by: Ian Munsie <imunsie@au1.ibm.com> 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.S23
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc/kernel/exceptions-64e.S
index 23bd83b20be4..c98e9d260621 100644
--- a/arch/powerpc/kernel/exceptions-64e.S
+++ b/arch/powerpc/kernel/exceptions-64e.S
@@ -864,6 +864,20 @@ have_hes:
864 * that will have to be made dependent on whether we are running under 864 * that will have to be made dependent on whether we are running under
865 * a hypervisor I suppose. 865 * a hypervisor I suppose.
866 */ 866 */
867
868 /* BEWARE, MAGIC
869 * This code is called as an ordinary function on the boot CPU. But to
870 * avoid duplication, this code is also used in SCOM bringup of
871 * secondary CPUs. We read the code between the initial_tlb_code_start
872 * and initial_tlb_code_end labels one instruction at a time and RAM it
873 * into the new core via SCOM. That doesn't process branches, so there
874 * must be none between those two labels. It also means if this code
875 * ever takes any parameters, the SCOM code must also be updated to
876 * provide them.
877 */
878 .globl a2_tlbinit_code_start
879a2_tlbinit_code_start:
880
867 ori r11,r3,MAS0_WQ_ALLWAYS 881 ori r11,r3,MAS0_WQ_ALLWAYS
868 oris r11,r11,MAS0_ESEL(3)@h /* Use way 3: workaround A2 erratum 376 */ 882 oris r11,r11,MAS0_ESEL(3)@h /* Use way 3: workaround A2 erratum 376 */
869 mtspr SPRN_MAS0,r11 883 mtspr SPRN_MAS0,r11
@@ -880,6 +894,9 @@ have_hes:
880 /* Write the TLB entry */ 894 /* Write the TLB entry */
881 tlbwe 895 tlbwe
882 896
897 .globl a2_tlbinit_after_linear_map
898a2_tlbinit_after_linear_map:
899
883 /* Now we branch the new virtual address mapped by this entry */ 900 /* Now we branch the new virtual address mapped by this entry */
884 LOAD_REG_IMMEDIATE(r3,1f) 901 LOAD_REG_IMMEDIATE(r3,1f)
885 mtctr r3 902 mtctr r3
@@ -931,10 +948,16 @@ have_hes:
931 cmpw r3,r9 948 cmpw r3,r9
932 blt 2b 949 blt 2b
933 950
951 .globl a2_tlbinit_after_iprot_flush
952a2_tlbinit_after_iprot_flush:
953
934 PPC_TLBILX(0,0,0) 954 PPC_TLBILX(0,0,0)
935 sync 955 sync
936 isync 956 isync
937 957
958 .globl a2_tlbinit_code_end
959a2_tlbinit_code_end:
960
938 /* We translate LR and return */ 961 /* We translate LR and return */
939 mflr r3 962 mflr r3
940 tovirt(r3,r3) 963 tovirt(r3,r3)