diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2010-02-26 16:37:51 -0500 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2010-02-26 16:37:32 -0500 |
commit | 61fd330dee1606a6bdb741f9c156bca386a4e438 (patch) | |
tree | f75e704da40d315edc830e5fc729d7108f4bb262 /arch/s390/kernel/head.S | |
parent | 34b9243a300736c08dc32eaeb2f359401fcf9c0a (diff) |
[S390] codepage conversion of kernel parameter line
Move the ebcdic to ascii conversion of the kernel parameter line from
head.S to early.c and convert the assembler code to C.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/head.S')
-rw-r--r-- | arch/s390/kernel/head.S | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/arch/s390/kernel/head.S b/arch/s390/kernel/head.S index 9e4dc6084875..1fb59055c7ca 100644 --- a/arch/s390/kernel/head.S +++ b/arch/s390/kernel/head.S | |||
@@ -287,19 +287,7 @@ iplstart: | |||
287 | bz .Lagain1 # skip dateset trailer | 287 | bz .Lagain1 # skip dateset trailer |
288 | la %r5,0(%r4,%r2) | 288 | la %r5,0(%r4,%r2) |
289 | lr %r3,%r2 | 289 | lr %r3,%r2 |
290 | .Lidebc: | 290 | la %r3,COMMAND_LINE-PARMAREA(%r12) # load adr. of command line |
291 | tm 0(%r5),0x80 # high order bit set ? | ||
292 | bo .Ldocv # yes -> convert from EBCDIC | ||
293 | ahi %r5,-1 | ||
294 | bct %r3,.Lidebc | ||
295 | b .Lnocv | ||
296 | .Ldocv: | ||
297 | l %r3,.Lcvtab | ||
298 | tr 0(256,%r4),0(%r3) # convert parameters to ascii | ||
299 | tr 256(256,%r4),0(%r3) | ||
300 | tr 512(256,%r4),0(%r3) | ||
301 | tr 768(122,%r4),0(%r3) | ||
302 | .Lnocv: la %r3,COMMAND_LINE-PARMAREA(%r12) # load adr. of command line | ||
303 | mvc 0(256,%r3),0(%r4) | 291 | mvc 0(256,%r3),0(%r4) |
304 | mvc 256(256,%r3),256(%r4) | 292 | mvc 256(256,%r3),256(%r4) |
305 | mvc 512(256,%r3),512(%r4) | 293 | mvc 512(256,%r3),512(%r4) |
@@ -383,7 +371,6 @@ iplstart: | |||
383 | .Linitrd:.long _end + 0x400000 # default address of initrd | 371 | .Linitrd:.long _end + 0x400000 # default address of initrd |
384 | .Lparm: .long PARMAREA | 372 | .Lparm: .long PARMAREA |
385 | .Lstartup: .long startup | 373 | .Lstartup: .long startup |
386 | .Lcvtab:.long _ebcasc # ebcdic to ascii table | ||
387 | .Lreset:.byte 0xc3,0xc8,0xc1,0xd5,0xc7,0xc5,0x40,0xd9,0xc4,0xd9,0x40 | 374 | .Lreset:.byte 0xc3,0xc8,0xc1,0xd5,0xc7,0xc5,0x40,0xd9,0xc4,0xd9,0x40 |
388 | .byte 0xc1,0xd3,0xd3,0x40,0xd2,0xc5,0xc5,0xd7,0x40,0xd5,0xd6 | 375 | .byte 0xc1,0xd3,0xd3,0x40,0xd2,0xc5,0xc5,0xd7,0x40,0xd5,0xd6 |
389 | .byte 0xc8,0xd6,0xd3,0xc4 # "change rdr all keep nohold" | 376 | .byte 0xc8,0xd6,0xd3,0xc4 # "change rdr all keep nohold" |
@@ -416,13 +403,10 @@ start: | |||
416 | .sk8x8: | 403 | .sk8x8: |
417 | mvc 0(240,%r8),0(%r9) # copy iplparms into buffer | 404 | mvc 0(240,%r8),0(%r9) # copy iplparms into buffer |
418 | .gotr: | 405 | .gotr: |
419 | l %r10,.tbl # EBCDIC to ASCII table | ||
420 | tr 0(240,%r8),0(%r10) | ||
421 | slr %r0,%r0 | 406 | slr %r0,%r0 |
422 | st %r0,INITRD_SIZE+ARCH_OFFSET-PARMAREA(%r11) | 407 | st %r0,INITRD_SIZE+ARCH_OFFSET-PARMAREA(%r11) |
423 | st %r0,INITRD_START+ARCH_OFFSET-PARMAREA(%r11) | 408 | st %r0,INITRD_START+ARCH_OFFSET-PARMAREA(%r11) |
424 | j startup # continue with startup | 409 | j startup # continue with startup |
425 | .tbl: .long _ebcasc # translate table | ||
426 | .cmd: .long COMMAND_LINE # address of command line buffer | 410 | .cmd: .long COMMAND_LINE # address of command line buffer |
427 | .parm: .long PARMAREA | 411 | .parm: .long PARMAREA |
428 | .lowcase: | 412 | .lowcase: |