Skip to content

Commit

Permalink
Add SMMU Dxe Driver (#320)
Browse files Browse the repository at this point in the history
## 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
  • Loading branch information
eeshanl authored Jan 14, 2025
1 parent 25e1539 commit bba6299
Show file tree
Hide file tree
Showing 11 changed files with 5,097 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ArmPkg/ArmPkg.dec
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@
# Include/Guid/ArmMpCoreInfo.h
gArmMpCoreInfoGuid = { 0xa4ee0728, 0xe5d7, 0x4ac5, {0xb2, 0x1e, 0x65, 0x8e, 0xd8, 0x57, 0xe8, 0x34} }

# MU_CHANGE [BEGIN]
## SMMU config data
# Include/Guid/SmmuConfig.h
gSmmuConfigHobGuid = { 0xcd56ec8f, 0x75f1, 0x440a, { 0xaa, 0x48, 0x09, 0x58, 0xb1, 0x1c, 0x9a, 0xa7 } }
# MU_CHANGE [END]

gArmMmuReplaceLiveTranslationEntryFuncGuid = { 0xa8b50ff3, 0x08ec, 0x4dd3, {0xbf, 0x04, 0x28, 0xbf, 0x71, 0x75, 0xc7, 0x4a} }

[Protocols.common]
Expand Down
3 changes: 3 additions & 0 deletions ArmPkg/ArmPkg.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@
ArmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntryPoint.inf
# MU_CHANGE [END]
ArmPkg/Drivers/MmCommunicationPei/MmCommunicationPei.inf
# MU_CHANGE [BEGIN]
ArmPkg/Drivers/SmmuDxe/SmmuDxe.inf
# MU_CHANGE [END]

[Components.AARCH64]
ArmPkg/Drivers/ArmPsciMpServicesDxe/ArmPsciMpServicesDxe.inf
Expand Down
Loading

0 comments on commit bba6299

Please sign in to comment.