• Home
  • Raw
  • Download

Lines Matching refs:xiocb

37 int cfe_iocb_dispatch(struct cfe_xiocb *xiocb);
48 static int (*cfe_dispfunc) (intptr_t handle, intptr_t xiocb);
58 int cfe_iocb_dispatch(struct cfe_xiocb * xiocb) in cfe_iocb_dispatch() argument
62 return (*cfe_dispfunc) ((intptr_t) cfe_handle, (intptr_t) xiocb); in cfe_iocb_dispatch()
67 struct cfe_xiocb xiocb; in cfe_close() local
69 xiocb.xiocb_fcode = CFE_CMD_DEV_CLOSE; in cfe_close()
70 xiocb.xiocb_status = 0; in cfe_close()
71 xiocb.xiocb_handle = handle; in cfe_close()
72 xiocb.xiocb_flags = 0; in cfe_close()
73 xiocb.xiocb_psize = 0; in cfe_close()
75 cfe_iocb_dispatch(&xiocb); in cfe_close()
77 return xiocb.xiocb_status; in cfe_close()
83 struct cfe_xiocb xiocb; in cfe_cpu_start() local
85 xiocb.xiocb_fcode = CFE_CMD_FW_CPUCTL; in cfe_cpu_start()
86 xiocb.xiocb_status = 0; in cfe_cpu_start()
87 xiocb.xiocb_handle = 0; in cfe_cpu_start()
88 xiocb.xiocb_flags = 0; in cfe_cpu_start()
89 xiocb.xiocb_psize = sizeof(struct xiocb_cpuctl); in cfe_cpu_start()
90 xiocb.plist.xiocb_cpuctl.cpu_number = cpu; in cfe_cpu_start()
91 xiocb.plist.xiocb_cpuctl.cpu_command = CFE_CPU_CMD_START; in cfe_cpu_start()
92 xiocb.plist.xiocb_cpuctl.gp_val = gp; in cfe_cpu_start()
93 xiocb.plist.xiocb_cpuctl.sp_val = sp; in cfe_cpu_start()
94 xiocb.plist.xiocb_cpuctl.a1_val = a1; in cfe_cpu_start()
95 xiocb.plist.xiocb_cpuctl.start_addr = (long) fn; in cfe_cpu_start()
97 cfe_iocb_dispatch(&xiocb); in cfe_cpu_start()
99 return xiocb.xiocb_status; in cfe_cpu_start()
104 struct cfe_xiocb xiocb; in cfe_cpu_stop() local
106 xiocb.xiocb_fcode = CFE_CMD_FW_CPUCTL; in cfe_cpu_stop()
107 xiocb.xiocb_status = 0; in cfe_cpu_stop()
108 xiocb.xiocb_handle = 0; in cfe_cpu_stop()
109 xiocb.xiocb_flags = 0; in cfe_cpu_stop()
110 xiocb.xiocb_psize = sizeof(struct xiocb_cpuctl); in cfe_cpu_stop()
111 xiocb.plist.xiocb_cpuctl.cpu_number = cpu; in cfe_cpu_stop()
112 xiocb.plist.xiocb_cpuctl.cpu_command = CFE_CPU_CMD_STOP; in cfe_cpu_stop()
114 cfe_iocb_dispatch(&xiocb); in cfe_cpu_stop()
116 return xiocb.xiocb_status; in cfe_cpu_stop()
121 struct cfe_xiocb xiocb; in cfe_enumenv() local
123 xiocb.xiocb_fcode = CFE_CMD_ENV_SET; in cfe_enumenv()
124 xiocb.xiocb_status = 0; in cfe_enumenv()
125 xiocb.xiocb_handle = 0; in cfe_enumenv()
126 xiocb.xiocb_flags = 0; in cfe_enumenv()
127 xiocb.xiocb_psize = sizeof(struct xiocb_envbuf); in cfe_enumenv()
128 xiocb.plist.xiocb_envbuf.enum_idx = idx; in cfe_enumenv()
129 xiocb.plist.xiocb_envbuf.name_ptr = XPTR_FROM_NATIVE(name); in cfe_enumenv()
130 xiocb.plist.xiocb_envbuf.name_length = namelen; in cfe_enumenv()
131 xiocb.plist.xiocb_envbuf.val_ptr = XPTR_FROM_NATIVE(val); in cfe_enumenv()
132 xiocb.plist.xiocb_envbuf.val_length = vallen; in cfe_enumenv()
134 cfe_iocb_dispatch(&xiocb); in cfe_enumenv()
136 return xiocb.xiocb_status; in cfe_enumenv()
142 struct cfe_xiocb xiocb; in cfe_enummem() local
144 xiocb.xiocb_fcode = CFE_CMD_FW_MEMENUM; in cfe_enummem()
145 xiocb.xiocb_status = 0; in cfe_enummem()
146 xiocb.xiocb_handle = 0; in cfe_enummem()
147 xiocb.xiocb_flags = flags; in cfe_enummem()
148 xiocb.xiocb_psize = sizeof(struct xiocb_meminfo); in cfe_enummem()
149 xiocb.plist.xiocb_meminfo.mi_idx = idx; in cfe_enummem()
151 cfe_iocb_dispatch(&xiocb); in cfe_enummem()
153 if (xiocb.xiocb_status < 0) in cfe_enummem()
154 return xiocb.xiocb_status; in cfe_enummem()
156 *start = xiocb.plist.xiocb_meminfo.mi_addr; in cfe_enummem()
157 *length = xiocb.plist.xiocb_meminfo.mi_size; in cfe_enummem()
158 *type = xiocb.plist.xiocb_meminfo.mi_type; in cfe_enummem()
165 struct cfe_xiocb xiocb; in cfe_exit() local
167 xiocb.xiocb_fcode = CFE_CMD_FW_RESTART; in cfe_exit()
168 xiocb.xiocb_status = 0; in cfe_exit()
169 xiocb.xiocb_handle = 0; in cfe_exit()
170 xiocb.xiocb_flags = warm ? CFE_FLG_WARMSTART : 0; in cfe_exit()
171 xiocb.xiocb_psize = sizeof(struct xiocb_exitstat); in cfe_exit()
172 xiocb.plist.xiocb_exitstat.status = status; in cfe_exit()
174 cfe_iocb_dispatch(&xiocb); in cfe_exit()
176 return xiocb.xiocb_status; in cfe_exit()
181 struct cfe_xiocb xiocb; in cfe_flushcache() local
183 xiocb.xiocb_fcode = CFE_CMD_FW_FLUSHCACHE; in cfe_flushcache()
184 xiocb.xiocb_status = 0; in cfe_flushcache()
185 xiocb.xiocb_handle = 0; in cfe_flushcache()
186 xiocb.xiocb_flags = flg; in cfe_flushcache()
187 xiocb.xiocb_psize = 0; in cfe_flushcache()
189 cfe_iocb_dispatch(&xiocb); in cfe_flushcache()
191 return xiocb.xiocb_status; in cfe_flushcache()
196 struct cfe_xiocb xiocb; in cfe_getdevinfo() local
198 xiocb.xiocb_fcode = CFE_CMD_DEV_GETINFO; in cfe_getdevinfo()
199 xiocb.xiocb_status = 0; in cfe_getdevinfo()
200 xiocb.xiocb_handle = 0; in cfe_getdevinfo()
201 xiocb.xiocb_flags = 0; in cfe_getdevinfo()
202 xiocb.xiocb_psize = sizeof(struct xiocb_buffer); in cfe_getdevinfo()
203 xiocb.plist.xiocb_buffer.buf_offset = 0; in cfe_getdevinfo()
204 xiocb.plist.xiocb_buffer.buf_ptr = XPTR_FROM_NATIVE(name); in cfe_getdevinfo()
205 xiocb.plist.xiocb_buffer.buf_length = strlen(name); in cfe_getdevinfo()
207 cfe_iocb_dispatch(&xiocb); in cfe_getdevinfo()
209 if (xiocb.xiocb_status < 0) in cfe_getdevinfo()
210 return xiocb.xiocb_status; in cfe_getdevinfo()
211 return xiocb.plist.xiocb_buffer.buf_ioctlcmd; in cfe_getdevinfo()
216 struct cfe_xiocb xiocb; in cfe_getenv() local
220 xiocb.xiocb_fcode = CFE_CMD_ENV_GET; in cfe_getenv()
221 xiocb.xiocb_status = 0; in cfe_getenv()
222 xiocb.xiocb_handle = 0; in cfe_getenv()
223 xiocb.xiocb_flags = 0; in cfe_getenv()
224 xiocb.xiocb_psize = sizeof(struct xiocb_envbuf); in cfe_getenv()
225 xiocb.plist.xiocb_envbuf.enum_idx = 0; in cfe_getenv()
226 xiocb.plist.xiocb_envbuf.name_ptr = XPTR_FROM_NATIVE(name); in cfe_getenv()
227 xiocb.plist.xiocb_envbuf.name_length = strlen(name); in cfe_getenv()
228 xiocb.plist.xiocb_envbuf.val_ptr = XPTR_FROM_NATIVE(dest); in cfe_getenv()
229 xiocb.plist.xiocb_envbuf.val_length = destlen; in cfe_getenv()
231 cfe_iocb_dispatch(&xiocb); in cfe_getenv()
233 return xiocb.xiocb_status; in cfe_getenv()
238 struct cfe_xiocb xiocb; in cfe_getfwinfo() local
240 xiocb.xiocb_fcode = CFE_CMD_FW_GETINFO; in cfe_getfwinfo()
241 xiocb.xiocb_status = 0; in cfe_getfwinfo()
242 xiocb.xiocb_handle = 0; in cfe_getfwinfo()
243 xiocb.xiocb_flags = 0; in cfe_getfwinfo()
244 xiocb.xiocb_psize = sizeof(struct xiocb_fwinfo); in cfe_getfwinfo()
246 cfe_iocb_dispatch(&xiocb); in cfe_getfwinfo()
248 if (xiocb.xiocb_status < 0) in cfe_getfwinfo()
249 return xiocb.xiocb_status; in cfe_getfwinfo()
251 info->fwi_version = xiocb.plist.xiocb_fwinfo.fwi_version; in cfe_getfwinfo()
252 info->fwi_totalmem = xiocb.plist.xiocb_fwinfo.fwi_totalmem; in cfe_getfwinfo()
253 info->fwi_flags = xiocb.plist.xiocb_fwinfo.fwi_flags; in cfe_getfwinfo()
254 info->fwi_boardid = xiocb.plist.xiocb_fwinfo.fwi_boardid; in cfe_getfwinfo()
255 info->fwi_bootarea_va = xiocb.plist.xiocb_fwinfo.fwi_bootarea_va; in cfe_getfwinfo()
256 info->fwi_bootarea_pa = xiocb.plist.xiocb_fwinfo.fwi_bootarea_pa; in cfe_getfwinfo()
258 xiocb.plist.xiocb_fwinfo.fwi_bootarea_size; in cfe_getfwinfo()
260 info->fwi_reserved1 = xiocb.plist.xiocb_fwinfo.fwi_reserved1; in cfe_getfwinfo()
261 info->fwi_reserved2 = xiocb.plist.xiocb_fwinfo.fwi_reserved2; in cfe_getfwinfo()
262 info->fwi_reserved3 = xiocb.plist.xiocb_fwinfo.fwi_reserved3; in cfe_getfwinfo()
270 struct cfe_xiocb xiocb; in cfe_getstdhandle() local
272 xiocb.xiocb_fcode = CFE_CMD_DEV_GETHANDLE; in cfe_getstdhandle()
273 xiocb.xiocb_status = 0; in cfe_getstdhandle()
274 xiocb.xiocb_handle = 0; in cfe_getstdhandle()
275 xiocb.xiocb_flags = flg; in cfe_getstdhandle()
276 xiocb.xiocb_psize = 0; in cfe_getstdhandle()
278 cfe_iocb_dispatch(&xiocb); in cfe_getstdhandle()
280 if (xiocb.xiocb_status < 0) in cfe_getstdhandle()
281 return xiocb.xiocb_status; in cfe_getstdhandle()
282 return xiocb.xiocb_handle; in cfe_getstdhandle()
288 struct cfe_xiocb xiocb; in cfe_getticks() local
290 xiocb.xiocb_fcode = CFE_CMD_FW_GETTIME; in cfe_getticks()
291 xiocb.xiocb_status = 0; in cfe_getticks()
292 xiocb.xiocb_handle = 0; in cfe_getticks()
293 xiocb.xiocb_flags = 0; in cfe_getticks()
294 xiocb.xiocb_psize = sizeof(struct xiocb_time); in cfe_getticks()
295 xiocb.plist.xiocb_time.ticks = 0; in cfe_getticks()
297 cfe_iocb_dispatch(&xiocb); in cfe_getticks()
299 return xiocb.plist.xiocb_time.ticks; in cfe_getticks()
305 struct cfe_xiocb xiocb; in cfe_inpstat() local
307 xiocb.xiocb_fcode = CFE_CMD_DEV_INPSTAT; in cfe_inpstat()
308 xiocb.xiocb_status = 0; in cfe_inpstat()
309 xiocb.xiocb_handle = handle; in cfe_inpstat()
310 xiocb.xiocb_flags = 0; in cfe_inpstat()
311 xiocb.xiocb_psize = sizeof(struct xiocb_inpstat); in cfe_inpstat()
312 xiocb.plist.xiocb_inpstat.inp_status = 0; in cfe_inpstat()
314 cfe_iocb_dispatch(&xiocb); in cfe_inpstat()
316 if (xiocb.xiocb_status < 0) in cfe_inpstat()
317 return xiocb.xiocb_status; in cfe_inpstat()
318 return xiocb.plist.xiocb_inpstat.inp_status; in cfe_inpstat()
325 struct cfe_xiocb xiocb; in cfe_ioctl() local
327 xiocb.xiocb_fcode = CFE_CMD_DEV_IOCTL; in cfe_ioctl()
328 xiocb.xiocb_status = 0; in cfe_ioctl()
329 xiocb.xiocb_handle = handle; in cfe_ioctl()
330 xiocb.xiocb_flags = 0; in cfe_ioctl()
331 xiocb.xiocb_psize = sizeof(struct xiocb_buffer); in cfe_ioctl()
332 xiocb.plist.xiocb_buffer.buf_offset = offset; in cfe_ioctl()
333 xiocb.plist.xiocb_buffer.buf_ioctlcmd = ioctlnum; in cfe_ioctl()
334 xiocb.plist.xiocb_buffer.buf_ptr = XPTR_FROM_NATIVE(buffer); in cfe_ioctl()
335 xiocb.plist.xiocb_buffer.buf_length = length; in cfe_ioctl()
337 cfe_iocb_dispatch(&xiocb); in cfe_ioctl()
340 *retlen = xiocb.plist.xiocb_buffer.buf_retlen; in cfe_ioctl()
341 return xiocb.xiocb_status; in cfe_ioctl()
346 struct cfe_xiocb xiocb; in cfe_open() local
348 xiocb.xiocb_fcode = CFE_CMD_DEV_OPEN; in cfe_open()
349 xiocb.xiocb_status = 0; in cfe_open()
350 xiocb.xiocb_handle = 0; in cfe_open()
351 xiocb.xiocb_flags = 0; in cfe_open()
352 xiocb.xiocb_psize = sizeof(struct xiocb_buffer); in cfe_open()
353 xiocb.plist.xiocb_buffer.buf_offset = 0; in cfe_open()
354 xiocb.plist.xiocb_buffer.buf_ptr = XPTR_FROM_NATIVE(name); in cfe_open()
355 xiocb.plist.xiocb_buffer.buf_length = strlen(name); in cfe_open()
357 cfe_iocb_dispatch(&xiocb); in cfe_open()
359 if (xiocb.xiocb_status < 0) in cfe_open()
360 return xiocb.xiocb_status; in cfe_open()
361 return xiocb.xiocb_handle; in cfe_open()
371 struct cfe_xiocb xiocb; in cfe_readblk() local
373 xiocb.xiocb_fcode = CFE_CMD_DEV_READ; in cfe_readblk()
374 xiocb.xiocb_status = 0; in cfe_readblk()
375 xiocb.xiocb_handle = handle; in cfe_readblk()
376 xiocb.xiocb_flags = 0; in cfe_readblk()
377 xiocb.xiocb_psize = sizeof(struct xiocb_buffer); in cfe_readblk()
378 xiocb.plist.xiocb_buffer.buf_offset = offset; in cfe_readblk()
379 xiocb.plist.xiocb_buffer.buf_ptr = XPTR_FROM_NATIVE(buffer); in cfe_readblk()
380 xiocb.plist.xiocb_buffer.buf_length = length; in cfe_readblk()
382 cfe_iocb_dispatch(&xiocb); in cfe_readblk()
384 if (xiocb.xiocb_status < 0) in cfe_readblk()
385 return xiocb.xiocb_status; in cfe_readblk()
386 return xiocb.plist.xiocb_buffer.buf_retlen; in cfe_readblk()
391 struct cfe_xiocb xiocb; in cfe_setenv() local
393 xiocb.xiocb_fcode = CFE_CMD_ENV_SET; in cfe_setenv()
394 xiocb.xiocb_status = 0; in cfe_setenv()
395 xiocb.xiocb_handle = 0; in cfe_setenv()
396 xiocb.xiocb_flags = 0; in cfe_setenv()
397 xiocb.xiocb_psize = sizeof(struct xiocb_envbuf); in cfe_setenv()
398 xiocb.plist.xiocb_envbuf.enum_idx = 0; in cfe_setenv()
399 xiocb.plist.xiocb_envbuf.name_ptr = XPTR_FROM_NATIVE(name); in cfe_setenv()
400 xiocb.plist.xiocb_envbuf.name_length = strlen(name); in cfe_setenv()
401 xiocb.plist.xiocb_envbuf.val_ptr = XPTR_FROM_NATIVE(val); in cfe_setenv()
402 xiocb.plist.xiocb_envbuf.val_length = strlen(val); in cfe_setenv()
404 cfe_iocb_dispatch(&xiocb); in cfe_setenv()
406 return xiocb.xiocb_status; in cfe_setenv()
416 struct cfe_xiocb xiocb; in cfe_writeblk() local
418 xiocb.xiocb_fcode = CFE_CMD_DEV_WRITE; in cfe_writeblk()
419 xiocb.xiocb_status = 0; in cfe_writeblk()
420 xiocb.xiocb_handle = handle; in cfe_writeblk()
421 xiocb.xiocb_flags = 0; in cfe_writeblk()
422 xiocb.xiocb_psize = sizeof(struct xiocb_buffer); in cfe_writeblk()
423 xiocb.plist.xiocb_buffer.buf_offset = offset; in cfe_writeblk()
424 xiocb.plist.xiocb_buffer.buf_ptr = XPTR_FROM_NATIVE(buffer); in cfe_writeblk()
425 xiocb.plist.xiocb_buffer.buf_length = length; in cfe_writeblk()
427 cfe_iocb_dispatch(&xiocb); in cfe_writeblk()
429 if (xiocb.xiocb_status < 0) in cfe_writeblk()
430 return xiocb.xiocb_status; in cfe_writeblk()
431 return xiocb.plist.xiocb_buffer.buf_retlen; in cfe_writeblk()