diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2006-09-20 09:59:15 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2006-09-20 09:59:15 -0400 |
commit | e87bfe51b5ca2db99dd680bbb1e8fe3c94b607df (patch) | |
tree | abbffd8e3ca0edcbe5a0e36e1e94deb9a3b10adc /arch/s390/kernel/head64.S | |
parent | 1375fc1fb0434a26f93c59b1b9f3fdb8bf90bba5 (diff) |
[S390] convert some assembler to C.
Convert GET_IPL_DEVICE assembler macro to C function.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/head64.S')
-rw-r--r-- | arch/s390/kernel/head64.S | 39 |
1 files changed, 25 insertions, 14 deletions
diff --git a/arch/s390/kernel/head64.S b/arch/s390/kernel/head64.S index c2005101fee1..1ebaa338aa7e 100644 --- a/arch/s390/kernel/head64.S +++ b/arch/s390/kernel/head64.S | |||
@@ -39,7 +39,6 @@ startup_continue: | |||
39 | basr %r13,0 # get base | 39 | basr %r13,0 # get base |
40 | .LPG1: sll %r13,1 # remove high order bit | 40 | .LPG1: sll %r13,1 # remove high order bit |
41 | srl %r13,1 | 41 | srl %r13,1 |
42 | GET_IPL_DEVICE | ||
43 | lhi %r1,1 # mode 1 = esame | 42 | lhi %r1,1 # mode 1 = esame |
44 | mvi __LC_AR_MODE_ID,1 # set esame flag | 43 | mvi __LC_AR_MODE_ID,1 # set esame flag |
45 | slr %r0,%r0 # set cpuid to zero | 44 | slr %r0,%r0 # set cpuid to zero |
@@ -49,7 +48,18 @@ startup_continue: | |||
49 | lg %r12,.Lparmaddr-.LPG1(%r13)# pointer to parameter area | 48 | lg %r12,.Lparmaddr-.LPG1(%r13)# pointer to parameter area |
50 | # move IPL device to lowcore | 49 | # move IPL device to lowcore |
51 | mvc __LC_IPLDEV(4),IPL_DEVICE+4-PARMAREA(%r12) | 50 | mvc __LC_IPLDEV(4),IPL_DEVICE+4-PARMAREA(%r12) |
51 | # | ||
52 | # Setup stack | ||
53 | # | ||
54 | larl %r15,init_thread_union | ||
55 | lg %r14,__TI_task(%r15) # cache current in lowcore | ||
56 | stg %r14,__LC_CURRENT | ||
57 | aghi %r15,1<<(PAGE_SHIFT+THREAD_ORDER) # init_task_union + THREAD_SIZE | ||
58 | stg %r15,__LC_KERNEL_STACK # set end of kernel stack | ||
59 | aghi %r15,-160 | ||
60 | xc __SF_BACKCHAIN(4,%r15),__SF_BACKCHAIN(%r15) # clear backchain | ||
52 | 61 | ||
62 | brasl %r14,ipl_save_parameters | ||
53 | # | 63 | # |
54 | # clear bss memory | 64 | # clear bss memory |
55 | # | 65 | # |
@@ -269,6 +279,19 @@ startup_continue: | |||
269 | .Lparmaddr: | 279 | .Lparmaddr: |
270 | .quad PARMAREA | 280 | .quad PARMAREA |
271 | 281 | ||
282 | .globl ipl_schib | ||
283 | ipl_schib: | ||
284 | .rept 13 | ||
285 | .long 0 | ||
286 | .endr | ||
287 | |||
288 | .globl ipl_flags | ||
289 | ipl_flags: | ||
290 | .long 0 | ||
291 | .globl ipl_devno | ||
292 | ipl_devno: | ||
293 | .word 0 | ||
294 | |||
272 | .org 0x12000 | 295 | .org 0x12000 |
273 | .globl s390_readinfo_sccb | 296 | .globl s390_readinfo_sccb |
274 | s390_readinfo_sccb: | 297 | s390_readinfo_sccb: |
@@ -300,24 +323,12 @@ s390_readinfo_sccb: | |||
300 | .globl _stext | 323 | .globl _stext |
301 | _stext: basr %r13,0 # get base | 324 | _stext: basr %r13,0 # get base |
302 | .LPG3: | 325 | .LPG3: |
303 | # | ||
304 | # Setup stack | ||
305 | # | ||
306 | larl %r15,init_thread_union | ||
307 | lg %r14,__TI_task(%r15) # cache current in lowcore | ||
308 | stg %r14,__LC_CURRENT | ||
309 | aghi %r15,1<<(PAGE_SHIFT+THREAD_ORDER) # init_task_union + THREAD_SIZE | ||
310 | stg %r15,__LC_KERNEL_STACK # set end of kernel stack | ||
311 | aghi %r15,-160 | ||
312 | xc __SF_BACKCHAIN(4,%r15),__SF_BACKCHAIN(%r15) # clear backchain | ||
313 | |||
314 | # check control registers | 326 | # check control registers |
315 | stctg %c0,%c15,0(%r15) | 327 | stctg %c0,%c15,0(%r15) |
316 | oi 6(%r15),0x40 # enable sigp emergency signal | 328 | oi 6(%r15),0x40 # enable sigp emergency signal |
317 | oi 4(%r15),0x10 # switch on low address proctection | 329 | oi 4(%r15),0x10 # switch on low address proctection |
318 | lctlg %c0,%c15,0(%r15) | 330 | lctlg %c0,%c15,0(%r15) |
319 | 331 | ||
320 | # | ||
321 | lam 0,15,.Laregs-.LPG3(%r13) # load access regs needed by uaccess | 332 | lam 0,15,.Laregs-.LPG3(%r13) # load access regs needed by uaccess |
322 | brasl %r14,start_kernel # go to C code | 333 | brasl %r14,start_kernel # go to C code |
323 | # | 334 | # |
@@ -325,7 +336,7 @@ _stext: basr %r13,0 # get base | |||
325 | # | 336 | # |
326 | basr %r13,0 | 337 | basr %r13,0 |
327 | lpswe .Ldw-.(%r13) # load disabled wait psw | 338 | lpswe .Ldw-.(%r13) # load disabled wait psw |
328 | # | 339 | |
329 | .align 8 | 340 | .align 8 |
330 | .Ldw: .quad 0x0002000180000000,0x0000000000000000 | 341 | .Ldw: .quad 0x0002000180000000,0x0000000000000000 |
331 | .Laregs: .long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 | 342 | .Laregs: .long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 |