MCPcopy Create free account
hub / github.com/F-Stack/f-stack / nlm_fmn_msgrcv

Function nlm_fmn_msgrcv

freebsd/mips/nlm/hal/cop2.h:254–284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

252}
253
254static inline int
255nlm_fmn_msgrcv(int vc, int *srcid, int *size, int *code, struct nlm_fmn_msg *m)
256{
257 uint32_t status;
258 uint32_t msg_status, flags;
259 int tmp_sz, rv;
260
261 flags = nlm_save_flags_cop2();
262 status = nlm_msgld(vc); /* will return 0, if error */
263 rv = !status;
264 if (rv == 0) {
265 msg_status = nlm_read_c2_rxmsgstatus();
266 *size = ((msg_status >> 26) & 0x3) + 1;
267 *code = (msg_status >> 18) & 0xff;
268 *srcid = (msg_status >> 4) & 0xfff;
269 tmp_sz = *size - 1;
270 switch (tmp_sz) {
271 case 3:
272 m->msg[3] = nlm_read_c2_rxbuf3();
273 case 2:
274 m->msg[2] = nlm_read_c2_rxbuf2();
275 case 1:
276 m->msg[1] = nlm_read_c2_rxbuf1();
277 case 0:
278 m->msg[0] = nlm_read_c2_rxbuf0();
279 }
280 }
281 nlm_restore_flags(flags);
282
283 return rv;
284}
285
286static inline void
287nlm_fmn_cpu_init(int int_vec, int ecc_en, int v0pe, int v1pe, int v2pe, int v3pe)

Callers 2

xlp_handle_msg_vcFunction · 0.85
xlp_discard_msg_vcFunction · 0.85

Calls 3

nlm_save_flags_cop2Function · 0.85
nlm_msgldFunction · 0.85
nlm_restore_flagsFunction · 0.85

Tested by

no test coverage detected