summaryrefslogtreecommitdiffstats
path: root/sys/boot/powerpc/loader/start.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/boot/powerpc/loader/start.c')
-rw-r--r--sys/boot/powerpc/loader/start.c108
1 files changed, 54 insertions, 54 deletions
diff --git a/sys/boot/powerpc/loader/start.c b/sys/boot/powerpc/loader/start.c
index 9f37ce0..dced920 100644
--- a/sys/boot/powerpc/loader/start.c
+++ b/sys/boot/powerpc/loader/start.c
@@ -38,63 +38,63 @@
void startup(void *, int, int (*)(void *), char *, int);
#ifdef XCOFF_GLUE
-asm("
- .text
- .globl _entry
-_entry:
- .long _start,0,0
+asm(" \n\
+ .text \n\
+ .globl _entry \n\
+_entry: \n\
+ .long _start,0,0 \n\
");
#endif
-__asm("
- .data
-stack:
- .space 16388
-
- .text
- .globl _start
-_start:
- li 8,0
- li 9,0x100
- mtctr 9
-1:
- dcbf 0,8
- icbi 0,8
- addi 8,8,0x20
- bdnz 1b
- sync
- isync
-
- lis 1,stack@ha
- addi 1,1,stack@l
- addi 1,1,8192
-
- mfmsr 8
- li 0,0
- mtmsr 0
- isync
-
- mtibatu 0,0
- mtibatu 1,0
- mtibatu 2,0
- mtibatu 3,0
- mtdbatu 0,0
- mtdbatu 1,0
- mtdbatu 2,0
- mtdbatu 3,0
-
- li 9,0x12 /* BATL(0, BAT_M, BAT_PP_RW) */
- mtibatl 0,9
- mtdbatl 0,9
- li 9,0x1ffe /* BATU(0, BAT_BL_256M, BAT_Vs) */
- mtibatu 0,9
- mtdbatu 0,9
- isync
-
- mtmsr 8
- isync
-
- b startup
+__asm(" \n\
+ .data \n\
+stack: \n\
+ .space 16388 \n\
+ \n\
+ .text \n\
+ .globl _start \n\
+_start: \n\
+ li %r8,0 \n\
+ li %r9,0x100 \n\
+ mtctr %r9 \n\
+1: \n\
+ dcbf %r0,%r8 \n\
+ icbi %r0,%r8 \n\
+ addi %r8,%r8,0x20 \n\
+ bdnz 1b \n\
+ sync \n\
+ isync \n\
+ \n\
+ lis %r1,stack@ha \n\
+ addi %r1,%r1,stack@l \n\
+ addi %r1,%r1,8192 \n\
+ \n\
+ mfmsr %r8 \n\
+ li %r0,0 \n\
+ mtmsr %r0 \n\
+ isync \n\
+ \n\
+ mtibatu 0,%r0 \n\
+ mtibatu 1,%r0 \n\
+ mtibatu 2,%r0 \n\
+ mtibatu 3,%r0 \n\
+ mtdbatu 0,%r0 \n\
+ mtdbatu 1,%r0 \n\
+ mtdbatu 2,%r0 \n\
+ mtdbatu 3,%r0 \n\
+ \n\
+ li %r9,0x12 /* BATL(0, BAT_M, BAT_PP_RW) */ \n\
+ mtibatl 0,%r9 \n\
+ mtdbatl 0,%r9 \n\
+ li %r9,0x1ffe /* BATU(0, BAT_BL_256M, BAT_Vs) */ \n\
+ mtibatu 0,%r9 \n\
+ mtdbatu 0,%r9 \n\
+ isync \n\
+ \n\
+ mtmsr %r8 \n\
+ isync \n\
+ \n\
+ b startup \n\
");
void
OpenPOWER on IntegriCloud