-
Notifications
You must be signed in to change notification settings - Fork 711
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
Tracking: Couple IPCData array sizes with number of apps on board #1583
Comments
The cleanest fix for this (IMO) is to use const generics to tie the size of these arrays to the number of processes, as initially attempted in #1585 . However this approach introduces additional uses of unsafe which can be removed once either rust-lang/rust#61415 or rust-lang/rust#68567 are addressed, at which point #1585 can be modified and reopened. Alternatively someone could attempt a more significant restructuring of IPC to avoid this issue, but I suspect that it is not worth the effort for now. |
Update: this can now be achieved on latest nightly without unsafe thanks to rust-lang/rust#69981 . However it still requires const generics, which is maybe less stable than most unstable features currently used in Tock (rust labels it an incomplete feature). Working branch: https://github.com/hudson-ayers/tock/tree/ipc-const-generics . For imix this branch reduces the size of the IPCData structure from 412 to 220 bytes. |
Currently, the IPCData array in
kernel/src/ipc.rs
is hardcoded to hold 8 elements, and whenever an application registers as an IPC client, the callback and shared memory for that client is stored at that place in the array. Currently the Hail board is initialized with support for up to 20 apps. If an app with an index greater than 7 attempts to use IPC, IPC will fail.Ideally we would tie the size of these arrays to the size of the PROCESSES array, though I am not yet sure exactly how that should be done.
The text was updated successfully, but these errors were encountered: