<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en" style="--code-editor-font: var(--default-mono-font, "GitLab Mono"), JetBrains Mono, Menlo, DejaVu Sans Mono, Liberation Mono, Consolas, Ubuntu Mono, Courier New, andale mono, lucida console, monospace;">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title>
GitLab
</title>
<style data-premailer="ignore" type="text/css">
a { color: #1068bf; }
</style>
<style>img {
max-width: 100%; height: auto;
}
body {
font-size: .875rem;
}
body {
-webkit-text-shadow: hsla(0,0%,100%,.01) 0 0 1px;
}
body {
font-family: "GitLab Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"; font-size: inherit;
}
</style>
</head>
<body style="font-size: inherit; -webkit-text-shadow: hsla(0,0%,100%,.01) 0 0 1px; font-family: "GitLab Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";">
<div class="content">
<p class="details" style="font-style: italic; color: #626168;">
<a href="https://gitlab.rtems.org/physwkim">Sang Woo Kim</a> created a merge request: <a href="https://gitlab.rtems.org/rtems/pkg/rtems-libbsd/-/merge_requests/155">!155</a>
</p>
<div class="branch">
Project:Branches: physwkim/rtems-libbsd:fix/mve-irq-ordering to rtems/pkg/rtems-libbsd:7-freebsd-14
</div>
<div class="author">
Author: Sang Woo Kim
</div>
<div class="assignee">
Assignees:
</div>
<div class="reviewer">
Reviewers:
</div>
<div class="md gl-mt-5" style="position: relative; z-index: 1; color: #3a383f; word-wrap: break-word; margin-top: 1rem;">
<p dir="auto" style="color: #3a383f; margin: 0px 0px 1rem;" align="initial">The generic-interrupt conversion (<a href="https://gitlab.rtems.org/rtems/pkg/rtems-libbsd/-/commit/64c77fd07adbaafd36113ad1bb6e1907a6e73e95" title="powerpc/beatnik: Support generic interrupts and add e1000" class="gfm gfm-commit has-tooltip" data-original="64c77fd07" data-link="false" data-link-reference="false" data-commit="64c77fd07adbaafd36113ad1bb6e1907a6e73e95" data-project="13" data-container="body" data-placement="top" data-reference-type="commit" style="font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; font-size: 95%; margin-top: 0px;">64c77fd0</a>) kept <code style="font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; font-weight: inherit; overflow-wrap: break-word; white-space: break-spaces; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; word-break: keep-all; padding: 0.125rem 0.25rem;">mveth_isr()</code> casting its argument to <code style="font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; font-weight: inherit; overflow-wrap: break-word; white-space: break-spaces; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; word-break: keep-all; padding: 0.125rem 0.25rem;">struct mveth_private*</code> while installing it with <code style="font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; font-weight: inherit; overflow-wrap: break-word; white-space: break-spaces; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; word-break: keep-all; padding: 0.125rem 0.25rem;">(void*)mp->port_num</code>, so the first mve interrupt dereferences the port number — <a href="https://gitlab.rtems.org/rtems/pkg/rtems-libbsd/-/work_items/94" title="beatnik/mve: rtems_interrupt_handler_install passes port_num instead of mveth_private* to mveth_isr, crashing on first interrupt" class="gfm gfm-issue" data-original="#94" data-link="false" data-link-reference="false" data-issue="29798" data-project="13" data-iid="94" data-namespace-path="rtems/pkg/rtems-libbsd" data-project-path="rtems/pkg/rtems-libbsd" data-issue-type="issue" data-container="body" data-placement="top" data-reference-type="issue">#94</a>'s <code style="font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; font-weight: inherit; overflow-wrap: break-word; white-space: break-spaces; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; word-break: keep-all; padding: 0.125rem 0.25rem;">DAR = 0x60</code> is exactly <code style="font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; font-weight: inherit; overflow-wrap: break-word; white-space: break-spaces; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; word-break: keep-all; padding: 0.125rem 0.25rem;">offsetof(struct mveth_private, stats.irqs)</code>. The second commit moves the installation out of <code style="font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; font-weight: inherit; overflow-wrap: break-word; white-space: break-spaces; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; word-break: keep-all; padding: 0.125rem 0.25rem;">BSP_mve_create()</code> into a new <code style="font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; font-weight: inherit; overflow-wrap: break-word; white-space: break-spaces; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; word-break: keep-all; padding: 0.125rem 0.25rem;">BSP_mve_setup_irqs()</code> called after <code style="font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; font-weight: inherit; overflow-wrap: break-word; white-space: break-spaces; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; word-break: keep-all; padding: 0.125rem 0.25rem;">mve_attach()</code> has set <code style="font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; font-weight: inherit; overflow-wrap: break-word; white-space: break-spaces; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; word-break: keep-all; padding: 0.125rem 0.25rem;">sc->mp</code> and <code style="font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; font-weight: inherit; overflow-wrap: break-word; white-space: break-spaces; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; word-break: keep-all; padding: 0.125rem 0.25rem;">sc->daemonTid</code>, closing the shared-vector window that remains once the argument is fixed (<a href="https://gitlab.rtems.org/rtems/pkg/rtems-libbsd/-/work_items/105" title="beatnik/mve: interrupt handler is installed before the nexus softc is initialized" class="gfm gfm-issue" data-original="#105" data-link="false" data-link-reference="false" data-issue="29870" data-project="13" data-iid="105" data-namespace-path="rtems/pkg/rtems-libbsd" data-project-path="rtems/pkg/rtems-libbsd" data-issue-type="issue" data-container="body" data-placement="top" data-reference-type="issue">#105</a>).</p>
<p dir="auto" style="color: #3a383f; margin: 0px 0px 1rem;" align="initial">Compile-tested on powerpc/beatnik; I have no MVME hardware, so runtime confirmation would need <a href="https://gitlab.rtems.org/junkes" title="Heinz Junkes" class="gfm gfm-project_member js-user-link" data-user="73" data-original="@junkes" data-container="body" data-placement="top" data-reference-type="user" style="color: #284779; background-color: #cbe2f9; border-radius: .25rem; margin-top: 0px; padding: 0 2px;">@junkes</a> — I believe this covers both of your local fixes (the <a href="https://gitlab.rtems.org/rtems/pkg/rtems-libbsd/-/work_items/94" title="beatnik/mve: rtems_interrupt_handler_install passes port_num instead of mveth_private* to mveth_isr, crashing on first interrupt" class="gfm gfm-issue" data-original="#94" data-link="false" data-link-reference="false" data-issue="29798" data-project="13" data-iid="94" data-namespace-path="rtems/pkg/rtems-libbsd" data-project-path="rtems/pkg/rtems-libbsd" data-issue-type="issue" data-container="body" data-placement="top" data-reference-type="issue">#94</a> patch and the attach guard), hopefully making them unnecessary.</p>
<p dir="auto" style="color: #3a383f; margin: 0px;" align="initial">Closes <a href="https://gitlab.rtems.org/rtems/pkg/rtems-libbsd/-/work_items/94" title="beatnik/mve: rtems_interrupt_handler_install passes port_num instead of mveth_private* to mveth_isr, crashing on first interrupt" class="gfm gfm-issue" data-original="#94" data-link="false" data-link-reference="false" data-issue="29798" data-project="13" data-iid="94" data-namespace-path="rtems/pkg/rtems-libbsd" data-project-path="rtems/pkg/rtems-libbsd" data-issue-type="issue" data-container="body" data-placement="top" data-reference-type="issue" style="margin-top: 0px;">#94</a>, <a href="https://gitlab.rtems.org/rtems/pkg/rtems-libbsd/-/work_items/105" title="beatnik/mve: interrupt handler is installed before the nexus softc is initialized" class="gfm gfm-issue" data-original="#105" data-link="false" data-link-reference="false" data-issue="29870" data-project="13" data-iid="105" data-namespace-path="rtems/pkg/rtems-libbsd" data-project-path="rtems/pkg/rtems-libbsd" data-issue-type="issue" data-container="body" data-placement="top" data-reference-type="issue">#105</a></p>
</div>
</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #626168;">
—
<br>
<a href="https://gitlab.rtems.org/rtems/pkg/rtems-libbsd/-/merge_requests/155">View it on GitLab</a>.
<br>
You're receiving this email because of your account on <a target="_blank" rel="noopener noreferrer" href="https://gitlab.rtems.org">gitlab.rtems.org</a>. <a href="https://gitlab.rtems.org/-/sent_notifications/4-0jusgd0ni79d66htpk28fksb3-k/unsubscribe" target="_blank" rel="noopener noreferrer">Unsubscribe</a> from this thread · <a href="https://gitlab.rtems.org/-/profile/notifications" target="_blank" rel="noopener noreferrer" class="mng-notif-link">Manage all notifications</a> · <a href="https://gitlab.rtems.org/help" target="_blank" rel="noopener noreferrer" class="help-link">Help</a>
<span style="color: transparent; font-size: 0; display: none; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0;">
Notification message regarding https://gitlab.rtems.org/rtems/pkg/rtems-libbsd/-/merge_requests/155 at 1785483216
</span>
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Merge request","url":"https://gitlab.rtems.org/rtems/pkg/rtems-libbsd/-/merge_requests/155"}}</script>
</p>
</div>
</body>
</html>