License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[linux-block.git] / arch / s390 / include / asm / os_info.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
4857d4bb
MH
2/*
3 * OS info memory interface
4 *
5 * Copyright IBM Corp. 2012
6 * Author(s): Michael Holzheu <holzheu@linux.vnet.ibm.com>
7 */
8#ifndef _ASM_S390_OS_INFO_H
9#define _ASM_S390_OS_INFO_H
10
11#define OS_INFO_VERSION_MAJOR 1
12#define OS_INFO_VERSION_MINOR 1
13#define OS_INFO_MAGIC 0x4f53494e464f535aULL /* OSINFOSZ */
14
15#define OS_INFO_VMCOREINFO 0
16#define OS_INFO_REIPL_BLOCK 1
4857d4bb
MH
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;
d7b7cdea
MH
31 struct os_info_entry entry[2];
32 u8 reserved[4024];
4857d4bb
MH
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);
df9694c7 42int copy_oldmem_kernel(void *dst, void *src, size_t count);
4857d4bb
MH
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 */