Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not access Microkit variables directly #76

Open
Ivan-Velickovic opened this issue Mar 26, 2024 · 0 comments
Open

Do not access Microkit variables directly #76

Ivan-Velickovic opened this issue Mar 26, 2024 · 0 comments

Comments

@Ivan-Velickovic
Copy link
Collaborator

Ivan-Velickovic commented Mar 26, 2024

Currently in the networking sub-system it is common to see snippets of code like this:

    if (notify_tx && net_require_signal(state.tx_queue.active)) {
        net_cancel_signal(state.tx_queue.active);
        notify_tx = false;
        if (!have_signal) microkit_notify_delayed(TX_CH);
        else if (signal_cap != BASE_OUTPUT_NOTIFICATION_CAP + TX_CH) microkit_notify(TX_CH);
    }

have_signal and signal_cap are Microkit globals that should not be accessed by user-code and we also do things like BASE_OUTPUT_NOTIFICATION_CAP + TX_CH.

The root issue is that the Microkit API is lacking regarding delayed/deferred IRQ acks/notifies.

Opening this issue so that we remember to update sDDF once Microkit figures out the API. We should also update any projects that might have this pattern as well such as LionsOS and libvmm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant