mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
5f1207fbe7
The IPL parameter block is used as an interface between Linux and the machine to query and change the boot device and boot options. To be able to create IPL parameter block in user space and pass it as segment to kexec provide an uapi header with proper structure definitions for the block. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
95 lines
1.7 KiB
C
95 lines
1.7 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _ASM_S390_UAPI_IPL_H
|
|
#define _ASM_S390_UAPI_IPL_H
|
|
|
|
#include <linux/types.h>
|
|
|
|
/* IPL Parameter List header */
|
|
struct ipl_pl_hdr {
|
|
__u32 len;
|
|
__u8 reserved1[3];
|
|
__u8 version;
|
|
} __packed;
|
|
|
|
/* IPL Parameter Block header */
|
|
struct ipl_pb_hdr {
|
|
__u32 len;
|
|
__u8 pbt;
|
|
} __packed;
|
|
|
|
/* IPL Parameter Block types */
|
|
enum ipl_pbt {
|
|
IPL_PBT_FCP = 0,
|
|
IPL_PBT_SCP_DATA = 1,
|
|
IPL_PBT_CCW = 2,
|
|
};
|
|
|
|
/* IPL Parameter Block 0 with common fields */
|
|
struct ipl_pb0_common {
|
|
__u32 len;
|
|
__u8 pbt;
|
|
__u8 flags;
|
|
__u8 reserved1[2];
|
|
__u8 loadparm[8];
|
|
__u8 reserved2[84];
|
|
} __packed;
|
|
|
|
#define IPL_PB0_FLAG_LOADPARM 0x80
|
|
|
|
/* IPL Parameter Block 0 for FCP */
|
|
struct ipl_pb0_fcp {
|
|
__u32 len;
|
|
__u8 pbt;
|
|
__u8 reserved1[3];
|
|
__u8 loadparm[8];
|
|
__u8 reserved2[304];
|
|
__u8 opt;
|
|
__u8 reserved3[3];
|
|
__u8 cssid;
|
|
__u8 reserved4[1];
|
|
__u16 devno;
|
|
__u8 reserved5[4];
|
|
__u64 wwpn;
|
|
__u64 lun;
|
|
__u32 bootprog;
|
|
__u8 reserved6[12];
|
|
__u64 br_lba;
|
|
__u32 scp_data_len;
|
|
__u8 reserved7[260];
|
|
__u8 scp_data[];
|
|
} __packed;
|
|
|
|
#define IPL_PB0_FCP_OPT_IPL 0x10
|
|
#define IPL_PB0_FCP_OPT_DUMP 0x20
|
|
|
|
/* IPL Parameter Block 0 for CCW */
|
|
struct ipl_pb0_ccw {
|
|
__u32 len;
|
|
__u8 pbt;
|
|
__u8 flags;
|
|
__u8 reserved1[2];
|
|
__u8 loadparm[8];
|
|
__u8 reserved2[84];
|
|
__u16 reserved3 : 13;
|
|
__u8 ssid : 3;
|
|
__u16 devno;
|
|
__u8 vm_flags;
|
|
__u8 reserved4[3];
|
|
__u32 vm_parm_len;
|
|
__u8 nss_name[8];
|
|
__u8 vm_parm[64];
|
|
__u8 reserved5[8];
|
|
} __packed;
|
|
|
|
#define IPL_PB0_CCW_VM_FLAG_NSS 0x80
|
|
#define IPL_PB0_CCW_VM_FLAG_VP 0x40
|
|
|
|
/* IPL Parameter Block 1 for additional SCP data */
|
|
struct ipl_pb1_scp_data {
|
|
__u32 len;
|
|
__u8 pbt;
|
|
__u8 scp_data[];
|
|
} __packed;
|
|
|
|
#endif
|