<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>On 09/04/2020 16:10, <a class="moz-txt-link-abbreviated" href="mailto:Jan.Sommer@dlr.de">Jan.Sommer@dlr.de</a> wrote:<br>
</p>
<blockquote type="cite"
cite="mid:2636030f4fd64663a31d4735b57520b1@dlr.de">
<pre class="moz-quote-pre" wrap="">
</pre>
<blockquote type="cite" style="color: #000000;">
<pre class="moz-quote-pre" wrap="">-----Ursprüngliche Nachricht-----
Von: Sommer, Jan
Gesendet: Donnerstag, 9. April 2020 15:57
An: <a class="moz-txt-link-abbreviated" href="mailto:devel@rtems.org" moz-do-not-send="true">devel@rtems.org</a>
Cc: Sommer, Jan
Betreff: [PATCH v4 3/3] i386: Port to RTEMS
- Update imported files to compile rtems-libbsd for i386 based BSPs
---
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">[...]
</pre>
<blockquote type="cite" style="color: #000000;">
<pre class="moz-quote-pre" wrap="">diff --git a/freebsd/sys/kern/subr_gtaskqueue.c
b/freebsd/sys/kern/subr_gtaskqueue.c
index c061c6b0..4ef05e0a 100644
--- a/freebsd/sys/kern/subr_gtaskqueue.c
+++ b/freebsd/sys/kern/subr_gtaskqueue.c
@@ -744,7 +744,9 @@ taskqgroup_attach(struct taskqgroup *qgroup, struct
grouptask *gtask,
__func__, gtask->gt_name, error);
} else
#else /* __rtems__ */
+#ifndef __i386__
BSD_ASSERT(irq == -1);
+#endif /* __i386 */
#endif /* __rtems__ */
mtx_unlock(&qgroup->tqg_lock);
}
@@ -776,7 +778,9 @@ taskqgroup_attach_deferred(struct taskqgroup
*qgroup, struct grouptask *gtask)
}
#else /* __rtems__ */
+#ifndef __i386__
BSD_ASSERT(gtask->gt_irq == -1);
+#endif /* __i386 */
#endif /* __rtems__ */
qgroup->tqg_queue[qid].tgc_cnt++;
LIST_INSERT_HEAD(&qgroup->tqg_queue[qid].tgc_tasks, gtask,
gt_list);
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">For example in "iflib_legacy_setup" the function " taskqgroup_attach" is called with an irq value other than -1, which triggers the assert.
Now, with the assert disabled the driver seems to work and we can, e.g. get an IP with the dhcpcd0x tests.
We haven't managed to find out what the assert is for exactly, so I don't know if that opens a can of worms.
Is this safe to do?</pre>
</blockquote>
<p>It looks like your upper layers request an unsupported feature. I
disabled several things related to CPU affinity in libbsd since
this was not properly supported by RTEMS before the EDF SMP
scheduler was introduced. It may be possible to enable these
features now. If you want to enable something in this area, please
add test cases.</p>
<p>FreeBSD sometimes uses per-CPU data structures. They must be used
with care.</p>
</body>
</html>