[S390] Automatic IPL after dump

Provide new shutdown action "dump_reipl" for automatic ipl after dump.

Signed-off-by: Frank Munzert <munzert@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
This commit is contained in:
Frank Munzert
2009-03-26 15:23:43 +01:00
committed by Martin Schwidefsky
parent d7fd5f1e3b
commit 099b765139
6 changed files with 172 additions and 26 deletions

View File

@@ -111,7 +111,7 @@
#define __LC_PASTE 0xE40
#define __LC_PANIC_MAGIC 0xE00
#define __LC_DUMP_REIPL 0xE00
#ifndef __s390x__
#define __LC_PFAULT_INTPARM 0x080
#define __LC_CPU_TIMER_SAVE_AREA 0x0D8
@@ -286,12 +286,14 @@ struct _lowcore
__u64 int_clock; /* 0xc98 */
__u8 pad11[0xe00-0xca0]; /* 0xca0 */
/* 0xe00 is used as indicator for dump tools */
/* whether the kernel died with panic() or not */
__u32 panic_magic; /* 0xe00 */
/* 0xe00 contains the address of the IPL Parameter */
/* Information block. Dump tools need IPIB for IPL */
/* after dump. */
__u32 ipib; /* 0xe00 */
__u32 ipib_checksum; /* 0xe04 */
/* Align to the top 1k of prefix area */
__u8 pad12[0x1000-0xe04]; /* 0xe04 */
__u8 pad12[0x1000-0xe08]; /* 0xe08 */
#else /* !__s390x__ */
/* prefix area: defined by architecture */
__u32 ccw1[2]; /* 0x000 */
@@ -379,12 +381,14 @@ struct _lowcore
__u64 int_clock; /* 0xde8 */
__u8 pad12[0xe00-0xdf0]; /* 0xdf0 */
/* 0xe00 is used as indicator for dump tools */
/* whether the kernel died with panic() or not */
__u32 panic_magic; /* 0xe00 */
/* 0xe00 contains the address of the IPL Parameter */
/* Information block. Dump tools need IPIB for IPL */
/* after dump. */
__u64 ipib; /* 0xe00 */
__u32 ipib_checksum; /* 0xe08 */
/* Per cpu primary space access list */
__u8 pad_0xe04[0xe38-0xe04]; /* 0xe04 */
__u8 pad_0xe0c[0xe38-0xe0c]; /* 0xe0c */
__u64 vdso_per_cpu_data; /* 0xe38 */
__u32 paste[16]; /* 0xe40 */
@@ -433,8 +437,6 @@ static inline __u32 store_prefix(void)
return address;
}
#define __PANIC_MAGIC 0xDEADC0DE
#endif
#endif

View File

@@ -458,6 +458,22 @@ static inline unsigned short stap(void)
return cpu_address;
}
static inline u32 cksm(void *addr, unsigned long len)
{
register unsigned long _addr asm("0") = (unsigned long) addr;
register unsigned long _len asm("1") = len;
unsigned long accu = 0;
asm volatile(
"0:\n"
" cksm %0,%1\n"
" jnz 0b\n"
: "+d" (accu), "+d" (_addr), "+d" (_len)
:
: "cc", "memory");
return accu;
}
extern void (*_machine_restart)(char *command);
extern void (*_machine_halt)(void);
extern void (*_machine_power_off)(void);