xref: /qemu/hw/s390x/ipl.h (revision 7a4e543d)
1 /*
2  * s390 IPL device
3  *
4  * Copyright 2015 IBM Corp.
5  * Author(s): Zhang Fan <bjfanzh@cn.ibm.com>
6  *
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
9  * directory.
10  */
11 
12 #ifndef HW_S390_IPL_H
13 #define HW_S390_IPL_H
14 
15 #include "hw/qdev.h"
16 #include "cpu.h"
17 
18 typedef struct IplParameterBlock {
19       uint8_t  reserved1[110];
20       uint16_t devno;
21       uint8_t  reserved2[88];
22 } IplParameterBlock;
23 
24 void s390_ipl_update_diag308(IplParameterBlock *iplb);
25 void s390_ipl_prepare_cpu(S390CPU *cpu);
26 IplParameterBlock *s390_ipl_get_iplb(void);
27 void s390_reipl_request(void);
28 
29 #define TYPE_S390_IPL "s390-ipl"
30 #define S390_IPL(obj) OBJECT_CHECK(S390IPLState, (obj), TYPE_S390_IPL)
31 
32 struct S390IPLState {
33     /*< private >*/
34     DeviceState parent_obj;
35     uint64_t start_addr;
36     uint64_t bios_start_addr;
37     bool enforce_bios;
38     IplParameterBlock iplb;
39     bool iplb_valid;
40     bool reipl_requested;
41 
42     /*< public >*/
43     char *kernel;
44     char *initrd;
45     char *cmdline;
46     char *firmware;
47     uint8_t cssid;
48     uint8_t ssid;
49     uint16_t devno;
50 };
51 typedef struct S390IPLState S390IPLState;
52 
53 #endif
54