Commit aec1b7f
committed
ArmPkg/SmmuDxe: Add per-streamId isolation for each DMA capable device
Replaces the previous shared-root model with on-demand per-StreamID
stage-2 isolation:
* Each StreamID gets its own stage-2 page-table root and VMID,
allocated lazily on the first IoMmuSetAttribute call and promoted
via break-before-make.
* Aliases (multiple StreamIDs for one logical device) share the
primary's root + VMID, so a single page-table update covers all
of them and TLB invalidation by (VMID, IPA) is alias-safe.
* DeviceHandleToStreamId resolves an EFI_HANDLE to its StreamID(s)
and owning SMMU base via PciIo->GetLocation: real PCIe goes
through the IORT Root Complex node; non-discoverable devices are
detected when GetLocation() returns Segment 0xFF, from which the
UniqueId is extracted and looked up in the NC HOB table to find
the matching IORT Named Component node.
* IoMmuSetAttributeById provides the same isolation for handle-less
DMA agents using (IommuBase, StreamId) directly.
* GIC EVTQ/GERR IRQs are registered per SMMU so faults surface
immediately via SmmuV3LogErrors.
* ExitBootServices is per-SMMU: RMR-bearing SMMUs go to bypass,
others go to global-abort.
Platform interface additions:
* SMMU_CONFIG gains NcDeviceListSize / NcDeviceListOffset.
* SMMU_NC_DEVICE_ENTRY {UniqueId, ObjName[32]} maps each platform
UniqueId to an IORT Named Component name.
See ArmPkg/Drivers/SmmuDxe/README.md for flow diagrams, HOB layout,
and platform integration steps.1 parent 4691635 commit aec1b7f
8 files changed
Lines changed: 2679 additions & 230 deletions
File tree
- ArmPkg
- Drivers/SmmuDxe
- Include/Guid
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
26 | 29 | | |
27 | 30 | | |
28 | 31 | | |
| |||
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
| 41 | + | |
38 | 42 | | |
| 43 | + | |
39 | 44 | | |
40 | 45 | | |
41 | 46 | | |
| |||
47 | 52 | | |
48 | 53 | | |
49 | 54 | | |
| 55 | + | |
50 | 56 | | |
| 57 | + | |
51 | 58 | | |
52 | 59 | | |
53 | 60 | | |
| |||
Large diffs are not rendered by default.
0 commit comments