4 * Copyright 2015 IBM Corp.
5 * Author(s): Alexander Yarygin <yarygin@linux.vnet.ibm.com>
7 * This work is licensed under the terms of the GNU GPL, version 2 or (at
8 * your option) any later version. See the COPYING file in the top-level
16 uint8_t reserved0
[85];
25 } __attribute__ ((packed
));
26 typedef struct IplBlockCcw IplBlockCcw
;
29 uint8_t reserved1
[305 - 1];
38 uint8_t reserved5
[12];
40 uint32_t scp_data_len
;
41 uint8_t reserved6
[260];
43 } __attribute__ ((packed
));
44 typedef struct IplBlockFcp IplBlockFcp
;
46 struct IplBlockQemuScsi
{
50 uint8_t reserved0
[77];
53 } __attribute__ ((packed
));
54 typedef struct IplBlockQemuScsi IplBlockQemuScsi
;
56 struct IplParameterBlock
{
68 IplBlockQemuScsi scsi
;
70 } __attribute__ ((packed
));
71 typedef struct IplParameterBlock IplParameterBlock
;
73 extern IplParameterBlock iplb
__attribute__((__aligned__(PAGE_SIZE
)));
75 #define S390_IPL_TYPE_FCP 0x00
76 #define S390_IPL_TYPE_CCW 0x02
77 #define S390_IPL_TYPE_QEMU_SCSI 0xff
79 static inline bool store_iplb(IplParameterBlock
*iplb
)
81 register unsigned long addr
asm("0") = (unsigned long) iplb
;
82 register unsigned long rc
asm("1") = 0;
84 asm volatile ("diag %0,%2,0x308\n"
85 : "+d" (addr
), "+d" (rc
)