aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/head64.S
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2005-10-30 18:00:11 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-10-30 20:37:16 -0500
commit1e8e338325fa0f2bd5c1c800086e900cf188d2cd (patch)
treefd1e051c0883725d3b24ec9acb428aeddaccf07b /arch/s390/kernel/head64.S
parented3cb6f039bb296457bfd2877cba6ad0287d8d54 (diff)
[PATCH] s390: export ipl device parameters
Sysfs interface to export ipl device parameters. Dependent on the ipl type the interface will look like this: - ccw ipl: /sys/firmware/ipl/device /ipl_type - fcp ipl: /sys/firmware/ipl/binary_parameter /bootprog /br_lba /device /ipl_type /lun /scp_data /wwpn - otherwise (unknown that is): /sys/firmware/ipl/ipl_type Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Greg KH <greg@kroah.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/s390/kernel/head64.S')
-rw-r--r--arch/s390/kernel/head64.S66
1 files changed, 64 insertions, 2 deletions
diff --git a/arch/s390/kernel/head64.S b/arch/s390/kernel/head64.S
index c9ff0404c875..193aafa72f54 100644
--- a/arch/s390/kernel/head64.S
+++ b/arch/s390/kernel/head64.S
@@ -484,6 +484,8 @@ start:
484startup:basr %r13,0 # get base 484startup:basr %r13,0 # get base
485.LPG1: sll %r13,1 # remove high order bit 485.LPG1: sll %r13,1 # remove high order bit
486 srl %r13,1 486 srl %r13,1
487 l %r1,.Lget_ipl_device_addr-.LPG1(%r13)
488 basr %r14,%r1
487 lhi %r1,1 # mode 1 = esame 489 lhi %r1,1 # mode 1 = esame
488 slr %r0,%r0 # set cpuid to zero 490 slr %r0,%r0 # set cpuid to zero
489 sigp %r1,%r0,0x12 # switch to esame mode 491 sigp %r1,%r0,0x12 # switch to esame mode
@@ -556,6 +558,9 @@ startup:basr %r13,0 # get base
556 mlgr %r2,%r1 # mem size in bytes in %r3 558 mlgr %r2,%r1 # mem size in bytes in %r3
557 b .Lfchunk-.LPG1(%r13) 559 b .Lfchunk-.LPG1(%r13)
558 560
561 .align 4
562.Lget_ipl_device_addr:
563 .long .Lget_ipl_device
559.Lpmask: 564.Lpmask:
560 .byte 0 565 .byte 0
561 .align 8 566 .align 8
@@ -746,6 +751,63 @@ _pstart:
746 .global _pend 751 .global _pend
747_pend: 752_pend:
748 753
754.Lget_ipl_device:
755 basr %r12,0
756.LPG2: l %r1,0xb8 # get sid
757 sll %r1,15 # test if subchannel is enabled
758 srl %r1,31
759 ltr %r1,%r1
760 bz 0(%r14) # subchannel disabled
761 l %r1,0xb8
762 la %r5,.Lipl_schib-.LPG2(%r12)
763 stsch 0(%r5) # get schib of subchannel
764 bnz 0(%r14) # schib not available
765 tm 5(%r5),0x01 # devno valid?
766 bno 0(%r14)
767 la %r6,ipl_parameter_flags-.LPG2(%r12)
768 oi 3(%r6),0x01 # set flag
769 la %r2,ipl_devno-.LPG2(%r12)
770 mvc 0(2,%r2),6(%r5) # store devno
771 tm 4(%r5),0x80 # qdio capable device?
772 bno 0(%r14)
773 oi 3(%r6),0x02 # set flag
774
775 # copy ipl parameters
776
777 lhi %r0,4096
778 l %r2,20(%r0) # get address of parameter list
779 lhi %r3,IPL_PARMBLOCK_ORIGIN
780 st %r3,20(%r0)
781 lhi %r4,1
782 cr %r2,%r3 # start parameters < destination ?
783 jl 0f
784 lhi %r1,1 # copy direction is upwards
785 j 1f
7860: lhi %r1,-1 # copy direction is downwards
787 ar %r2,%r0
788 ar %r3,%r0
789 ar %r2,%r1
790 ar %r3,%r1
7911: mvc 0(1,%r3),0(%r2) # finally copy ipl parameters
792 ar %r3,%r1
793 ar %r2,%r1
794 sr %r0,%r4
795 jne 1b
796 b 0(%r14)
797
798 .align 4
799.Lipl_schib:
800 .rept 13
801 .long 0
802 .endr
803
804 .globl ipl_parameter_flags
805ipl_parameter_flags:
806 .long 0
807 .globl ipl_devno
808ipl_devno:
809 .word 0
810
749#ifdef CONFIG_SHARED_KERNEL 811#ifdef CONFIG_SHARED_KERNEL
750 .org 0x100000 812 .org 0x100000
751#endif 813#endif
@@ -755,7 +817,7 @@ _pend:
755# 817#
756 .globl _stext 818 .globl _stext
757_stext: basr %r13,0 # get base 819_stext: basr %r13,0 # get base
758.LPG2: 820.LPG3:
759# 821#
760# Setup stack 822# Setup stack
761# 823#
@@ -774,7 +836,7 @@ _stext: basr %r13,0 # get base
774 lctlg %c0,%c15,0(%r15) 836 lctlg %c0,%c15,0(%r15)
775 837
776# 838#
777 lam 0,15,.Laregs-.LPG2(%r13) # load access regs needed by uaccess 839 lam 0,15,.Laregs-.LPG3(%r13) # load access regs needed by uaccess
778 brasl %r14,start_kernel # go to C code 840 brasl %r14,start_kernel # go to C code
779# 841#
780# We returned from start_kernel ?!? PANIK 842# We returned from start_kernel ?!? PANIK