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/head31.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/head31.S')
-rw-r--r-- | arch/s390/kernel/head31.S | 43 |
1 files changed, 30 insertions, 13 deletions
diff --git a/arch/s390/kernel/head31.S b/arch/s390/kernel/head31.S index d8bb68a72527..1fa9fa1ca740 100644 --- a/arch/s390/kernel/head31.S +++ b/arch/s390/kernel/head31.S | |||
@@ -37,13 +37,23 @@ startup:basr %r13,0 # get base | |||
37 | 37 | ||
38 | startup_continue: | 38 | startup_continue: |
39 | basr %r13,0 # get base | 39 | basr %r13,0 # get base |
40 | .LPG1: GET_IPL_DEVICE | 40 | .LPG1: mvi __LC_AR_MODE_ID,0 # set ESA flag (mode 0) |
41 | mvi __LC_AR_MODE_ID,0 # set ESA flag (mode 0) | ||
42 | lctl %c0,%c15,.Lctl-.LPG1(%r13) # load control registers | 41 | lctl %c0,%c15,.Lctl-.LPG1(%r13) # load control registers |
43 | l %r12,.Lparmaddr-.LPG1(%r13) # pointer to parameter area | 42 | l %r12,.Lparmaddr-.LPG1(%r13) # pointer to parameter area |
44 | # move IPL device to lowcore | 43 | # move IPL device to lowcore |
45 | mvc __LC_IPLDEV(4),IPL_DEVICE-PARMAREA(%r12) | 44 | mvc __LC_IPLDEV(4),IPL_DEVICE-PARMAREA(%r12) |
45 | # | ||
46 | # Setup stack | ||
47 | # | ||
48 | l %r15,.Linittu-.LPG1(%r13) | ||
49 | mvc __LC_CURRENT(4),__TI_task(%r15) | ||
50 | ahi %r15,1<<(PAGE_SHIFT+THREAD_ORDER) # init_task_union+THREAD_SIZE | ||
51 | st %r15,__LC_KERNEL_STACK # set end of kernel stack | ||
52 | ahi %r15,-96 | ||
53 | xc __SF_BACKCHAIN(4,%r15),__SF_BACKCHAIN(%r15) # clear backchain | ||
46 | 54 | ||
55 | l %r14,.Lipl_save_parameters-.LPG1(%r13) | ||
56 | basr %r14,%r14 | ||
47 | # | 57 | # |
48 | # clear bss memory | 58 | # clear bss memory |
49 | # | 59 | # |
@@ -115,6 +125,10 @@ startup_continue: | |||
115 | b .Lfchunk-.LPG1(%r13) | 125 | b .Lfchunk-.LPG1(%r13) |
116 | 126 | ||
117 | .align 4 | 127 | .align 4 |
128 | .Lipl_save_parameters: | ||
129 | .long ipl_save_parameters | ||
130 | .Linittu: | ||
131 | .long init_thread_union | ||
118 | .Lpmask: | 132 | .Lpmask: |
119 | .byte 0 | 133 | .byte 0 |
120 | .align 8 | 134 | .align 8 |
@@ -274,6 +288,20 @@ startup_continue: | |||
274 | .Lbss_end: .long _end | 288 | .Lbss_end: .long _end |
275 | .Lparmaddr: .long PARMAREA | 289 | .Lparmaddr: .long PARMAREA |
276 | .Lsccbaddr: .long .Lsccb | 290 | .Lsccbaddr: .long .Lsccb |
291 | |||
292 | .globl ipl_schib | ||
293 | ipl_schib: | ||
294 | .rept 13 | ||
295 | .long 0 | ||
296 | .endr | ||
297 | |||
298 | .globl ipl_flags | ||
299 | ipl_flags: | ||
300 | .long 0 | ||
301 | .globl ipl_devno | ||
302 | ipl_devno: | ||
303 | .word 0 | ||
304 | |||
277 | .org 0x12000 | 305 | .org 0x12000 |
278 | .globl s390_readinfo_sccb | 306 | .globl s390_readinfo_sccb |
279 | s390_readinfo_sccb: | 307 | s390_readinfo_sccb: |
@@ -305,16 +333,6 @@ s390_readinfo_sccb: | |||
305 | .globl _stext | 333 | .globl _stext |
306 | _stext: basr %r13,0 # get base | 334 | _stext: basr %r13,0 # get base |
307 | .LPG3: | 335 | .LPG3: |
308 | # | ||
309 | # Setup stack | ||
310 | # | ||
311 | l %r15,.Linittu-.LPG3(%r13) | ||
312 | mvc __LC_CURRENT(4),__TI_task(%r15) | ||
313 | ahi %r15,1<<(PAGE_SHIFT+THREAD_ORDER) # init_task_union+THREAD_SIZE | ||
314 | st %r15,__LC_KERNEL_STACK # set end of kernel stack | ||
315 | ahi %r15,-96 | ||
316 | xc __SF_BACKCHAIN(4,%r15),__SF_BACKCHAIN(%r15) # clear backchain | ||
317 | |||
318 | # check control registers | 336 | # check control registers |
319 | stctl %c0,%c15,0(%r15) | 337 | stctl %c0,%c15,0(%r15) |
320 | oi 2(%r15),0x40 # enable sigp emergency signal | 338 | oi 2(%r15),0x40 # enable sigp emergency signal |
@@ -333,6 +351,5 @@ _stext: basr %r13,0 # get base | |||
333 | # | 351 | # |
334 | .align 8 | 352 | .align 8 |
335 | .Ldw: .long 0x000a0000,0x00000000 | 353 | .Ldw: .long 0x000a0000,0x00000000 |
336 | .Linittu:.long init_thread_union | ||
337 | .Lstart:.long start_kernel | 354 | .Lstart:.long start_kernel |
338 | .Laregs:.long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 | 355 | .Laregs:.long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 |