patch-2.4.21 linux-2.4.21/arch/s390x/kernel/head.S
Next file: linux-2.4.21/arch/s390x/kernel/process.c
Previous file: linux-2.4.21/arch/s390x/kernel/entry.S
Back to the patch index
Back to the overall index
- Lines: 75
- Date:
2003-06-13 07:51:32.000000000 -0700
- Orig file:
linux-2.4.20/arch/s390x/kernel/head.S
- Orig date:
2002-11-28 15:53:11.000000000 -0800
diff -urN linux-2.4.20/arch/s390x/kernel/head.S linux-2.4.21/arch/s390x/kernel/head.S
@@ -467,10 +467,21 @@
larl %r12,_pstart # pointer to parameter area
# move IPL device to lowcore
mvc __LC_IPLDEV(4),IPL_DEVICE+4-PARMAREA(%r12)
+
+#
+# clear bss memory
+#
+ larl %r2,__bss_start # start of bss segment
+ larl %r3,_end # end of bss segment
+ sgr %r3,%r2 # length of bss
+ sgr %r4,%r4 #
+ sgr %r5,%r5 # set src,length and pad to zero
+ mvcle %r2,%r4,0 # clear mem
+ jo .-4 # branch back, if not finish
+
# set program check new psw mask
mvc __LC_PGM_NEW_PSW(8),.Lpcmsk-.LPG1(%r13)
-
#
# find memory chunks.
#
@@ -537,11 +548,26 @@
tm __LC_CPUID,0xff # running under VM ?
bno 0f-.LPG1(%r13)
oi 7(%r12),1 # set VM flag
+#
+# we are running under VM, find out if we have PFIX
+#
+ la %r1,0f-.LPG1(%r13) # set program check address
+ stg %r1,__LC_PGM_NEW_PSW+8
+ lghi %r0,0x4000
+ lghi %r2,0
+ .long 0x83200098 # diag 2,0,x'0098' - lock page
+ lghi %r2,4
+ .long 0x83200098 # diag 2,0,x'0098' - unlock page
+ oi 7(%r12),128 # set PFIX flag
0: lh %r0,__LC_CPUID+4 # get cpu version
chi %r0,0x7490 # running on a P/390 ?
bne 1f-.LPG1(%r13)
oi 7(%r12),4 # set P/390 flag
1:
+ chi %r0,0x2084 # new stidp format?
+ bne 2f-.LPG1(%r13)
+ oi 7(%r12),64 # set new stidp flag
+2:
#
# find out if we have the MVPG instruction
@@ -631,16 +657,7 @@
stg %r15,__LC_KERNEL_STACK # set end of kernel stack
aghi %r15,-160
xc 0(8,%r15),0(%r15) # set backchain to zero
-#
-# clear bss memory
-#
- larl %r2,__bss_start # start of bss segment
- larl %r3,_end # end of bss segment
- sgr %r3,%r2 # length of bss
- sgr %r4,%r4 #
- sgr %r5,%r5 # set src,length and pad to zero
- mvcle %r2,%r4,0 # clear mem
- jo .-4 # branch back, if not finish
+
# check control registers
stctg %c0,%c15,0(%r15)
oi 6(%r15),0x20 # enable sigp external interrupts
@@ -658,5 +675,5 @@
#
.align 8
.Ldw: .quad 0x0002000180000000,0x0000000000000000
-.Laregs: .long 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0
+.Laregs: .long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)