aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/include/asm/os_info.h
diff options
context:
space:
mode:
authorMichael Holzheu <holzheu@linux.vnet.ibm.com>2012-03-11 11:59:34 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2012-03-11 11:59:29 -0400
commit4857d4bbe9821c8d732cb84455e18e12b3d79add (patch)
tree54583e3ef5c84c04f92b7b15ea6aad8224781d9b /arch/s390/include/asm/os_info.h
parentad252ffa2a0fbb1f37e81688322034b3af037cee (diff)
[S390] kernel: Add OS info memory interface
In order to allow kdump based stand-alone dump, some information has to be passed from the old kernel to the new dump kernel. This is done via a the struct "os_info" that contains the following fields: * crashkernel base and size * reipl block * vmcoreinfo * init function A pointer to os_info is stored at a well known storage location and the whole structure as well as all fields are secured with checksums. Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/include/asm/os_info.h')
-rw-r--r--arch/s390/include/asm/os_info.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/arch/s390/include/asm/os_info.h b/arch/s390/include/asm/os_info.h
new file mode 100644
index 000000000000..d07518af09ea
--- /dev/null
+++ b/arch/s390/include/asm/os_info.h
@@ -0,0 +1,50 @@
1/*
2 * OS info memory interface
3 *
4 * Copyright IBM Corp. 2012
5 * Author(s): Michael Holzheu <holzheu@linux.vnet.ibm.com>
6 */
7#ifndef _ASM_S390_OS_INFO_H
8#define _ASM_S390_OS_INFO_H
9
10#define OS_INFO_VERSION_MAJOR 1
11#define OS_INFO_VERSION_MINOR 1
12#define OS_INFO_MAGIC 0x4f53494e464f535aULL /* OSINFOSZ */
13
14#define OS_INFO_VMCOREINFO 0
15#define OS_INFO_REIPL_BLOCK 1
16#define OS_INFO_INIT_FN 2
17
18struct os_info_entry {
19 u64 addr;
20 u64 size;
21 u32 csum;
22} __packed;
23
24struct os_info {
25 u64 magic;
26 u32 csum;
27 u16 version_major;
28 u16 version_minor;
29 u64 crashkernel_addr;
30 u64 crashkernel_size;
31 struct os_info_entry entry[3];
32 u8 reserved[4004];
33} __packed;
34
35void os_info_init(void);
36void os_info_entry_add(int nr, void *ptr, u64 len);
37void os_info_crashkernel_add(unsigned long base, unsigned long size);
38u32 os_info_csum(struct os_info *os_info);
39
40#ifdef CONFIG_CRASH_DUMP
41void *os_info_old_entry(int nr, unsigned long *size);
42int copy_from_oldmem(void *dest, void *src, size_t count);
43#else
44static inline void *os_info_old_entry(int nr, unsigned long *size)
45{
46 return NULL;
47}
48#endif
49
50#endif /* _ASM_S390_OS_INFO_H */