Lines Matching refs:sccb

64 int sclp_early_cmd(sclp_cmdw_t cmd, void *sccb)  in sclp_early_cmd()  argument
70 rc = sclp_service_call(cmd, sccb); in sclp_early_cmd()
89 struct write_sccb *sccb; in sclp_early_print_lm() local
95 sccb = (struct write_sccb *) sclp_early_sccb; in sclp_early_print_lm()
96 end = (unsigned char *) sccb + EARLY_SCCB_SIZE - 1; in sclp_early_print_lm()
97 memset(sccb, 0, sizeof(*sccb)); in sclp_early_print_lm()
98 ptr = (unsigned char *) &sccb->msg.mdb.mto; in sclp_early_print_lm()
114 len = ptr - (unsigned char *) sccb; in sclp_early_print_lm()
115 sccb->header.length = len - offsetof(struct write_sccb, header); in sclp_early_print_lm()
116 msg = &sccb->msg; in sclp_early_print_lm()
127 sclp_early_cmd(SCLP_CMDW_WRITE_EVENT_DATA, sccb); in sclp_early_print_lm()
141 struct vt220_sccb *sccb; in sclp_early_print_vt220() local
143 sccb = (struct vt220_sccb *) sclp_early_sccb; in sclp_early_print_vt220()
144 if (sizeof(*sccb) + len >= EARLY_SCCB_SIZE) in sclp_early_print_vt220()
145 len = EARLY_SCCB_SIZE - sizeof(*sccb); in sclp_early_print_vt220()
146 memset(sccb, 0, sizeof(*sccb)); in sclp_early_print_vt220()
147 memcpy(&sccb->msg.data, str, len); in sclp_early_print_vt220()
148 sccb->header.length = sizeof(*sccb) + len; in sclp_early_print_vt220()
149 sccb->msg.header.length = sizeof(sccb->msg) + len; in sclp_early_print_vt220()
150 sccb->msg.header.type = EVTYP_VT220MSG; in sclp_early_print_vt220()
151 sclp_early_cmd(SCLP_CMDW_WRITE_EVENT_DATA, sccb); in sclp_early_print_vt220()
154 int sclp_early_set_event_mask(struct init_sccb *sccb, in sclp_early_set_event_mask() argument
159 memset(sccb, 0, sizeof(*sccb)); in sclp_early_set_event_mask()
160 sccb->header.length = sizeof(*sccb); in sclp_early_set_event_mask()
162 sccb->mask_length = SCLP_MASK_SIZE_COMPAT; in sclp_early_set_event_mask()
164 sccb->mask_length = sizeof(sccb_mask_t); in sclp_early_set_event_mask()
165 sccb_set_recv_mask(sccb, receive_mask); in sclp_early_set_event_mask()
166 sccb_set_send_mask(sccb, send_mask); in sclp_early_set_event_mask()
167 if (sclp_early_cmd(SCLP_CMDW_WRITE_EVENT_MASK, sccb)) in sclp_early_set_event_mask()
169 if ((sccb->header.response_code == 0x74f0) && !sclp_mask_compat_mode) { in sclp_early_set_event_mask()
173 if (sccb->header.response_code != 0x20) in sclp_early_set_event_mask()
178 unsigned int sclp_early_con_check_linemode(struct init_sccb *sccb) in sclp_early_con_check_linemode() argument
180 if (!(sccb_get_sclp_send_mask(sccb) & EVTYP_OPCMD_MASK)) in sclp_early_con_check_linemode()
182 if (!(sccb_get_sclp_recv_mask(sccb) & (EVTYP_MSG_MASK | EVTYP_PMSGCMD_MASK))) in sclp_early_con_check_linemode()
187 unsigned int sclp_early_con_check_vt220(struct init_sccb *sccb) in sclp_early_con_check_vt220() argument
189 if (sccb_get_sclp_send_mask(sccb) & EVTYP_VT220MSG_MASK) in sclp_early_con_check_vt220()
197 struct init_sccb *sccb; in sclp_early_setup() local
203 sccb = (struct init_sccb *) sclp_early_sccb; in sclp_early_setup()
206 rc = sclp_early_set_event_mask(sccb, receive_mask, send_mask); in sclp_early_setup()
209 *have_linemode = sclp_early_con_check_linemode(sccb); in sclp_early_setup()
210 *have_vt220 = !!(sccb_get_send_mask(sccb) & EVTYP_VT220MSG_MASK); in sclp_early_setup()
214 void sclp_early_set_buffer(void *sccb) in sclp_early_set_buffer() argument
216 sclp_early_sccb = sccb; in sclp_early_set_buffer()
256 struct read_info_sccb *sccb = (struct read_info_sccb *)sclp_early_sccb; in sclp_early_read_info() local
261 memset(sccb, 0, length); in sclp_early_read_info()
262 sccb->header.length = length; in sclp_early_read_info()
263 sccb->header.function_code = 0x80; in sclp_early_read_info()
264 sccb->header.control_mask[2] = 0x80; in sclp_early_read_info()
265 if (sclp_early_cmd(commands[i], sccb)) in sclp_early_read_info()
267 if (sccb->header.response_code == 0x10) { in sclp_early_read_info()
268 memcpy(&sclp_info_sccb, sccb, length); in sclp_early_read_info()
272 if (sccb->header.response_code != 0x1f0) in sclp_early_read_info()
290 struct read_info_sccb *sccb = &sclp_info_sccb; in sclp_early_get_memsize() local
295 rnmax = sccb->rnmax ? sccb->rnmax : sccb->rnmax2; in sclp_early_get_memsize()
296 rnsize = sccb->rnsize ? sccb->rnsize : sccb->rnsize2; in sclp_early_get_memsize()
318 struct read_storage_sccb *sccb = (struct read_storage_sccb *)sclp_early_sccb; in sclp_early_read_storage_info() local
335 sccb->header.length = EARLY_SCCB_SIZE; in sclp_early_read_storage_info()
337 rc = sclp_early_cmd(command, sccb); in sclp_early_read_storage_info()
341 max_id = sccb->max_id; in sclp_early_read_storage_info()
342 switch (sccb->header.response_code) { in sclp_early_read_storage_info()
344 for (sn = 0; sn < sccb->assigned; sn++) { in sclp_early_read_storage_info()
345 if (!sccb->entries[sn]) in sclp_early_read_storage_info()
347 rn = sccb->entries[sn] >> 16; in sclp_early_read_storage_info()