reipl.S 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /*
  2. * arch/s390/kernel/reipl.S
  3. *
  4. * S390 version
  5. * Copyright (C) 2000 IBM Deutschland Entwicklung GmbH, IBM Corporation
  6. * Author(s): Holger Smolinski (Holger.Smolinski@de.ibm.com)
  7. */
  8. #include <asm/asm-offsets.h>
  9. #
  10. # do_reipl_asm
  11. # Parameter: r2 = schid of reipl device
  12. #
  13. .globl do_reipl_asm
  14. do_reipl_asm: basr %r13,0
  15. .Lpg0: lpsw .Lnewpsw-.Lpg0(%r13)
  16. .Lpg1: # do store status of all registers
  17. stm %r0,%r15,__LC_GPREGS_SAVE_AREA
  18. stctl %c0,%c15,__LC_CREGS_SAVE_AREA
  19. stam %a0,%a15,__LC_AREGS_SAVE_AREA
  20. l %r10,.Ldump_pfx-.Lpg0(%r13)
  21. mvc __LC_PREFIX_SAVE_AREA(4),0(%r10)
  22. stckc .Lclkcmp-.Lpg0(%r13)
  23. mvc __LC_CLOCK_COMP_SAVE_AREA(8),.Lclkcmp-.Lpg0(%r13)
  24. stpt __LC_CPU_TIMER_SAVE_AREA
  25. st %r13, __LC_PSW_SAVE_AREA+4
  26. lctl %c6,%c6,.Lall-.Lpg0(%r13)
  27. lr %r1,%r2
  28. mvc __LC_PGM_NEW_PSW(8),.Lpcnew-.Lpg0(%r13)
  29. stsch .Lschib-.Lpg0(%r13)
  30. oi .Lschib+5-.Lpg0(%r13),0x84
  31. .Lecs: xi .Lschib+27-.Lpg0(%r13),0x01
  32. msch .Lschib-.Lpg0(%r13)
  33. lhi %r0,5
  34. .Lssch: ssch .Liplorb-.Lpg0(%r13)
  35. jz .L001
  36. brct %r0,.Lssch
  37. bas %r14,.Ldisab-.Lpg0(%r13)
  38. .L001: mvc __LC_IO_NEW_PSW(8),.Lionew-.Lpg0(%r13)
  39. .Ltpi: lpsw .Lwaitpsw-.Lpg0(%r13)
  40. .Lcont: c %r1,__LC_SUBCHANNEL_ID
  41. jnz .Ltpi
  42. clc __LC_IO_INT_PARM(4),.Liplorb-.Lpg0(%r13)
  43. jnz .Ltpi
  44. tsch .Liplirb-.Lpg0(%r13)
  45. tm .Liplirb+9-.Lpg0(%r13),0xbf
  46. jz .L002
  47. bas %r14,.Ldisab-.Lpg0(%r13)
  48. .L002: tm .Liplirb+8-.Lpg0(%r13),0xf3
  49. jz .L003
  50. bas %r14,.Ldisab-.Lpg0(%r13)
  51. .L003: st %r1,__LC_SUBCHANNEL_ID
  52. lpsw 0
  53. sigp 0,0,0(6)
  54. .Ldisab: st %r14,.Ldispsw+4-.Lpg0(%r13)
  55. lpsw .Ldispsw-.Lpg0(%r13)
  56. .align 8
  57. .Lclkcmp: .quad 0x0000000000000000
  58. .Lall: .long 0xff000000
  59. .Ldump_pfx: .long dump_prefix_page
  60. .align 8
  61. .Lnewpsw: .long 0x00080000,0x80000000+.Lpg1
  62. .Lpcnew: .long 0x00080000,0x80000000+.Lecs
  63. .Lionew: .long 0x00080000,0x80000000+.Lcont
  64. .Lwaitpsw: .long 0x020a0000,0x00000000+.Ltpi
  65. .Ldispsw: .long 0x000a0000,0x00000000
  66. .Liplccws: .long 0x02000000,0x60000018
  67. .long 0x08000008,0x20000001
  68. .Liplorb: .long 0x0049504c,0x0040ff80
  69. .long 0x00000000+.Liplccws
  70. .Lschib: .long 0x00000000,0x00000000
  71. .long 0x00000000,0x00000000
  72. .long 0x00000000,0x00000000
  73. .long 0x00000000,0x00000000
  74. .long 0x00000000,0x00000000
  75. .long 0x00000000,0x00000000
  76. .Liplirb: .long 0x00000000,0x00000000
  77. .long 0x00000000,0x00000000
  78. .long 0x00000000,0x00000000
  79. .long 0x00000000,0x00000000
  80. .long 0x00000000,0x00000000
  81. .long 0x00000000,0x00000000
  82. .long 0x00000000,0x00000000
  83. .long 0x00000000,0x00000000