IOMMU: Continue Prior Work#544
Closed
cazb2 wants to merge 3 commits into
Closed
Conversation
c44dadb to
d6ed718
Compare
d6ed718 to
00f8ecc
Compare
c8c04e3 to
78098d0
Compare
Minor adjustments to the prior sdf work to do with how permissions are handled. Previously I implemented read and write functions as part of the SysIOMapPerms enum, however the old SysMapPerms did not do this. Given these types are meant to exhibit similar behaviour extracting this common logic into the Map trait provides a streamlined interface to check if a permission is set. Signed-off-by: Callum <c.berry@student.unsw.edu.au>
This commit is meant to preserve original functionality. The memory.rs file previously was a collection of functions that allowed the mapping of pages into vspaces. This commit refactors this logic into an AddressSpace type. This will allow us to simply support new variants of address spaces, including IO Address Spaces for devices. The majority of changes are made to allow the old functions to be reusued in a more generic way. The changes to the builder.rs reflect the changes to memory.rs or make use of the trait Map as trait bounds to handle both normal Mappings and IOMappings. Signed-off-by: Callum <c.berry@student.unsw.edu.au>
fb824b9 to
af71760
Compare
A lot of the pre-existing logic was defining constants that are already defined by seL4. This commit extracts those and includes them in the Config struct that the tool passes around. Based on the comments in the upcoming seL4 release, ```` Add new libsel4constant `seL4_UserVSpaceTop` which is a *inclusive* value representing the highest available address available to user level. The existing constant `seL4_UserTop` is a mix of inclusive and exclusive across existing platforms, however, changing this to be consistent would break userspace and require proof updates. The existing `seL4_UserTop` define is deprecated. ```` we should be able to extract the seL4_UserVSpaceTop and achieve the same behaviour as the existing user_top function, in a less brittle way. We can similarily extract information such as the vspace_index_bits relevant for aarch builds, where the vspace_index_bits might be 10. The remaining changes are removing constants that we already had access to such as page bits and minimum page size, and implementing the json parsing to obtain these constants. Again this commit preserves existing behaviour. Signed-off-by: Callum <c.berry@student.unsw.edu.au>
af71760 to
2a462da
Compare
Contributor
Author
|
Moved to au-ts fork. |
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
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.
This PR makes a small change to the SDF work previously done. It might be simpler to merge that work to make reviewing new changes simpler. (Only the latest two commits have new content)
It then refactors the memory.rs module in preparation for adding support for IO Address Spaces.
This PR should preserve the current behaviour.