Merge branch 'master' of /home/sam/kernel/linux-2.6/
[pandora-kernel.git] / arch / powerpc / kernel / misc_64.S
1 /*
2  * This file contains miscellaneous low-level functions.
3  *    Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
4  *
5  * Largely rewritten by Cort Dougan (cort@cs.nmt.edu)
6  * and Paul Mackerras.
7  * Adapted for iSeries by Mike Corrigan (mikejc@us.ibm.com)
8  * PPC64 updates by Dave Engebretsen (engebret@us.ibm.com)
9  *
10  * This program is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU General Public License
12  * as published by the Free Software Foundation; either version
13  * 2 of the License, or (at your option) any later version.
14  *
15  */
16
17 #include <linux/sys.h>
18 #include <asm/unistd.h>
19 #include <asm/errno.h>
20 #include <asm/processor.h>
21 #include <asm/page.h>
22 #include <asm/cache.h>
23 #include <asm/ppc_asm.h>
24 #include <asm/asm-offsets.h>
25 #include <asm/cputable.h>
26 #include <asm/thread_info.h>
27
28         .text
29
30 _GLOBAL(get_msr)
31         mfmsr   r3
32         blr
33
34 _GLOBAL(get_srr0)
35         mfsrr0  r3
36         blr
37
38 _GLOBAL(get_srr1)
39         mfsrr1  r3
40         blr
41
42 #ifdef CONFIG_IRQSTACKS
43 _GLOBAL(call_do_softirq)
44         mflr    r0
45         std     r0,16(r1)
46         stdu    r1,THREAD_SIZE-112(r3)
47         mr      r1,r3
48         bl      .__do_softirq
49         ld      r1,0(r1)
50         ld      r0,16(r1)
51         mtlr    r0
52         blr
53
54 _GLOBAL(call___do_IRQ)
55         mflr    r0
56         std     r0,16(r1)
57         stdu    r1,THREAD_SIZE-112(r5)
58         mr      r1,r5
59         bl      .__do_IRQ
60         ld      r1,0(r1)
61         ld      r0,16(r1)
62         mtlr    r0
63         blr
64 #endif /* CONFIG_IRQSTACKS */
65
66         .section        ".toc","aw"
67 PPC64_CACHES:
68         .tc             ppc64_caches[TC],ppc64_caches
69         .section        ".text"
70
71 /*
72  * Write any modified data cache blocks out to memory
73  * and invalidate the corresponding instruction cache blocks.
74  *
75  * flush_icache_range(unsigned long start, unsigned long stop)
76  *
77  *   flush all bytes from start through stop-1 inclusive
78  */
79
80 _KPROBE(__flush_icache_range)
81
82 /*
83  * Flush the data cache to memory 
84  * 
85  * Different systems have different cache line sizes
86  * and in some cases i-cache and d-cache line sizes differ from
87  * each other.
88  */
89         ld      r10,PPC64_CACHES@toc(r2)
90         lwz     r7,DCACHEL1LINESIZE(r10)/* Get cache line size */
91         addi    r5,r7,-1
92         andc    r6,r3,r5                /* round low to line bdy */
93         subf    r8,r6,r4                /* compute length */
94         add     r8,r8,r5                /* ensure we get enough */
95         lwz     r9,DCACHEL1LOGLINESIZE(r10)     /* Get log-2 of cache line size */
96         srw.    r8,r8,r9                /* compute line count */
97         beqlr                           /* nothing to do? */
98         mtctr   r8
99 1:      dcbst   0,r6
100         add     r6,r6,r7
101         bdnz    1b
102         sync
103
104 /* Now invalidate the instruction cache */
105         
106         lwz     r7,ICACHEL1LINESIZE(r10)        /* Get Icache line size */
107         addi    r5,r7,-1
108         andc    r6,r3,r5                /* round low to line bdy */
109         subf    r8,r6,r4                /* compute length */
110         add     r8,r8,r5
111         lwz     r9,ICACHEL1LOGLINESIZE(r10)     /* Get log-2 of Icache line size */
112         srw.    r8,r8,r9                /* compute line count */
113         beqlr                           /* nothing to do? */
114         mtctr   r8
115 2:      icbi    0,r6
116         add     r6,r6,r7
117         bdnz    2b
118         isync
119         blr
120         .previous .text
121 /*
122  * Like above, but only do the D-cache.
123  *
124  * flush_dcache_range(unsigned long start, unsigned long stop)
125  *
126  *    flush all bytes from start to stop-1 inclusive
127  */
128 _GLOBAL(flush_dcache_range)
129
130 /*
131  * Flush the data cache to memory 
132  * 
133  * Different systems have different cache line sizes
134  */
135         ld      r10,PPC64_CACHES@toc(r2)
136         lwz     r7,DCACHEL1LINESIZE(r10)        /* Get dcache line size */
137         addi    r5,r7,-1
138         andc    r6,r3,r5                /* round low to line bdy */
139         subf    r8,r6,r4                /* compute length */
140         add     r8,r8,r5                /* ensure we get enough */
141         lwz     r9,DCACHEL1LOGLINESIZE(r10)     /* Get log-2 of dcache line size */
142         srw.    r8,r8,r9                /* compute line count */
143         beqlr                           /* nothing to do? */
144         mtctr   r8
145 0:      dcbst   0,r6
146         add     r6,r6,r7
147         bdnz    0b
148         sync
149         blr
150
151 /*
152  * Like above, but works on non-mapped physical addresses.
153  * Use only for non-LPAR setups ! It also assumes real mode
154  * is cacheable. Used for flushing out the DART before using
155  * it as uncacheable memory 
156  *
157  * flush_dcache_phys_range(unsigned long start, unsigned long stop)
158  *
159  *    flush all bytes from start to stop-1 inclusive
160  */
161 _GLOBAL(flush_dcache_phys_range)
162         ld      r10,PPC64_CACHES@toc(r2)
163         lwz     r7,DCACHEL1LINESIZE(r10)        /* Get dcache line size */
164         addi    r5,r7,-1
165         andc    r6,r3,r5                /* round low to line bdy */
166         subf    r8,r6,r4                /* compute length */
167         add     r8,r8,r5                /* ensure we get enough */
168         lwz     r9,DCACHEL1LOGLINESIZE(r10)     /* Get log-2 of dcache line size */
169         srw.    r8,r8,r9                /* compute line count */
170         beqlr                           /* nothing to do? */
171         mfmsr   r5                      /* Disable MMU Data Relocation */
172         ori     r0,r5,MSR_DR
173         xori    r0,r0,MSR_DR
174         sync
175         mtmsr   r0
176         sync
177         isync
178         mtctr   r8
179 0:      dcbst   0,r6
180         add     r6,r6,r7
181         bdnz    0b
182         sync
183         isync
184         mtmsr   r5                      /* Re-enable MMU Data Relocation */
185         sync
186         isync
187         blr
188
189 _GLOBAL(flush_inval_dcache_range)
190         ld      r10,PPC64_CACHES@toc(r2)
191         lwz     r7,DCACHEL1LINESIZE(r10)        /* Get dcache line size */
192         addi    r5,r7,-1
193         andc    r6,r3,r5                /* round low to line bdy */
194         subf    r8,r6,r4                /* compute length */
195         add     r8,r8,r5                /* ensure we get enough */
196         lwz     r9,DCACHEL1LOGLINESIZE(r10)/* Get log-2 of dcache line size */
197         srw.    r8,r8,r9                /* compute line count */
198         beqlr                           /* nothing to do? */
199         sync
200         isync
201         mtctr   r8
202 0:      dcbf    0,r6
203         add     r6,r6,r7
204         bdnz    0b
205         sync
206         isync
207         blr
208
209
210 /*
211  * Flush a particular page from the data cache to RAM.
212  * Note: this is necessary because the instruction cache does *not*
213  * snoop from the data cache.
214  *
215  *      void __flush_dcache_icache(void *page)
216  */
217 _GLOBAL(__flush_dcache_icache)
218 /*
219  * Flush the data cache to memory 
220  * 
221  * Different systems have different cache line sizes
222  */
223
224 /* Flush the dcache */
225         ld      r7,PPC64_CACHES@toc(r2)
226         clrrdi  r3,r3,PAGE_SHIFT                    /* Page align */
227         lwz     r4,DCACHEL1LINESPERPAGE(r7)     /* Get # dcache lines per page */
228         lwz     r5,DCACHEL1LINESIZE(r7)         /* Get dcache line size */
229         mr      r6,r3
230         mtctr   r4
231 0:      dcbst   0,r6
232         add     r6,r6,r5
233         bdnz    0b
234         sync
235
236 /* Now invalidate the icache */ 
237
238         lwz     r4,ICACHEL1LINESPERPAGE(r7)     /* Get # icache lines per page */
239         lwz     r5,ICACHEL1LINESIZE(r7)         /* Get icache line size */
240         mtctr   r4
241 1:      icbi    0,r3
242         add     r3,r3,r5
243         bdnz    1b
244         isync
245         blr
246
247 /*
248  * identify_cpu and calls setup_cpu
249  * In:  r3 = base of the cpu_specs array
250  *      r4 = address of cur_cpu_spec
251  *      r5 = relocation offset
252  */
253 _GLOBAL(identify_cpu)
254         mfpvr   r7
255 1:
256         lwz     r8,CPU_SPEC_PVR_MASK(r3)
257         and     r8,r8,r7
258         lwz     r9,CPU_SPEC_PVR_VALUE(r3)
259         cmplw   0,r9,r8
260         beq     1f
261         addi    r3,r3,CPU_SPEC_ENTRY_SIZE
262         b       1b
263 1:
264         sub     r0,r3,r5
265         std     r0,0(r4)
266         ld      r4,CPU_SPEC_SETUP(r3)
267         cmpdi   0,r4,0
268         add     r4,r4,r5
269         beqlr
270         ld      r4,0(r4)
271         add     r4,r4,r5
272         mtctr   r4
273         /* Calling convention for cpu setup is r3=offset, r4=cur_cpu_spec */
274         mr      r4,r3
275         mr      r3,r5
276         bctr
277
278 /*
279  * do_cpu_ftr_fixups - goes through the list of CPU feature fixups
280  * and writes nop's over sections of code that don't apply for this cpu.
281  * r3 = data offset (not changed)
282  */
283 _GLOBAL(do_cpu_ftr_fixups)
284         /* Get CPU 0 features */
285         LOAD_REG_IMMEDIATE(r6,cur_cpu_spec)
286         sub     r6,r6,r3
287         ld      r4,0(r6)
288         sub     r4,r4,r3
289         ld      r4,CPU_SPEC_FEATURES(r4)
290         /* Get the fixup table */
291         LOAD_REG_IMMEDIATE(r6,__start___ftr_fixup)
292         sub     r6,r6,r3
293         LOAD_REG_IMMEDIATE(r7,__stop___ftr_fixup)
294         sub     r7,r7,r3
295         /* Do the fixup */
296 1:      cmpld   r6,r7
297         bgelr
298         addi    r6,r6,32
299         ld      r8,-32(r6)      /* mask */
300         and     r8,r8,r4
301         ld      r9,-24(r6)      /* value */
302         cmpld   r8,r9
303         beq     1b
304         ld      r8,-16(r6)      /* section begin */
305         ld      r9,-8(r6)       /* section end */
306         subf.   r9,r8,r9
307         beq     1b
308         /* write nops over the section of code */
309         /* todo: if large section, add a branch at the start of it */
310         srwi    r9,r9,2
311         mtctr   r9
312         sub     r8,r8,r3
313         lis     r0,0x60000000@h /* nop */
314 3:      stw     r0,0(r8)
315         andi.   r10,r4,CPU_FTR_SPLIT_ID_CACHE@l
316         beq     2f
317         dcbst   0,r8            /* suboptimal, but simpler */
318         sync
319         icbi    0,r8
320 2:      addi    r8,r8,4
321         bdnz    3b
322         sync                    /* additional sync needed on g4 */
323         isync
324         b       1b
325
326 #if defined(CONFIG_PPC_PMAC) || defined(CONFIG_PPC_MAPLE)
327 /*
328  * Do an IO access in real mode
329  */
330 _GLOBAL(real_readb)
331         mfmsr   r7
332         ori     r0,r7,MSR_DR
333         xori    r0,r0,MSR_DR
334         sync
335         mtmsrd  r0
336         sync
337         isync
338         mfspr   r6,SPRN_HID4
339         rldicl  r5,r6,32,0
340         ori     r5,r5,0x100
341         rldicl  r5,r5,32,0
342         sync
343         mtspr   SPRN_HID4,r5
344         isync
345         slbia
346         isync
347         lbz     r3,0(r3)
348         sync
349         mtspr   SPRN_HID4,r6
350         isync
351         slbia
352         isync
353         mtmsrd  r7
354         sync
355         isync
356         blr
357
358         /*
359  * Do an IO access in real mode
360  */
361 _GLOBAL(real_writeb)
362         mfmsr   r7
363         ori     r0,r7,MSR_DR
364         xori    r0,r0,MSR_DR
365         sync
366         mtmsrd  r0
367         sync
368         isync
369         mfspr   r6,SPRN_HID4
370         rldicl  r5,r6,32,0
371         ori     r5,r5,0x100
372         rldicl  r5,r5,32,0
373         sync
374         mtspr   SPRN_HID4,r5
375         isync
376         slbia
377         isync
378         stb     r3,0(r4)
379         sync
380         mtspr   SPRN_HID4,r6
381         isync
382         slbia
383         isync
384         mtmsrd  r7
385         sync
386         isync
387         blr
388 #endif /* defined(CONFIG_PPC_PMAC) || defined(CONFIG_PPC_MAPLE) */
389
390 #ifdef CONFIG_CPU_FREQ_PMAC64
391 /*
392  * SCOM access functions for 970 (FX only for now)
393  *
394  * unsigned long scom970_read(unsigned int address);
395  * void scom970_write(unsigned int address, unsigned long value);
396  *
397  * The address passed in is the 24 bits register address. This code
398  * is 970 specific and will not check the status bits, so you should
399  * know what you are doing.
400  */
401 _GLOBAL(scom970_read)
402         /* interrupts off */
403         mfmsr   r4
404         ori     r0,r4,MSR_EE
405         xori    r0,r0,MSR_EE
406         mtmsrd  r0,1
407
408         /* rotate 24 bits SCOM address 8 bits left and mask out it's low 8 bits
409          * (including parity). On current CPUs they must be 0'd,
410          * and finally or in RW bit
411          */
412         rlwinm  r3,r3,8,0,15
413         ori     r3,r3,0x8000
414
415         /* do the actual scom read */
416         sync
417         mtspr   SPRN_SCOMC,r3
418         isync
419         mfspr   r3,SPRN_SCOMD
420         isync
421         mfspr   r0,SPRN_SCOMC
422         isync
423
424         /* XXX: fixup result on some buggy 970's (ouch ! we lost a bit, bah
425          * that's the best we can do). Not implemented yet as we don't use
426          * the scom on any of the bogus CPUs yet, but may have to be done
427          * ultimately
428          */
429
430         /* restore interrupts */
431         mtmsrd  r4,1
432         blr
433
434
435 _GLOBAL(scom970_write)
436         /* interrupts off */
437         mfmsr   r5
438         ori     r0,r5,MSR_EE
439         xori    r0,r0,MSR_EE
440         mtmsrd  r0,1
441
442         /* rotate 24 bits SCOM address 8 bits left and mask out it's low 8 bits
443          * (including parity). On current CPUs they must be 0'd.
444          */
445
446         rlwinm  r3,r3,8,0,15
447
448         sync
449         mtspr   SPRN_SCOMD,r4      /* write data */
450         isync
451         mtspr   SPRN_SCOMC,r3      /* write command */
452         isync
453         mfspr   3,SPRN_SCOMC
454         isync
455
456         /* restore interrupts */
457         mtmsrd  r5,1
458         blr
459 #endif /* CONFIG_CPU_FREQ_PMAC64 */
460
461
462 /*
463  * Create a kernel thread
464  *   kernel_thread(fn, arg, flags)
465  */
466 _GLOBAL(kernel_thread)
467         std     r29,-24(r1)
468         std     r30,-16(r1)
469         stdu    r1,-STACK_FRAME_OVERHEAD(r1)
470         mr      r29,r3
471         mr      r30,r4
472         ori     r3,r5,CLONE_VM  /* flags */
473         oris    r3,r3,(CLONE_UNTRACED>>16)
474         li      r4,0            /* new sp (unused) */
475         li      r0,__NR_clone
476         sc
477         cmpdi   0,r3,0          /* parent or child? */
478         bne     1f              /* return if parent */
479         li      r0,0
480         stdu    r0,-STACK_FRAME_OVERHEAD(r1)
481         ld      r2,8(r29)
482         ld      r29,0(r29)
483         mtlr    r29              /* fn addr in lr */
484         mr      r3,r30          /* load arg and call fn */
485         blrl
486         li      r0,__NR_exit    /* exit after child exits */
487         li      r3,0
488         sc
489 1:      addi    r1,r1,STACK_FRAME_OVERHEAD      
490         ld      r29,-24(r1)
491         ld      r30,-16(r1)
492         blr
493
494 /*
495  * disable_kernel_fp()
496  * Disable the FPU.
497  */
498 _GLOBAL(disable_kernel_fp)
499         mfmsr   r3
500         rldicl  r0,r3,(63-MSR_FP_LG),1
501         rldicl  r3,r0,(MSR_FP_LG+1),0
502         mtmsrd  r3                      /* disable use of fpu now */
503         isync
504         blr
505
506 #ifdef CONFIG_ALTIVEC
507
508 #if 0 /* this has no callers for now */
509 /*
510  * disable_kernel_altivec()
511  * Disable the VMX.
512  */
513 _GLOBAL(disable_kernel_altivec)
514         mfmsr   r3
515         rldicl  r0,r3,(63-MSR_VEC_LG),1
516         rldicl  r3,r0,(MSR_VEC_LG+1),0
517         mtmsrd  r3                      /* disable use of VMX now */
518         isync
519         blr
520 #endif /* 0 */
521
522 /*
523  * giveup_altivec(tsk)
524  * Disable VMX for the task given as the argument,
525  * and save the vector registers in its thread_struct.
526  * Enables the VMX for use in the kernel on return.
527  */
528 _GLOBAL(giveup_altivec)
529         mfmsr   r5
530         oris    r5,r5,MSR_VEC@h
531         mtmsrd  r5                      /* enable use of VMX now */
532         isync
533         cmpdi   0,r3,0
534         beqlr-                          /* if no previous owner, done */
535         addi    r3,r3,THREAD            /* want THREAD of task */
536         ld      r5,PT_REGS(r3)
537         cmpdi   0,r5,0
538         SAVE_32VRS(0,r4,r3)
539         mfvscr  vr0
540         li      r4,THREAD_VSCR
541         stvx    vr0,r4,r3
542         beq     1f
543         ld      r4,_MSR-STACK_FRAME_OVERHEAD(r5)
544         lis     r3,MSR_VEC@h
545         andc    r4,r4,r3                /* disable FP for previous task */
546         std     r4,_MSR-STACK_FRAME_OVERHEAD(r5)
547 1:
548 #ifndef CONFIG_SMP
549         li      r5,0
550         ld      r4,last_task_used_altivec@got(r2)
551         std     r5,0(r4)
552 #endif /* CONFIG_SMP */
553         blr
554
555 #endif /* CONFIG_ALTIVEC */
556
557 _GLOBAL(execve)
558         li      r0,__NR_execve
559         sc
560         bnslr
561         neg     r3,r3
562         blr
563
564 /* kexec_wait(phys_cpu)
565  *
566  * wait for the flag to change, indicating this kernel is going away but
567  * the slave code for the next one is at addresses 0 to 100.
568  *
569  * This is used by all slaves.
570  *
571  * Physical (hardware) cpu id should be in r3.
572  */
573 _GLOBAL(kexec_wait)
574         bl      1f
575 1:      mflr    r5
576         addi    r5,r5,kexec_flag-1b
577
578 99:     HMT_LOW
579 #ifdef CONFIG_KEXEC             /* use no memory without kexec */
580         lwz     r4,0(r5)
581         cmpwi   0,r4,0
582         bnea    0x60
583 #endif
584         b       99b
585
586 /* this can be in text because we won't change it until we are
587  * running in real anyways
588  */
589 kexec_flag:
590         .long   0
591
592
593 #ifdef CONFIG_KEXEC
594
595 /* kexec_smp_wait(void)
596  *
597  * call with interrupts off
598  * note: this is a terminal routine, it does not save lr
599  *
600  * get phys id from paca
601  * set paca id to -1 to say we got here
602  * switch to real mode
603  * join other cpus in kexec_wait(phys_id)
604  */
605 _GLOBAL(kexec_smp_wait)
606         lhz     r3,PACAHWCPUID(r13)
607         li      r4,-1
608         sth     r4,PACAHWCPUID(r13)     /* let others know we left */
609         bl      real_mode
610         b       .kexec_wait
611
612 /*
613  * switch to real mode (turn mmu off)
614  * we use the early kernel trick that the hardware ignores bits
615  * 0 and 1 (big endian) of the effective address in real mode
616  *
617  * don't overwrite r3 here, it is live for kexec_wait above.
618  */
619 real_mode:      /* assume normal blr return */
620 1:      li      r9,MSR_RI
621         li      r10,MSR_DR|MSR_IR
622         mflr    r11             /* return address to SRR0 */
623         mfmsr   r12
624         andc    r9,r12,r9
625         andc    r10,r12,r10
626
627         mtmsrd  r9,1
628         mtspr   SPRN_SRR1,r10
629         mtspr   SPRN_SRR0,r11
630         rfid
631
632
633 /*
634  * kexec_sequence(newstack, start, image, control, clear_all())
635  *
636  * does the grungy work with stack switching and real mode switches
637  * also does simple calls to other code
638  */
639
640 _GLOBAL(kexec_sequence)
641         mflr    r0
642         std     r0,16(r1)
643
644         /* switch stacks to newstack -- &kexec_stack.stack */
645         stdu    r1,THREAD_SIZE-112(r3)
646         mr      r1,r3
647
648         li      r0,0
649         std     r0,16(r1)
650
651         /* save regs for local vars on new stack.
652          * yes, we won't go back, but ...
653          */
654         std     r31,-8(r1)
655         std     r30,-16(r1)
656         std     r29,-24(r1)
657         std     r28,-32(r1)
658         std     r27,-40(r1)
659         std     r26,-48(r1)
660         std     r25,-56(r1)
661
662         stdu    r1,-112-64(r1)
663
664         /* save args into preserved regs */
665         mr      r31,r3                  /* newstack (both) */
666         mr      r30,r4                  /* start (real) */
667         mr      r29,r5                  /* image (virt) */
668         mr      r28,r6                  /* control, unused */
669         mr      r27,r7                  /* clear_all() fn desc */
670         mr      r26,r8                  /* spare */
671         lhz     r25,PACAHWCPUID(r13)    /* get our phys cpu from paca */
672
673         /* disable interrupts, we are overwriting kernel data next */
674         mfmsr   r3
675         rlwinm  r3,r3,0,17,15
676         mtmsrd  r3,1
677
678         /* copy dest pages, flush whole dest image */
679         mr      r3,r29
680         bl      .kexec_copy_flush       /* (image) */
681
682         /* turn off mmu */
683         bl      real_mode
684
685         /* clear out hardware hash page table and tlb */
686         ld      r5,0(r27)               /* deref function descriptor */
687         mtctr   r5
688         bctrl                           /* ppc_md.hash_clear_all(void); */
689
690 /*
691  *   kexec image calling is:
692  *      the first 0x100 bytes of the entry point are copied to 0
693  *
694  *      all slaves branch to slave = 0x60 (absolute)
695  *              slave(phys_cpu_id);
696  *
697  *      master goes to start = entry point
698  *              start(phys_cpu_id, start, 0);
699  *
700  *
701  *   a wrapper is needed to call existing kernels, here is an approximate
702  *   description of one method:
703  *
704  * v2: (2.6.10)
705  *   start will be near the boot_block (maybe 0x100 bytes before it?)
706  *   it will have a 0x60, which will b to boot_block, where it will wait
707  *   and 0 will store phys into struct boot-block and load r3 from there,
708  *   copy kernel 0-0x100 and tell slaves to back down to 0x60 again
709  *
710  * v1: (2.6.9)
711  *    boot block will have all cpus scanning device tree to see if they
712  *    are the boot cpu ?????
713  *    other device tree differences (prop sizes, va vs pa, etc)...
714  */
715
716         /* copy  0x100 bytes starting at start to 0 */
717         li      r3,0
718         mr      r4,r30
719         li      r5,0x100
720         li      r6,0
721         bl      .copy_and_flush /* (dest, src, copy limit, start offset) */
722 1:      /* assume normal blr return */
723
724         /* release other cpus to the new kernel secondary start at 0x60 */
725         mflr    r5
726         li      r6,1
727         stw     r6,kexec_flag-1b(5)
728         mr      r3,r25  # my phys cpu
729         mr      r4,r30  # start, aka phys mem offset
730         mtlr    4
731         li      r5,0
732         blr     /* image->start(physid, image->start, 0); */
733 #endif /* CONFIG_KEXEC */