-
Notifications
You must be signed in to change notification settings - Fork 747
Initial MMU support #4465
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
Open
Ioan-Cristian
wants to merge
30
commits into
tock:master
Choose a base branch
from
OxidosAutomotive:mmu
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Initial MMU support #4465
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Ioan-Cristian CÎRSTEA <ioan.cirstea@oxidos.io>
Signed-off-by: Ioan-Cristian CÎRSTEA <ioan.cirstea@oxidos.io>
Signed-off-by: Ioan-Cristian CÎRSTEA <ioan.cirstea@oxidos.io>
… array Signed-off-by: Ioan-Cristian CÎRSTEA <ioan.cirstea@oxidos.io>
… loader Signed-off-by: Ioan-Cristian CÎRSTEA <ioan.cirstea@oxidos.io>
Signed-off-by: Ioan-Cristian CÎRSTEA <ioan.cirstea@oxidos.io>
Signed-off-by: Ioan-Cristian CÎRSTEA <ioan.cirstea@oxidos.io>
…ion with MPUs Until this commit, the kernel checked whether the virtual address space of a process intersects with its own virtual address space. This approach does not work for MPUs where the kernel and processes share the same "virtual" address space. This commit fixes this issue by adding a config value which tells the kernel whether a MPU is used. The method used for checking if the process memory configuration is valid has been changed to take use of the config value. Signed-off-by: Ioan-Cristian CÎRSTEA <ioan.cirstea@oxidos.io>
Signed-off-by: Ioan-Cristian CÎRSTEA <ioan.cirstea@oxidos.io>
Signed-off-by: Ioan-Cristian CÎRSTEA <ioan.cirstea@oxidos.io>
Signed-off-by: Ioan-Cristian CÎRSTEA <ioan.cirstea@oxidos.io>
Signed-off-by: Ioan-Cristian CÎRSTEA <ioan.cirstea@oxidos.io>
Signed-off-by: Ioan-Cristian CÎRSTEA <ioan.cirstea@oxidos.io>
`initialize_process()` took both kernel pointers and userspace pointers representing the starting memory of the process and its break. However, all architectures need userspace pointers only to initialize a process. Signed-off-by: Ioan-Cristian CÎRSTEA <ioan.cirstea@oxidos.io>
Signed-off-by: Ioan-Cristian CÎRSTEA <ioan.cirstea@oxidos.io>
Signed-off-by: Ioan-Cristian CÎRSTEA <ioan.cirstea@oxidos.io>
…ment system Signed-off-by: Ioan-Cristian CÎRSTEA <ioan.cirstea@oxidos.io>
…gned Signed-off-by: Ioan-Cristian CÎRSTEA <ioan.cirstea@oxidos.io>
Signed-off-by: Ioan-Cristian CÎRSTEA <ioan.cirstea@oxidos.io>
Signed-off-by: Ioan-Cristian CÎRSTEA <ioan.cirstea@oxidos.io>
Signed-off-by: Ioan-Cristian CÎRSTEA <ioan.cirstea@oxidos.io>
Most architectures should not access any memory during context switch. The sole exception is ARMv*-M architecture which pushes system call registers on the stack and pops system call return values from the stack. Since the architecture lacks a MMU, it doesn't distinguish between kernel virtual pointers and user virtual pointers. However, it is more logical to pass user virtual pointers, as the architecture implementation checks if the stack pointer lies within process' virtual address space. Signed-off-by: Ioan-Cristian CÎRSTEA <ioan.cirstea@oxidos.io>
Signed-off-by: Ioan-Cristian CÎRSTEA <ioan.cirstea@oxidos.io>
Signed-off-by: Ioan-Cristian CÎRSTEA <ioan.cirstea@oxidos.io>
Signed-off-by: Ioan-Cristian CÎRSTEA <ioan.cirstea@oxidos.io>
Signed-off-by: Ioan-Cristian CÎRSTEA <ioan.cirstea@oxidos.io>
Signed-off-by: Ioan-Cristian CÎRSTEA <ioan.cirstea@oxidos.io>
Signed-off-by: Ioan-Cristian CÎRSTEA <ioan.cirstea@oxidos.io>
Signed-off-by: Ioan-Cristian CÎRSTEA <ioan.cirstea@oxidos.io>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Overview
This pull request revamps the memory management system completely. The goals of the new memory management are:
Testing Strategy
This pull request was tested by running
libtock-rs
applications on Raspberry Pi Pico, QEMU RISC-V 32-bit and QEMU x86.TODO or Help Wanted
This PR is currently blocked by:
ProcessArray
to hold an array of&Process
s with interior mutability #4447This PR should be labeled as blocked until the previous two PRs are merged.
This pull request still needs to clarify the following points:
libtock-rs
). A future patch will address this issue.ProcessStandard::create()
needs to be refactored in several functions that can be reused byProcessStandard::reset()
.()
. Impossible to implement since the kernel needs&dyn Process
, which in turn means thatProcess
needs to be object-safe.dyn Process
, which in turn means thatProcess
needs to be object-safe.Documentation Updated
Formatting
make prepush
.