aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/exceptions-64e.S
diff options
context:
space:
mode:
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)