LibBSD | rtemsbsd/mve: Fix the interrupt handler closure and installation order (!155)

Sang Woo Kim (@physwkim) gitlab at rtems.org
Fri Jul 31 07:33:36 UTC 2026



Sang Woo Kim created a merge request: https://gitlab.rtems.org/rtems/pkg/rtems-libbsd/-/merge_requests/155

Project:Branches: physwkim/rtems-libbsd:fix/mve-irq-ordering to rtems/pkg/rtems-libbsd:7-freebsd-14
Author:   Sang Woo Kim



The generic-interrupt conversion (64c77fd07) kept `mveth_isr()` casting its argument to `struct mveth_private*` while installing it with `(void*)mp->port_num`, so the first mve interrupt dereferences the port number — #94's `DAR = 0x60` is exactly `offsetof(struct mveth_private, stats.irqs)`. The second commit moves the installation out of `BSP_mve_create()` into a new `BSP_mve_setup_irqs()` called after `mve_attach()` has set `sc->mp` and `sc->daemonTid`, closing the shared-vector window that remains once the argument is fixed (#105).

Compile-tested on powerpc/beatnik; I have no MVME hardware, so runtime confirmation would need @junkes — I believe this covers both of your local fixes (the #94 patch and the attach guard), hopefully making them unnecessary.

Closes #94, #105

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/pkg/rtems-libbsd/-/merge_requests/155
You're receiving this email because of your account on gitlab.rtems.org. Unsubscribe from this thread: https://gitlab.rtems.org/-/sent_notifications/4-0jusgd0ni79d66htpk28fksb3-k/unsubscribe | Manage all notifications: https://gitlab.rtems.org/-/profile/notifications | Help: https://gitlab.rtems.org/help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20260731/f3449c96/attachment.htm>


More information about the bugs mailing list