blob: 295f2c4f1c96ab2dbd333b6321475796fa8b820b [file] [log] [blame]
Michael Holzheu4857d4b2012-03-11 11:59:34 -04001/*
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
Michael Holzheu4857d4b2012-03-11 11:59:34 -040016
17struct os_info_entry {
18 u64 addr;
19 u64 size;
20 u32 csum;
21} __packed;
22
23struct os_info {
24 u64 magic;
25 u32 csum;
26 u16 version_major;
27 u16 version_minor;
28 u64 crashkernel_addr;
29 u64 crashkernel_size;
Michael Holzheud7b7cde2012-05-18 14:29:19 +020030 struct os_info_entry entry[2];
31 u8 reserved[4024];
Michael Holzheu4857d4b2012-03-11 11:59:34 -040032} __packed;
33
34void os_info_init(void);
35void os_info_entry_add(int nr, void *ptr, u64 len);
36void os_info_crashkernel_add(unsigned long base, unsigned long size);
37u32 os_info_csum(struct os_info *os_info);
38
39#ifdef CONFIG_CRASH_DUMP
40void *os_info_old_entry(int nr, unsigned long *size);
41int copy_from_oldmem(void *dest, void *src, size_t count);
42#else
43static inline void *os_info_old_entry(int nr, unsigned long *size)
44{
45 return NULL;
46}
47#endif
48
49#endif /* _ASM_S390_OS_INFO_H */