diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/kernel/head_32.S | 7 | ||||
-rw-r--r-- | arch/powerpc/kernel/head_40x.S | 15 | ||||
-rw-r--r-- | arch/powerpc/kernel/head_44x.S | 16 | ||||
-rw-r--r-- | arch/powerpc/kernel/head_8xx.S | 13 | ||||
-rw-r--r-- | arch/powerpc/kernel/head_fsl_booke.S | 42 | ||||
-rw-r--r-- | arch/powerpc/kernel/setup_32.c | 2 |
6 files changed, 39 insertions, 56 deletions
diff --git a/arch/powerpc/kernel/head_32.S b/arch/powerpc/kernel/head_32.S index ba250d505e07..0654dba2c1f1 100644 --- a/arch/powerpc/kernel/head_32.S +++ b/arch/powerpc/kernel/head_32.S | |||
@@ -139,8 +139,7 @@ __start: | |||
139 | trap | 139 | trap |
140 | #endif /* CONFIG_PPC_PMAC */ | 140 | #endif /* CONFIG_PPC_PMAC */ |
141 | 141 | ||
142 | 1: mr r31,r3 /* save parameters */ | 142 | 1: mr r31,r3 /* save device tree ptr */ |
143 | mr r30,r4 | ||
144 | li r24,0 /* cpu # */ | 143 | li r24,0 /* cpu # */ |
145 | 144 | ||
146 | /* | 145 | /* |
@@ -964,8 +963,8 @@ start_here: | |||
964 | * Do early platform-specific initialization, | 963 | * Do early platform-specific initialization, |
965 | * and set up the MMU. | 964 | * and set up the MMU. |
966 | */ | 965 | */ |
967 | mr r3,r31 | 966 | li r3,0 |
968 | mr r4,r30 | 967 | mr r4,r31 |
969 | bl machine_init | 968 | bl machine_init |
970 | bl __save_cpu_setup | 969 | bl __save_cpu_setup |
971 | bl MMU_init | 970 | bl MMU_init |
diff --git a/arch/powerpc/kernel/head_40x.S b/arch/powerpc/kernel/head_40x.S index a91626d87fc9..872a6af83bad 100644 --- a/arch/powerpc/kernel/head_40x.S +++ b/arch/powerpc/kernel/head_40x.S | |||
@@ -58,13 +58,7 @@ | |||
58 | _ENTRY(_stext); | 58 | _ENTRY(_stext); |
59 | _ENTRY(_start); | 59 | _ENTRY(_start); |
60 | 60 | ||
61 | /* Save parameters we are passed. | 61 | mr r31,r3 /* save device tree ptr */ |
62 | */ | ||
63 | mr r31,r3 | ||
64 | mr r30,r4 | ||
65 | mr r29,r5 | ||
66 | mr r28,r6 | ||
67 | mr r27,r7 | ||
68 | 62 | ||
69 | /* We have to turn on the MMU right away so we get cache modes | 63 | /* We have to turn on the MMU right away so we get cache modes |
70 | * set correctly. | 64 | * set correctly. |
@@ -849,11 +843,8 @@ start_here: | |||
849 | /* | 843 | /* |
850 | * Decide what sort of machine this is and initialize the MMU. | 844 | * Decide what sort of machine this is and initialize the MMU. |
851 | */ | 845 | */ |
852 | mr r3,r31 | 846 | li r3,0 |
853 | mr r4,r30 | 847 | mr r4,r31 |
854 | mr r5,r29 | ||
855 | mr r6,r28 | ||
856 | mr r7,r27 | ||
857 | bl machine_init | 848 | bl machine_init |
858 | bl MMU_init | 849 | bl MMU_init |
859 | 850 | ||
diff --git a/arch/powerpc/kernel/head_44x.S b/arch/powerpc/kernel/head_44x.S index f8e971ba94f5..b725dab0f88a 100644 --- a/arch/powerpc/kernel/head_44x.S +++ b/arch/powerpc/kernel/head_44x.S | |||
@@ -61,14 +61,7 @@ _ENTRY(_start); | |||
61 | * of abatron_pteptrs | 61 | * of abatron_pteptrs |
62 | */ | 62 | */ |
63 | nop | 63 | nop |
64 | /* | 64 | mr r31,r3 /* save device tree ptr */ |
65 | * Save parameters we are passed | ||
66 | */ | ||
67 | mr r31,r3 | ||
68 | mr r30,r4 | ||
69 | mr r29,r5 | ||
70 | mr r28,r6 | ||
71 | mr r27,r7 | ||
72 | li r24,0 /* CPU number */ | 65 | li r24,0 /* CPU number */ |
73 | 66 | ||
74 | bl init_cpu_state | 67 | bl init_cpu_state |
@@ -120,11 +113,8 @@ _ENTRY(_start); | |||
120 | /* | 113 | /* |
121 | * Decide what sort of machine this is and initialize the MMU. | 114 | * Decide what sort of machine this is and initialize the MMU. |
122 | */ | 115 | */ |
123 | mr r3,r31 | 116 | li r3,0 |
124 | mr r4,r30 | 117 | mr r4,r31 |
125 | mr r5,r29 | ||
126 | mr r6,r28 | ||
127 | mr r7,r27 | ||
128 | bl machine_init | 118 | bl machine_init |
129 | bl MMU_init | 119 | bl MMU_init |
130 | 120 | ||
diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S index 1cbf64e6b416..b68cb173ba2c 100644 --- a/arch/powerpc/kernel/head_8xx.S +++ b/arch/powerpc/kernel/head_8xx.S | |||
@@ -76,11 +76,7 @@ _ENTRY(_start); | |||
76 | */ | 76 | */ |
77 | .globl __start | 77 | .globl __start |
78 | __start: | 78 | __start: |
79 | mr r31,r3 /* save parameters */ | 79 | mr r31,r3 /* save device tree ptr */ |
80 | mr r30,r4 | ||
81 | mr r29,r5 | ||
82 | mr r28,r6 | ||
83 | mr r27,r7 | ||
84 | 80 | ||
85 | /* We have to turn on the MMU right away so we get cache modes | 81 | /* We have to turn on the MMU right away so we get cache modes |
86 | * set correctly. | 82 | * set correctly. |
@@ -723,11 +719,8 @@ start_here: | |||
723 | /* | 719 | /* |
724 | * Decide what sort of machine this is and initialize the MMU. | 720 | * Decide what sort of machine this is and initialize the MMU. |
725 | */ | 721 | */ |
726 | mr r3,r31 | 722 | li r3,0 |
727 | mr r4,r30 | 723 | mr r4,r31 |
728 | mr r5,r29 | ||
729 | mr r6,r28 | ||
730 | mr r7,r27 | ||
731 | bl machine_init | 724 | bl machine_init |
732 | bl MMU_init | 725 | bl MMU_init |
733 | 726 | ||
diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl_booke.S index 4ea9bfbf67e9..e1c699f3b7a7 100644 --- a/arch/powerpc/kernel/head_fsl_booke.S +++ b/arch/powerpc/kernel/head_fsl_booke.S | |||
@@ -63,17 +63,30 @@ _ENTRY(_start); | |||
63 | * of abatron_pteptrs | 63 | * of abatron_pteptrs |
64 | */ | 64 | */ |
65 | nop | 65 | nop |
66 | /* | 66 | |
67 | * Save parameters we are passed | 67 | /* Translate device tree address to physical, save in r30/r31 */ |
68 | */ | 68 | mfmsr r16 |
69 | mr r31,r3 | 69 | mfspr r17,SPRN_PID |
70 | mr r30,r4 | 70 | rlwinm r17,r17,16,0x3fff0000 /* turn PID into MAS6[SPID] */ |
71 | mr r29,r5 | 71 | rlwimi r17,r16,28,0x00000001 /* turn MSR[DS] into MAS6[SAS] */ |
72 | mr r28,r6 | 72 | mtspr SPRN_MAS6,r17 |
73 | mr r27,r7 | 73 | |
74 | li r25,0 /* phys kernel start (low) */ | 74 | tlbsx 0,r3 /* must succeed */ |
75 | li r24,0 /* CPU number */ | 75 | |
76 | li r23,0 /* phys kernel start (high) */ | 76 | mfspr r16,SPRN_MAS1 |
77 | mfspr r20,SPRN_MAS3 | ||
78 | rlwinm r17,r16,25,0x1f /* r17 = log2(page size) */ | ||
79 | li r18,1024 | ||
80 | slw r18,r18,r17 /* r18 = page size */ | ||
81 | addi r18,r18,-1 | ||
82 | and r19,r3,r18 /* r19 = page offset */ | ||
83 | andc r31,r20,r18 /* r3 = page base */ | ||
84 | or r31,r31,r19 /* r3 = devtree phys addr */ | ||
85 | mfspr r30,SPRN_MAS7 | ||
86 | |||
87 | li r25,0 /* phys kernel start (low) */ | ||
88 | li r24,0 /* CPU number */ | ||
89 | li r23,0 /* phys kernel start (high) */ | ||
77 | 90 | ||
78 | /* We try to not make any assumptions about how the boot loader | 91 | /* We try to not make any assumptions about how the boot loader |
79 | * setup or used the TLBs. We invalidate all mappings from the | 92 | * setup or used the TLBs. We invalidate all mappings from the |
@@ -198,11 +211,8 @@ _ENTRY(__early_start) | |||
198 | /* | 211 | /* |
199 | * Decide what sort of machine this is and initialize the MMU. | 212 | * Decide what sort of machine this is and initialize the MMU. |
200 | */ | 213 | */ |
201 | mr r3,r31 | 214 | mr r3,r30 |
202 | mr r4,r30 | 215 | mr r4,r31 |
203 | mr r5,r29 | ||
204 | mr r6,r28 | ||
205 | mr r7,r27 | ||
206 | bl machine_init | 216 | bl machine_init |
207 | bl MMU_init | 217 | bl MMU_init |
208 | 218 | ||
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c index 209135af0a40..c1ce86357ecb 100644 --- a/arch/powerpc/kernel/setup_32.c +++ b/arch/powerpc/kernel/setup_32.c | |||
@@ -117,7 +117,7 @@ notrace unsigned long __init early_init(unsigned long dt_ptr) | |||
117 | * This is called very early on the boot process, after a minimal | 117 | * This is called very early on the boot process, after a minimal |
118 | * MMU environment has been set up but before MMU_init is called. | 118 | * MMU environment has been set up but before MMU_init is called. |
119 | */ | 119 | */ |
120 | notrace void __init machine_init(unsigned long dt_ptr) | 120 | notrace void __init machine_init(u64 dt_ptr) |
121 | { | 121 | { |
122 | lockdep_init(); | 122 | lockdep_init(); |
123 | 123 | ||