-
Notifications
You must be signed in to change notification settings - Fork 54
Add SMMU Sbsa support #1085
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
Draft
eeshanl
wants to merge
1
commit into
microsoft:main
Choose a base branch
from
eeshanl:smmu_platform
base: main
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.
Draft
Add SMMU Sbsa support #1085
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
6 tasks
5e5d554
to
70e1903
Compare
70e1903
to
44e6247
Compare
eeshanl
added a commit
to microsoft/mu_silicon_arm_tiano
that referenced
this pull request
Jan 14, 2025
## Description Adds SMMUV3 DXE driver to enable DMA remapping through the IOMMU protocol. - Consume SMMU config HOB - Add IORT - Configure SMMU, stream table, cmd/event queues - Configure SMMU page tables - Add IoMmu protocol - Enable SMMU for stage 2 translation & DMA remapping For details on how to complete these options and their meaning refer to [CONTRIBUTING.md](https://github.com/microsoft/mu/blob/HEAD/CONTRIBUTING.md). - [x] Impacts functionality? - [x] Impacts security? - [ ] Breaking change? - [ ] Includes tests? - [x] Includes documentation? - [ ] Backport to release branch? ## How This Was Tested Tested in Qemu with mu_tiano_platforms: - Tested UEFI functionality with SMMU/IOMMU enabled. - Booted to OS while SMMU/IOMMU enabled. ## Integration Instructions To integrate with mu_tiano_platforms the following is also required: - TFA v2.11+ or <https://windowspartners.visualstudio.com/MSCoreUEFI/_git/tf-a_mirror?version=GBeeshan_smmu> - Qemu version v9.1.50+ <https://gitlab.com/qemu-project/qemu> - mu_tiano_platforms - microsoft/mu_tiano_platforms#1085
bc3288d
to
87a8a91
Compare
kuqin12
approved these changes
Feb 5, 2025
- Configure SMMU config HOB in SbsaPlatformPeiLib - Update SbsaQemuAcpiDxe to use ArmMonitor calls to work with updated qemu version 9.1.50 - Relies on cherry-pick 42925c15bee09162c6dfc8c2204843ffac6201c1 in Silicon/Arm/TFA
6 tasks
eeshanl
added a commit
to microsoft/mu_silicon_arm_tiano
that referenced
this pull request
Apr 9, 2025
… IORT config (#360) ## Description Supports N number of SMMU's Dynamically parses any generic IORT structure and configures the SMMU's accordingly For details on how to complete these options and their meaning refer to [CONTRIBUTING.md](https://github.com/microsoft/mu/blob/HEAD/CONTRIBUTING.md). - [x] Impacts functionality? - [x] Impacts security? - [x] Breaking change? - [ ] Includes tests? - [ ] Includes documentation? - [ ] Backport to release branch? ## How This Was Tested Tested on an ARM surface platform and QEMU SBSA. See microsoft/mu_tiano_platforms#1085 for platform side changes. ## Integration Instructions N/A
Note: @kuqin12 is working on the QEMU 10 update that is needed for this. |
eeshanl
added a commit
to eeshanl/mu_silicon_arm_tiano
that referenced
this pull request
Jun 6, 2025
Adds SMMUV3 DXE driver to enable DMA remapping through the IOMMU protocol. - Consume SMMU config HOB - Add IORT - Configure SMMU, stream table, cmd/event queues - Configure SMMU page tables - Add IoMmu protocol - Enable SMMU for stage 2 translation & DMA remapping For details on how to complete these options and their meaning refer to [CONTRIBUTING.md](https://github.com/microsoft/mu/blob/HEAD/CONTRIBUTING.md). - [x] Impacts functionality? - [x] Impacts security? - [ ] Breaking change? - [ ] Includes tests? - [x] Includes documentation? - [ ] Backport to release branch? Tested in Qemu with mu_tiano_platforms: - Tested UEFI functionality with SMMU/IOMMU enabled. - Booted to OS while SMMU/IOMMU enabled. To integrate with mu_tiano_platforms the following is also required: - TFA v2.11+ or <https://windowspartners.visualstudio.com/MSCoreUEFI/_git/tf-a_mirror?version=GBeeshan_smmu> - Qemu version v9.1.50+ <https://gitlab.com/qemu-project/qemu> - mu_tiano_platforms - microsoft/mu_tiano_platforms#1085 [SQUASH ON REBASE] SmmuDxe updates and bug fixes (microsoft#354) Bug fix for command queue address not being aligned properly. Bug fix for event queue consumption. Dynamically sets starting level of translation for paging from IDR5.OAS on the smmu. Improve logging on error. Safety improvements on updating page table entries in the IoMmu protocol. - [x] Impacts functionality? - [x] Impacts security? - [ ] Breaking change? - [ ] Includes tests? - [ ] Includes documentation? - [ ] Backport to release branch? Tested on QEMU SBSA platform as well as a physical ARM surface platform N/A [SQUASH ON REBASE] Add support for N SMMU's and dynamically parse any IORT config (microsoft#360) Supports N number of SMMU's Dynamically parses any generic IORT structure and configures the SMMU's accordingly For details on how to complete these options and their meaning refer to [CONTRIBUTING.md](https://github.com/microsoft/mu/blob/HEAD/CONTRIBUTING.md). - [x] Impacts functionality? - [x] Impacts security? - [x] Breaking change? - [ ] Includes tests? - [ ] Includes documentation? - [ ] Backport to release branch? Tested on an ARM surface platform and QEMU SBSA. See microsoft/mu_tiano_platforms#1085 for platform side changes. N/A [SQUASH ON REBASE] Support Concatenated Translation Tables (microsoft#367) Fix alignment for page table root to be aligned to the size of maximum number of allowed concatenated page tables, 16. For the case where the address width is too large to for the VA bits to fit within a 9-bit width for the root level, we can extend the level index bits. This corresponds to how many page tables can be concatenated. Up to 4 bits of extension are allowed, meaning a total of 16 concatenated tables. See: [DDI0487L_a_a-profile_architecture_reference_manual section](https://developer.arm.com/documentation/ddi0487/latest/) Section D8.2.2 on Concatenated Translation Tables For details on how to complete these options and their meaning refer to [CONTRIBUTING.md](https://github.com/microsoft/mu/blob/HEAD/CONTRIBUTING.md). - [x] Impacts functionality? - [x] Impacts security? - [ ] Breaking change? - [ ] Includes tests? - [ ] Includes documentation? - [ ] Backport to release branch? Tested on QEMU SBSA as well as a physical arm device. N/A Add RMR support for IORT and SmmuDxe IoMmu mappings (microsoft#374) Add RMR support for IORT and SmmuDxe IoMmu mappings Parses IORT for RMR node memory range descriptors Maps them to the SMMU page tables to be used by the IoMmu protocol Updates TLIBI operation from TLIBI ALL to TLIBI S2 IPA, now invalidates TLB for InputAddress to Stage 2 SMMU. Due to an issue seen while testing on a physical arm platform, we see a 0x13 F_PERMISSION fault from the smmu when not setting both r/w bits. For now, temporarily setting both RW bits in IoMmuSetAttribute TODO: microsoft#375 Debug this issue and revert this permissions change. For details on how to complete these options and their meaning refer to [CONTRIBUTING.md](https://github.com/microsoft/mu/blob/HEAD/CONTRIBUTING.md). - [x] Impacts functionality? - [x] Impacts security? - [ ] Breaking change? - [ ] Includes tests? - [ ] Includes documentation? - [ ] Backport to release branch? Tested on QEMU SBSA and physical arm platform N/A Update SMMU_CONFIG HOB structure to allow platform to enable/disable individual SMMU's Allows the platform to toggle translation/bypass (enable/disable) on any SMMU within the IORT during pre-boot. platform_test
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
DO NOT MERGE until qemu 9.1.50 is supported and https://windowspartners.visualstudio.com/MSCoreUEFI/_git/tf-a_mirror?version=GBeeshan_smmu has been integrated into TFA.
Description
This change adds SMMU/IOMMU support to mu_tiano_platforms. Actual SMMU driver can be found in ArmPkg.
For details on how to complete these options and their meaning refer to CONTRIBUTING.md.
How This Was Tested
Tested on Qemu with mu_tiano_platforms
Integration Instructions
This change relies on: