xref: /openbmc/linux/arch/s390/kernel/earlypgm.S (revision a89d60fc)
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 *    Copyright IBM Corp. 2006, 2007
4 *    Author(s): Michael Holzheu <holzheu@de.ibm.com>
5 */
6
7#include <linux/linkage.h>
8#include <asm/asm-offsets.h>
9
10SYM_CODE_START(early_pgm_check_handler)
11	stmg	%r8,%r15,__LC_SAVE_AREA_SYNC
12	aghi	%r15,-(STACK_FRAME_OVERHEAD+__PT_SIZE)
13	la	%r11,STACK_FRAME_OVERHEAD(%r15)
14	xc	__SF_BACKCHAIN(8,%r15),__SF_BACKCHAIN(%r15)
15	stmg	%r0,%r7,__PT_R0(%r11)
16	mvc	__PT_PSW(16,%r11),__LC_PGM_OLD_PSW
17	mvc	__PT_R8(64,%r11),__LC_SAVE_AREA_SYNC
18	lgr	%r2,%r11
19	brasl	%r14,__do_early_pgm_check
20	mvc	__LC_RETURN_PSW(16),STACK_FRAME_OVERHEAD+__PT_PSW(%r15)
21	lmg	%r0,%r15,STACK_FRAME_OVERHEAD+__PT_R0(%r15)
22	lpswe	__LC_RETURN_PSW
23SYM_CODE_END(early_pgm_check_handler)
24