IOMMU: Add backend support for IOMMU#8
Open
cazb2 wants to merge 3 commits into
Open
Conversation
ad6a939 to
4fdc587
Compare
6a5c062 to
4df0221
Compare
6110e20 to
0f014d7
Compare
4df0221 to
4121642
Compare
54437dc to
f363700
Compare
midnightveil
reviewed
Jul 9, 2026
|
|
||
| env: | ||
| SEL4_VERSION: b7ef16a42d6d87b776462e66b8803365aea9f41d | ||
| SEL4_VERSION: b57b3de19526375eb63343f750b9720a3e20babf |
There was a problem hiding this comment.
Note that this also requires updates to seL4/microkit-manifest.
There was a problem hiding this comment.
| #include <stdint.h> | ||
|
|
||
| #include <microkit.h> | ||
| #include <sys/wait.h> |
There was a problem hiding this comment.
Erm, we don't have Linux, how does this work?
| #ifdef VTD_PT_INDEX_BITS | ||
| MICROKIT_CONSTANT(io_page_table_index_bits, VTD_PT_INDEX_BITS) | ||
| #ifdef seL4_IOPageTableIndexBits | ||
| MICROKIT_CONSTANT(io_page_table_index_bits, seL4_IOPageTableIndexBits) |
There was a problem hiding this comment.
Oh, I see this changed from here: #7 (comment)
| // The useable set of domain_ids can only be discovered through run-time errors in seL4. | ||
| // Crazy right! Mircokit tool does not support multiple devices sharing the same address | ||
| // space thus domain_id is not used by the Microkit tool. | ||
| domain_id: Word(0), |
There was a problem hiding this comment.
This will need to be changed as discussed.
| Object::PageTable(_) => "PageTable", | ||
| Object::AsidPool(_) => "AsidPool", | ||
| Object::IODevice(_) => "x86 IODevice", | ||
| Object::IOPT(_) => "x86 IOPageTable", |
| // SPDX-License-Identifier: BSD-2-Clause | ||
| // | ||
|
|
||
| use sel4_capdl_initializer_types::x86_io_address_space; |
There was a problem hiding this comment.
Please make this consistent with other imports.
| (Arch::X86_64, true) => self | ||
| .io_page_table_index_bits | ||
| .expect("Error: An x86 VT-D build should have VTD_PT_INDEX_BITS defined by seL4, captured in tool/microkit/object_sizes.h"), | ||
| .expect("Error: An x86 VT-D build should have seL4_IOPageTableIndexBits defined by seL4, captured in tool/microkit/object_sizes.h"), |
4121642 to
6539123
Compare
f363700 to
4d27483
Compare
4d27483 to
711827e
Compare
caf67fe to
31069d2
Compare
711827e to
0f1363d
Compare
31069d2 to
284c6d6
Compare
0f1363d to
91e685e
Compare
284c6d6 to
08f27ce
Compare
91e685e to
86928dc
Compare
08f27ce to
b8f5869
Compare
82e995b to
5073a85
Compare
b8f5869 to
658c8e4
Compare
5073a85 to
2d8be3a
Compare
658c8e4 to
5919e3f
Compare
b5c3336 to
54f9a05
Compare
5366060 to
2e1b57e
Compare
5919e3f to
84cec53
Compare
2e1b57e to
5a4cd2f
Compare
84cec53 to
95dd28f
Compare
3c79207 to
342676a
Compare
342676a to
829568e
Compare
2af2aab to
9ecdac4
Compare
This commit adds a helper to extract the io page table index bits from the config. This currently only supports a IOMMU build on x86. Signed-off-by: Callum <c.berry@student.unsw.edu.au>
This commit implements support for the x86 IOMMU Capdl spec. The memory module is extended to allow for the construction of IOMMU address spaces. The Capdl spec refers to the IOSpace object as the IODevice object and the IO Page tables as IOPTs. Within microkit we use IOSpace to refer to the whole IO address space. It also provides an example using the qemu dma capable test device, demonstrating the use of the IOMMU. Note we did not need to provide physical memory addresses for any dma buffers, proving the IOMMU correctly translated our requests. Signed-off-by: Callum <c.berry@student.unsw.edu.au>
While seL4 does not support large pages to be used by the IOMMU, we will raise an error at the SDF parsing stage. Signed-off-by: Callum <c.berry@student.unsw.edu.au>
829568e to
df27a19
Compare
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.
Adds logic for the creation of the IOMMU Capdl spec objects.
Adds an example demonstrating the use of the IOMMU.
Enables the IOMMU in the build_sdk.