Lines Matching full:sccb
63 * An extended-length SCCB is only allowed for Read SCP/CPU Info and in sccb_verify_boundary()
66 * SCCB length is provided. in sccb_verify_boundary()
107 static void read_SCP_info(SCLPDevice *sclp, SCCB *sccb) in read_SCP_info() argument
109 ReadInfo *read_info = (ReadInfo *) sccb; in read_SCP_info()
117 CPUEntry *entries_start = (void *)sccb + offset_cpu; in read_SCP_info()
119 if (be16_to_cpu(sccb->h.length) < required_len) { in read_SCP_info()
120 if (ext_len_sccb_supported(sccb->h)) { in read_SCP_info()
121 sccb->h.length = cpu_to_be16(required_len); in read_SCP_info()
123 sccb->h.response_code = cpu_to_be16(SCLP_RC_INSUFFICIENT_SCCB_LENGTH); in read_SCP_info()
176 sccb->h.response_code = cpu_to_be16(SCLP_RC_NORMAL_READ_COMPLETION); in read_SCP_info()
180 static void sclp_read_cpu_info(SCLPDevice *sclp, SCCB *sccb) in sclp_read_cpu_info() argument
183 ReadCpuInfo *cpu_info = (ReadCpuInfo *) sccb; in sclp_read_cpu_info()
187 if (be16_to_cpu(sccb->h.length) < required_len) { in sclp_read_cpu_info()
188 if (ext_len_sccb_supported(sccb->h)) { in sclp_read_cpu_info()
189 sccb->h.length = cpu_to_be16(required_len); in sclp_read_cpu_info()
191 sccb->h.response_code = cpu_to_be16(SCLP_RC_INSUFFICIENT_SCCB_LENGTH); in sclp_read_cpu_info()
205 sccb->h.response_code = cpu_to_be16(SCLP_RC_NORMAL_READ_COMPLETION); in sclp_read_cpu_info()
208 static void sclp_configure_io_adapter(SCLPDevice *sclp, SCCB *sccb, in sclp_configure_io_adapter() argument
213 if (be16_to_cpu(sccb->h.length) < 16) { in sclp_configure_io_adapter()
218 switch (((IoaCfgSccb *)sccb)->atype) { in sclp_configure_io_adapter()
222 s390_pci_sclp_configure(sccb); in sclp_configure_io_adapter()
224 s390_pci_sclp_deconfigure(sccb); in sclp_configure_io_adapter()
234 sccb->h.response_code = cpu_to_be16(rc); in sclp_configure_io_adapter()
237 static void sclp_execute(SCLPDevice *sclp, SCCB *sccb, uint32_t code) in sclp_execute() argument
246 sclp_c->read_SCP_info(sclp, sccb); in sclp_execute()
249 sclp_c->read_cpu_info(sclp, sccb); in sclp_execute()
252 sclp_configure_io_adapter(sclp, sccb, true); in sclp_execute()
255 sclp_configure_io_adapter(sclp, sccb, false); in sclp_execute()
258 efc->command_handler(ef, sccb, code); in sclp_execute()
268 int sclp_service_call_protected(S390CPU *cpu, uint64_t sccb, uint32_t code) in sclp_service_call_protected() argument
274 g_autofree SCCB *work_sccb = NULL; in sclp_service_call_protected()
295 int sclp_service_call(S390CPU *cpu, uint64_t sccb, uint32_t code) in sclp_service_call() argument
301 g_autofree SCCB *work_sccb = NULL; in sclp_service_call()
307 if (cpu_physical_memory_is_io(sccb)) { in sclp_service_call()
310 if ((sccb & ~0x1fffUL) == 0 || (sccb & ~0x1fffUL) == env->psa in sclp_service_call()
311 || (sccb & ~0x7ffffff8UL) != 0) { in sclp_service_call()
315 /* the header contains the actual length of the sccb */ in sclp_service_call()
316 cpu_physical_memory_read(sccb, &header, sizeof(SCCBHeader)); in sclp_service_call()
318 /* Valid sccb sizes */ in sclp_service_call()
324 * we want to work on a private copy of the sccb, to prevent guests in sclp_service_call()
329 cpu_physical_memory_read(sccb, work_sccb, be16_to_cpu(header.length)); in sclp_service_call()
336 if (!sccb_verify_boundary(sccb, be16_to_cpu(work_sccb->h.length), code)) { in sclp_service_call()
343 cpu_physical_memory_write(sccb, work_sccb, in sclp_service_call()
346 sclp_c->service_interrupt(sclp, sccb); in sclp_service_call()
351 static void service_interrupt(SCLPDevice *sclp, uint32_t sccb) in service_interrupt() argument
356 uint32_t param = sccb & ~3; in service_interrupt()
368 void sclp_service_interrupt(uint32_t sccb) in sclp_service_interrupt() argument
373 sclp_c->service_interrupt(sclp, sccb); in sclp_service_interrupt()