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 uint64_t netboot_start_addr
;
17 uint8_t reserved0
[77];
26 } __attribute__ ((packed
));
27 typedef struct IplBlockCcw IplBlockCcw
;
30 uint8_t reserved1
[305 - 1];
39 uint8_t reserved5
[12];
41 uint32_t scp_data_len
;
42 uint8_t reserved6
[260];
44 } __attribute__ ((packed
));
45 typedef struct IplBlockFcp IplBlockFcp
;
47 struct IplBlockQemuScsi
{
51 uint8_t reserved0
[77];
54 } __attribute__ ((packed
));
55 typedef struct IplBlockQemuScsi IplBlockQemuScsi
;
57 struct IplParameterBlock
{
69 IplBlockQemuScsi scsi
;
71 } __attribute__ ((packed
));
72 typedef struct IplParameterBlock IplParameterBlock
;
74 extern IplParameterBlock iplb
__attribute__((__aligned__(PAGE_SIZE
)));
76 #define S390_IPL_TYPE_FCP 0x00
77 #define S390_IPL_TYPE_CCW 0x02
78 #define S390_IPL_TYPE_QEMU_SCSI 0xff
80 static inline bool store_iplb(IplParameterBlock
*iplb
)
82 register unsigned long addr
asm("0") = (unsigned long) iplb
;
83 register unsigned long rc
asm("1") = 0;
85 asm volatile ("diag %0,%2,0x308\n"
86 : "+d" (addr
), "+d" (rc
)