aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc/kernel/head.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/parisc/kernel/head.S')
-rw-r--r--arch/parisc/kernel/head.S73
1 files changed, 22 insertions, 51 deletions
diff --git a/arch/parisc/kernel/head.S b/arch/parisc/kernel/head.S
index 28405edf8448..0b47afc20690 100644
--- a/arch/parisc/kernel/head.S
+++ b/arch/parisc/kernel/head.S
@@ -12,7 +12,7 @@
12 * Initial Version 04-23-1999 by Helge Deller <deller@gmx.de> 12 * Initial Version 04-23-1999 by Helge Deller <deller@gmx.de>
13 */ 13 */
14 14
15#include <linux/autoconf.h> /* for CONFIG_SMP */ 15#include <linux/config.h> /* for CONFIG_SMP */
16 16
17#include <asm/asm-offsets.h> 17#include <asm/asm-offsets.h>
18#include <asm/psw.h> 18#include <asm/psw.h>
@@ -36,10 +36,10 @@ boot_args:
36 .align 4 36 .align 4
37 .import init_thread_union,data 37 .import init_thread_union,data
38 .import fault_vector_20,code /* IVA parisc 2.0 32 bit */ 38 .import fault_vector_20,code /* IVA parisc 2.0 32 bit */
39#ifndef __LP64__ 39#ifndef CONFIG_64BIT
40 .import fault_vector_11,code /* IVA parisc 1.1 32 bit */ 40 .import fault_vector_11,code /* IVA parisc 1.1 32 bit */
41 .import $global$ /* forward declaration */ 41 .import $global$ /* forward declaration */
42#endif /*!LP64*/ 42#endif /*!CONFIG_64BIT*/
43 .export stext 43 .export stext
44 .export _stext,data /* Kernel want it this way! */ 44 .export _stext,data /* Kernel want it this way! */
45_stext: 45_stext:
@@ -76,7 +76,7 @@ $bss_loop:
76 mtctl %r4,%cr24 /* Initialize kernel root pointer */ 76 mtctl %r4,%cr24 /* Initialize kernel root pointer */
77 mtctl %r4,%cr25 /* Initialize user root pointer */ 77 mtctl %r4,%cr25 /* Initialize user root pointer */
78 78
79#ifdef __LP64__ 79#ifdef CONFIG_64BIT
80 /* Set pmd in pgd */ 80 /* Set pmd in pgd */
81 load32 PA(pmd0),%r5 81 load32 PA(pmd0),%r5
82 shrd %r5,PxD_VALUE_SHIFT,%r3 82 shrd %r5,PxD_VALUE_SHIFT,%r3
@@ -99,7 +99,7 @@ $bss_loop:
99 stw %r3,0(%r4) 99 stw %r3,0(%r4)
100 ldo (ASM_PAGE_SIZE >> PxD_VALUE_SHIFT)(%r3),%r3 100 ldo (ASM_PAGE_SIZE >> PxD_VALUE_SHIFT)(%r3),%r3
101 addib,> -1,%r1,1b 101 addib,> -1,%r1,1b
102#ifdef __LP64__ 102#ifdef CONFIG_64BIT
103 ldo ASM_PMD_ENTRY_SIZE(%r4),%r4 103 ldo ASM_PMD_ENTRY_SIZE(%r4),%r4
104#else 104#else
105 ldo ASM_PGD_ENTRY_SIZE(%r4),%r4 105 ldo ASM_PGD_ENTRY_SIZE(%r4),%r4
@@ -170,7 +170,7 @@ common_stext:
170 stw %r0,0x28(%r0) /* MEM_RENDEZ_HI */ 170 stw %r0,0x28(%r0) /* MEM_RENDEZ_HI */
171#endif /*CONFIG_SMP*/ 171#endif /*CONFIG_SMP*/
172 172
173#ifdef __LP64__ 173#ifdef CONFIG_64BIT
174 tophys_r1 %sp 174 tophys_r1 %sp
175 175
176 /* Save the rfi target address */ 176 /* Save the rfi target address */
@@ -224,8 +224,6 @@ stext_pdc_ret:
224 mtctl %r0,%cr12 224 mtctl %r0,%cr12
225 mtctl %r0,%cr13 225 mtctl %r0,%cr13
226 226
227 /* Prepare to RFI! Man all the cannons! */
228
229 /* Initialize the global data pointer */ 227 /* Initialize the global data pointer */
230 loadgp 228 loadgp
231 229
@@ -235,7 +233,7 @@ stext_pdc_ret:
235 * following short sequence of instructions can determine this 233 * following short sequence of instructions can determine this
236 * (without being illegal on a PA1.1 machine). 234 * (without being illegal on a PA1.1 machine).
237 */ 235 */
238#ifndef __LP64__ 236#ifndef CONFIG_64BIT
239 ldi 32,%r10 237 ldi 32,%r10
240 mtctl %r10,%cr11 238 mtctl %r10,%cr11
241 .level 2.0 239 .level 2.0
@@ -248,52 +246,22 @@ stext_pdc_ret:
248 246
249$is_pa20: 247$is_pa20:
250 .level LEVEL /* restore 1.1 || 2.0w */ 248 .level LEVEL /* restore 1.1 || 2.0w */
251#endif /*!LP64*/ 249#endif /*!CONFIG_64BIT*/
252 load32 PA(fault_vector_20),%r10 250 load32 PA(fault_vector_20),%r10
253 251
254$install_iva: 252$install_iva:
255 mtctl %r10,%cr14 253 mtctl %r10,%cr14
256 254
257#ifdef __LP64__ 255 b aligned_rfi /* Prepare to RFI! Man all the cannons! */
258 b aligned_rfi
259 nop 256 nop
260 257
261 .align 256 258 .align 128
262aligned_rfi: 259aligned_rfi:
263 ssm 0,0 260 pcxt_ssm_bug
264 nop /* 1 */
265 nop /* 2 */
266 nop /* 3 */
267 nop /* 4 */
268 nop /* 5 */
269 nop /* 6 */
270 nop /* 7 */
271 nop /* 8 */
272#endif
273 261
274#ifdef __LP64__ /* move to psw.h? */ 262 rsm PSW_SM_QUIET,%r0 /* off troublesome PSW bits */
275#define PSW_BITS PSW_Q+PSW_I+PSW_D+PSW_P+PSW_R 263 /* Don't need NOPs, have 8 compliant insn before rfi */
276#else
277#define PSW_BITS PSW_SM_Q
278#endif
279 264
280$rfi:
281 /* turn off troublesome PSW bits */
282 rsm PSW_BITS,%r0
283
284 /* kernel PSW:
285 * - no interruptions except HPMC and TOC (which are handled by PDC)
286 * - Q bit set (IODC / PDC interruptions)
287 * - big-endian
288 * - virtually mapped
289 */
290 load32 KERNEL_PSW,%r10
291 mtctl %r10,%ipsw
292
293 /* Set the space pointers for the post-RFI world
294 ** Clear the two-level IIA Space Queue, effectively setting
295 ** Kernel space.
296 */
297 mtctl %r0,%cr17 /* Clear IIASQ tail */ 265 mtctl %r0,%cr17 /* Clear IIASQ tail */
298 mtctl %r0,%cr17 /* Clear IIASQ head */ 266 mtctl %r0,%cr17 /* Clear IIASQ head */
299 267
@@ -301,8 +269,11 @@ $rfi:
301 mtctl %r11,%cr18 /* IIAOQ head */ 269 mtctl %r11,%cr18 /* IIAOQ head */
302 ldo 4(%r11),%r11 270 ldo 4(%r11),%r11
303 mtctl %r11,%cr18 /* IIAOQ tail */ 271 mtctl %r11,%cr18 /* IIAOQ tail */
272
273 load32 KERNEL_PSW,%r10
274 mtctl %r10,%ipsw
304 275
305 /* Jump to hyperspace */ 276 /* Jump through hyperspace to Virt Mode */
306 rfi 277 rfi
307 nop 278 nop
308 279
@@ -313,7 +284,7 @@ $rfi:
313 .import smp_init_current_idle_task,data 284 .import smp_init_current_idle_task,data
314 .import smp_callin,code 285 .import smp_callin,code
315 286
316#ifndef __LP64__ 287#ifndef CONFIG_64BIT
317smp_callin_rtn: 288smp_callin_rtn:
318 .proc 289 .proc
319 .callinfo 290 .callinfo
@@ -321,7 +292,7 @@ smp_callin_rtn:
321 nop 292 nop
322 nop 293 nop
323 .procend 294 .procend
324#endif /*!LP64*/ 295#endif /*!CONFIG_64BIT*/
325 296
326/*************************************************************************** 297/***************************************************************************
327* smp_slave_stext is executed by all non-monarch Processors when the Monarch 298* smp_slave_stext is executed by all non-monarch Processors when the Monarch
@@ -356,7 +327,7 @@ smp_slave_stext:
356 mtctl %r4,%cr24 /* Initialize kernel root pointer */ 327 mtctl %r4,%cr24 /* Initialize kernel root pointer */
357 mtctl %r4,%cr25 /* Initialize user root pointer */ 328 mtctl %r4,%cr25 /* Initialize user root pointer */
358 329
359#ifdef __LP64__ 330#ifdef CONFIG_64BIT
360 /* Setup PDCE_PROC entry */ 331 /* Setup PDCE_PROC entry */
361 copy %arg0,%r3 332 copy %arg0,%r3
362#else 333#else
@@ -373,7 +344,7 @@ smp_slave_stext:
373 344
374 .procend 345 .procend
375#endif /* CONFIG_SMP */ 346#endif /* CONFIG_SMP */
376#ifndef __LP64__ 347#ifndef CONFIG_64BIT
377 .data 348 .data
378 349
379 .align 4 350 .align 4
@@ -383,4 +354,4 @@ smp_slave_stext:
383 .size $global$,4 354 .size $global$,4
384$global$: 355$global$:
385 .word 0 356 .word 0
386#endif /*!LP64*/ 357#endif /*!CONFIG_64BIT*/