Linux Audio

Check our new training course

Yocto distribution development and maintenance

Need a Yocto distribution for your embedded project?
Loading...
v6.13.7
 1/* SPDX-License-Identifier: GPL-2.0 */
 2/*
 3 *    Copyright IBM Corp 2000, 2011
 4 *    Author(s): Holger Smolinski <Holger.Smolinski@de.ibm.com>,
 5 *		 Denis Joseph Barrow,
 
 
 6 */
 7
 8#include <linux/linkage.h>
 9#include <asm/asm-offsets.h>
10#include <asm/nospec-insn.h>
11#include <asm/sigp.h>
12#include <asm/lowcore.h>
13
14	GEN_BR_THUNK %r9
15
16#
17# Issue "store status" for the current CPU to its prefix page
18# and call passed function afterwards
19#
20# r2 = Function to be called after store status
21# r3 = Parameter for function
22#
23SYM_CODE_START(store_status)
24	STMG_LC	%r0,%r15,__LC_GPREGS_SAVE_AREA
25	/* General purpose registers */
26	GET_LC	%r13
27	/* Control registers */
28	stctg	%c0,%c15,__LC_CREGS_SAVE_AREA(%r13)
29	/* Access registers */
30	stamy	%a0,%a15,__LC_AREGS_SAVE_AREA(%r13)
31	/* Floating point registers */
32	lay	%r1,__LC_FPREGS_SAVE_AREA(%r13)
33	std	%f0, 0x00(%r1)
34	std	%f1, 0x08(%r1)
35	std	%f2, 0x10(%r1)
36	std	%f3, 0x18(%r1)
37	std	%f4, 0x20(%r1)
38	std	%f5, 0x28(%r1)
39	std	%f6, 0x30(%r1)
40	std	%f7, 0x38(%r1)
41	std	%f8, 0x40(%r1)
42	std	%f9, 0x48(%r1)
43	std	%f10,0x50(%r1)
44	std	%f11,0x58(%r1)
45	std	%f12,0x60(%r1)
46	std	%f13,0x68(%r1)
47	std	%f14,0x70(%r1)
48	std	%f15,0x78(%r1)
49	/* Floating point control register */
50	lay	%r1,__LC_FP_CREG_SAVE_AREA(%r13)
51	stfpc	0(%r1)
52	/* CPU timer */
53	lay	%r1,__LC_CPU_TIMER_SAVE_AREA(%r13)
54	stpt	0(%r1)
55	/* Store prefix register */
56	lay	%r1,__LC_PREFIX_SAVE_AREA(%r13)
57	stpx	0(%r1)
58	/* Clock comparator - seven bytes */
59	larl	%r4,clkcmp
60	stckc	0(%r4)
61	lay	%r1,__LC_CLOCK_COMP_SAVE_AREA(%r13)
62	mvc	1(7,%r1),1(%r4)
63	/* Program status word */
64	lay	%r1,__LC_PSW_SAVE_AREA(%r13)
65	epsw	%r4,%r5
66	st	%r4,0(%r1)
67	st	%r5,4(%r1)
68	stg	%r2,8(%r1)
69	lgr	%r9,%r2
70	lgr	%r2,%r3
71	BR_EX	%r9
72SYM_CODE_END(store_status)
73
74	.section .bss
75	.balign	8
76SYM_DATA_LOCAL(clkcmp,	.quad 0x0000000000000000)
77	.previous
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
v3.1
 
 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
 9#include <linux/linkage.h>
10#include <asm/asm-offsets.h>
 
 
 
11
 
 
 
 
 
12#
13# do_reipl_asm
14# Parameter: r2 = schid of reipl device
15#
16ENTRY(do_reipl_asm)
17		basr	%r13,0
18.Lpg0:		lpsw	.Lnewpsw-.Lpg0(%r13)
19.Lpg1:		# do store status of all registers
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
21		stm	%r0,%r15,__LC_GPREGS_SAVE_AREA
22		stctl	%c0,%c15,__LC_CREGS_SAVE_AREA
23		stam	%a0,%a15,__LC_AREGS_SAVE_AREA
24		l	%r10,.Ldump_pfx-.Lpg0(%r13)
25		mvc	__LC_PREFIX_SAVE_AREA(4),0(%r10)
26		stckc	.Lclkcmp-.Lpg0(%r13)
27		mvc	__LC_CLOCK_COMP_SAVE_AREA(8),.Lclkcmp-.Lpg0(%r13)
28		stpt	__LC_CPU_TIMER_SAVE_AREA
29		st	%r13, __LC_PSW_SAVE_AREA+4
30		lctl	%c6,%c6,.Lall-.Lpg0(%r13)
31		lr	%r1,%r2
32		mvc	__LC_PGM_NEW_PSW(8),.Lpcnew-.Lpg0(%r13)
33		stsch	.Lschib-.Lpg0(%r13)
34		oi	.Lschib+5-.Lpg0(%r13),0x84
35.Lecs:  	xi	.Lschib+27-.Lpg0(%r13),0x01
36		msch	.Lschib-.Lpg0(%r13)
37		lhi	%r0,5
38.Lssch:		ssch	.Liplorb-.Lpg0(%r13)
39		jz	.L001
40		brct	%r0,.Lssch
41		bas	%r14,.Ldisab-.Lpg0(%r13)
42.L001:		mvc	__LC_IO_NEW_PSW(8),.Lionew-.Lpg0(%r13)
43.Ltpi:		lpsw	.Lwaitpsw-.Lpg0(%r13)
44.Lcont:		c	%r1,__LC_SUBCHANNEL_ID
45		jnz	.Ltpi
46		clc	__LC_IO_INT_PARM(4),.Liplorb-.Lpg0(%r13)
47		jnz	.Ltpi
48		tsch	.Liplirb-.Lpg0(%r13)
49		tm	.Liplirb+9-.Lpg0(%r13),0xbf
50		jz	.L002
51		bas	%r14,.Ldisab-.Lpg0(%r13)
52.L002:		tm	.Liplirb+8-.Lpg0(%r13),0xf3
53		jz	.L003
54		bas	%r14,.Ldisab-.Lpg0(%r13)
55.L003:		st	%r1,__LC_SUBCHANNEL_ID
56		lpsw	0
57		sigp	0,0,0(6)
58.Ldisab:	st	%r14,.Ldispsw+4-.Lpg0(%r13)
59		lpsw	.Ldispsw-.Lpg0(%r13)
60		.align	8
61.Lclkcmp:	.quad	0x0000000000000000
62.Lall:		.long	0xff000000
63.Ldump_pfx:	.long	dump_prefix_page
64		.align	8
65.Lnewpsw:	.long	0x00080000,0x80000000+.Lpg1
66.Lpcnew:	.long	0x00080000,0x80000000+.Lecs
67.Lionew:	.long	0x00080000,0x80000000+.Lcont
68.Lwaitpsw:	.long	0x020a0000,0x00000000+.Ltpi
69.Ldispsw:	.long	0x000a0000,0x00000000
70.Liplccws:	.long	0x02000000,0x60000018
71		.long	0x08000008,0x20000001
72.Liplorb:	.long	0x0049504c,0x0040ff80
73		.long	0x00000000+.Liplccws
74.Lschib:	.long	0x00000000,0x00000000
75		.long	0x00000000,0x00000000
76		.long	0x00000000,0x00000000
77		.long	0x00000000,0x00000000
78		.long	0x00000000,0x00000000
79		.long	0x00000000,0x00000000
80.Liplirb:	.long	0x00000000,0x00000000
81		.long	0x00000000,0x00000000
82		.long	0x00000000,0x00000000
83		.long	0x00000000,0x00000000
84		.long	0x00000000,0x00000000
85		.long	0x00000000,0x00000000
86		.long	0x00000000,0x00000000
87		.long	0x00000000,0x00000000