Lines Matching full:sccb
65 int sclp_early_cmd(sclp_cmdw_t cmd, void *sccb) in sclp_early_cmd() argument
71 rc = sclp_service_call(cmd, sccb); in sclp_early_cmd()
90 struct write_sccb *sccb; in sclp_early_print_lm() local
96 sccb = (struct write_sccb *) sclp_early_sccb; in sclp_early_print_lm()
97 end = (unsigned char *) sccb + EARLY_SCCB_SIZE - 1; in sclp_early_print_lm()
98 memset(sccb, 0, sizeof(*sccb)); in sclp_early_print_lm()
99 ptr = (unsigned char *) &sccb->msg.mdb.mto; in sclp_early_print_lm()
115 len = ptr - (unsigned char *) sccb; in sclp_early_print_lm()
116 sccb->header.length = len - offsetof(struct write_sccb, header); in sclp_early_print_lm()
117 msg = &sccb->msg; in sclp_early_print_lm()
128 sclp_early_cmd(SCLP_CMDW_WRITE_EVENT_DATA, sccb); in sclp_early_print_lm()
142 struct vt220_sccb *sccb; in sclp_early_print_vt220() local
144 sccb = (struct vt220_sccb *) sclp_early_sccb; in sclp_early_print_vt220()
145 if (sizeof(*sccb) + len >= EARLY_SCCB_SIZE) in sclp_early_print_vt220()
146 len = EARLY_SCCB_SIZE - sizeof(*sccb); in sclp_early_print_vt220()
147 memset(sccb, 0, sizeof(*sccb)); in sclp_early_print_vt220()
148 memcpy(&sccb->msg.data, str, len); in sclp_early_print_vt220()
149 sccb->header.length = sizeof(*sccb) + len; in sclp_early_print_vt220()
150 sccb->msg.header.length = sizeof(sccb->msg) + len; in sclp_early_print_vt220()
151 sccb->msg.header.type = EVTYP_VT220MSG; in sclp_early_print_vt220()
152 sclp_early_cmd(SCLP_CMDW_WRITE_EVENT_DATA, sccb); in sclp_early_print_vt220()
155 int sclp_early_set_event_mask(struct init_sccb *sccb, in sclp_early_set_event_mask() argument
160 memset(sccb, 0, sizeof(*sccb)); in sclp_early_set_event_mask()
161 sccb->header.length = sizeof(*sccb); in sclp_early_set_event_mask()
163 sccb->mask_length = SCLP_MASK_SIZE_COMPAT; in sclp_early_set_event_mask()
165 sccb->mask_length = sizeof(sccb_mask_t); in sclp_early_set_event_mask()
166 sccb_set_recv_mask(sccb, receive_mask); in sclp_early_set_event_mask()
167 sccb_set_send_mask(sccb, send_mask); in sclp_early_set_event_mask()
168 if (sclp_early_cmd(SCLP_CMDW_WRITE_EVENT_MASK, sccb)) in sclp_early_set_event_mask()
170 if ((sccb->header.response_code == 0x74f0) && !sclp_mask_compat_mode) { in sclp_early_set_event_mask()
174 if (sccb->header.response_code != 0x20) in sclp_early_set_event_mask()
179 unsigned int sclp_early_con_check_linemode(struct init_sccb *sccb) in sclp_early_con_check_linemode() argument
181 if (!(sccb_get_sclp_send_mask(sccb) & EVTYP_OPCMD_MASK)) in sclp_early_con_check_linemode()
183 if (!(sccb_get_sclp_recv_mask(sccb) & (EVTYP_MSG_MASK | EVTYP_PMSGCMD_MASK))) in sclp_early_con_check_linemode()
188 unsigned int sclp_early_con_check_vt220(struct init_sccb *sccb) in sclp_early_con_check_vt220() argument
190 if (sccb_get_sclp_send_mask(sccb) & EVTYP_VT220MSG_MASK) in sclp_early_con_check_vt220()
198 struct init_sccb *sccb; in sclp_early_setup() local
204 sccb = (struct init_sccb *) sclp_early_sccb; in sclp_early_setup()
207 rc = sclp_early_set_event_mask(sccb, receive_mask, send_mask); in sclp_early_setup()
210 *have_linemode = sclp_early_con_check_linemode(sccb); in sclp_early_setup()
211 *have_vt220 = !!(sccb_get_send_mask(sccb) & EVTYP_VT220MSG_MASK); in sclp_early_setup()
215 void sclp_early_set_buffer(void *sccb) in sclp_early_set_buffer() argument
217 sclp_early_sccb = sccb; in sclp_early_set_buffer()
281 struct read_info_sccb *sccb = (struct read_info_sccb *)sclp_early_sccb; in sclp_early_read_info() local
286 memset(sccb, 0, length); in sclp_early_read_info()
287 sccb->header.length = length; in sclp_early_read_info()
288 sccb->header.function_code = 0x80; in sclp_early_read_info()
289 sccb->header.control_mask[2] = 0x80; in sclp_early_read_info()
290 if (sclp_early_cmd(commands[i], sccb)) in sclp_early_read_info()
292 if (sccb->header.response_code == 0x10) { in sclp_early_read_info()
293 memcpy(&sclp_info_sccb, sccb, length); in sclp_early_read_info()
297 if (sccb->header.response_code != 0x1f0) in sclp_early_read_info()
315 struct read_info_sccb *sccb = &sclp_info_sccb; in sclp_early_get_memsize() local
320 rnmax = sccb->rnmax ? sccb->rnmax : sccb->rnmax2; in sclp_early_get_memsize()
321 rnsize = sccb->rnsize ? sccb->rnsize : sccb->rnsize2; in sclp_early_get_memsize()
343 struct read_storage_sccb *sccb = (struct read_storage_sccb *)sclp_early_sccb; in sclp_early_read_storage_info() local
360 sccb->header.length = EARLY_SCCB_SIZE; in sclp_early_read_storage_info()
362 rc = sclp_early_cmd(command, sccb); in sclp_early_read_storage_info()
366 max_id = sccb->max_id; in sclp_early_read_storage_info()
367 switch (sccb->header.response_code) { in sclp_early_read_storage_info()
369 for (sn = 0; sn < sccb->assigned; sn++) { in sclp_early_read_storage_info()
370 if (!sccb->entries[sn]) in sclp_early_read_storage_info()
372 rn = sccb->entries[sn] >> 16; in sclp_early_read_storage_info()