Revision c8cda874
b/pc-bios/s390-ccw/cio.h | ||
---|---|---|
93 | 93 |
__u32 sch_no : 16; |
94 | 94 |
} __attribute__ ((packed, aligned(4))); |
95 | 95 |
|
96 |
struct chsc_header { |
|
97 |
__u16 length; |
|
98 |
__u16 code; |
|
99 |
} __attribute__((packed)); |
|
100 |
|
|
101 |
struct chsc_area_sda { |
|
102 |
struct chsc_header request; |
|
103 |
__u8 reserved1:4; |
|
104 |
__u8 format:4; |
|
105 |
__u8 reserved2; |
|
106 |
__u16 operation_code; |
|
107 |
__u32 reserved3; |
|
108 |
__u32 reserved4; |
|
109 |
__u32 operation_data_area[252]; |
|
110 |
struct chsc_header response; |
|
111 |
__u32 reserved5:4; |
|
112 |
__u32 format2:4; |
|
113 |
__u32 reserved6:24; |
|
114 |
} __attribute__((packed)); |
|
115 |
|
|
96 | 116 |
/* |
97 | 117 |
* TPI info structure |
98 | 118 |
*/ |
b/pc-bios/s390-ccw/main.c | ||
---|---|---|
35 | 35 |
check_devno = true; |
36 | 36 |
dev_no = dev_info & 0xffff; |
37 | 37 |
debug_print_int("device no. ", dev_no); |
38 |
blk_schid.ssid = (dev_info >> 16) & 0x3; |
|
39 |
if (blk_schid.ssid != 0) { |
|
40 |
debug_print_int("ssid ", blk_schid.ssid); |
|
41 |
if (enable_mss_facility() != 0) { |
|
42 |
virtio_panic("Failed to enable mss facility\n"); |
|
43 |
} |
|
44 |
} |
|
38 | 45 |
} |
39 | 46 |
|
40 | 47 |
for (i = 0; i < 0x10000; i++) { |
b/pc-bios/s390-ccw/s390-ccw.h | ||
---|---|---|
61 | 61 |
bool virtio_is_blk(struct subchannel_id schid); |
62 | 62 |
void virtio_setup_block(struct subchannel_id schid); |
63 | 63 |
int virtio_read(ulong sector, void *load_addr); |
64 |
int enable_mss_facility(void); |
|
64 | 65 |
|
65 | 66 |
/* bootmap.c */ |
66 | 67 |
int zipl_load(void); |
b/pc-bios/s390-ccw/virtio.c | ||
---|---|---|
13 | 13 |
|
14 | 14 |
struct vring block; |
15 | 15 |
|
16 |
static char chsc_page[PAGE_SIZE] __attribute__((__aligned__(PAGE_SIZE))); |
|
17 |
|
|
16 | 18 |
static long kvm_hypercall(unsigned long nr, unsigned long param1, |
17 | 19 |
unsigned long param2) |
18 | 20 |
{ |
... | ... | |
301 | 303 |
return true; |
302 | 304 |
} |
303 | 305 |
|
306 |
int enable_mss_facility(void) |
|
307 |
{ |
|
308 |
int ret; |
|
309 |
struct chsc_area_sda *sda_area = (struct chsc_area_sda *) chsc_page; |
|
310 |
|
|
311 |
memset(sda_area, 0, PAGE_SIZE); |
|
312 |
sda_area->request.length = 0x0400; |
|
313 |
sda_area->request.code = 0x0031; |
|
314 |
sda_area->operation_code = 0x2; |
|
315 |
|
|
316 |
ret = chsc(sda_area); |
|
317 |
if ((ret == 0) && (sda_area->response.code == 0x0001)) { |
|
318 |
return 0; |
|
319 |
} |
|
320 |
return -EIO; |
|
321 |
} |
Also available in: Unified diff