interplane.Get Omega
Read in your language

aienux

Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.

Brought by drakestapleton

GitHub aien-dev/aienux#299 (code only)

closed derived 8b8edb912a62c2d4 #299

Imported from GitHub aien-dev/aienux#299 (code only)

GitHub's metadata for this pull request is unavailable: its state is DERIVED from the commits (merged: the head is reachable from this project's main; open: GitHub kept a merge ref; else closed).

Base e987a1086cbb6d0866356fa11ff0b6156a1e7ec4 · Head d5afe96bd431d1ca68710e7098f6a4cd2cff1fbb

Apply it

git checkout -b patch-8b8edb912a62c2d4 e987a1086cbb6d0866356fa11ff0b6156a1e7ec4
curl -fsSL https://interplane.io/drakestapleton/aienux/patches/8b8edb912a62c2d4.patch | git am

Raw patch (mbox) · Diff

Provenance

This proposal is imported from GitHub; it is not signed by its author. Its import statement and source record:

github-import 1
aien-dev/aienux
299
d5afe96bd431d1ca68710e7098f6a4cd2cff1fbb
{"kind":"github-import","owner":"aien-dev","repo":"aienux","number":299,"url":"https://github.com/aien-dev/aienux/pull/299","export_sha256":"967c79e26a893657b5cdaa45efd442be5dbd2ecfe68e25f9a8c1b5da4d60d452","imported_utc":"2026-11-18T16:36:09Z","metadata":"unavailable","state_derived":true}

Changes

diff --git a/.crumb b/.crumb
index c519531d..b18b22e9 100644
--- a/.crumb
+++ b/.crumb
@@ -27,14 +27,14 @@
           "purpose": "Directory crates. Purpose not yet described by a human."
         },
         {
-          "digest": "162874613694f33bea2e90a01d7091c80153fe9771edfe09132c92b82004be63",
-          "last_commit": "f759310",
+          "digest": "30f908b47375e088c78fe9123dac1ef2df0551c10de30c8c19ba7b053c065f91",
+          "last_commit": "ed308de",
           "name": "docs",
           "purpose": "Directory docs. Purpose not yet described by a human."
         },
         {
-          "digest": "14192734c76840815c344af42af21c84274265dcc374a3ce2bccb01113bc83a9",
-          "last_commit": "f759310",
+          "digest": "1dd726352055e65ac3c21d6f8c4e0c841a8c4912ba8384dfa8968fb7ce4d82fb",
+          "last_commit": "ed308de",
           "name": "native",
           "purpose": "Directory native. Purpose not yet described by a human."
         },
@@ -45,15 +45,15 @@
           "purpose": "Directory scripts. Purpose not yet described by a human."
         }
       ],
-      "children_root": "sha256:34d62464cea587ebc0a1f72b1cc4cd5c9b4fa50e475f8e28bd957b12bd7d64ff",
-      "compiled_at": "2026-10-10T03:01:04Z",
+      "children_root": "sha256:03cc72c852977cfbb531f9c497786a19a44ad112cdcee9756cb05db438fae2b4",
+      "compiled_at": "2026-10-10T04:29:33Z",
       "compiler": "crumb-compile/1",
-      "digest": "sha256:703cd9045f671a3cb2c64f0c4f6c3278d1e56b9afb293bd06991d16bfcf87a82",
+      "digest": "sha256:87605929e4a875c96f065abb54460aec06c7c835b38ab2b97c4f2bff361a000e",
       "evidence_files": 155,
       "evidence_root": "sha256:d59c0cef4e7dd5172923754a95b411ca54b01f35baca4587f792f1b259f1eaf7",
       "files": 3036,
-      "generated_at_commit": "f759310fc87760e56432e734db76c540c6e936ae",
-      "source_tree": "sha256:b6e8f6e84d267f0e1ea11d6b9ad12bc7a1395df970f9f4bacae0b6449ce72194"
+      "generated_at_commit": "ed308de52ede1d4c8a211d88e0e4a3ac5c92ec23",
+      "source_tree": "sha256:84adae421ac7242801cac74a09f3a3b660fa3d1d44b540034700bed7f0b4d852"
     },
     "owner_lane": "",
     "provenance": {
diff --git a/docs/.crumb b/docs/.crumb
index c97918ef..b9d2ead3 100644
--- a/docs/.crumb
+++ b/docs/.crumb
@@ -30,14 +30,14 @@
         }
       ],
       "children_root": "sha256:55bcc89f5282eb2e3f4e86d882abdfb5f4ea39e427ef97ef620b2267e5701eb1",
-      "compiled_at": "2026-10-10T03:01:04Z",
+      "compiled_at": "2026-10-10T04:29:33Z",
       "compiler": "crumb-compile/1",
-      "digest": "sha256:162874613694f33bea2e90a01d7091c80153fe9771edfe09132c92b82004be63",
+      "digest": "sha256:30f908b47375e088c78fe9123dac1ef2df0551c10de30c8c19ba7b053c065f91",
       "evidence_files": 0,
       "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
       "files": 66,
-      "generated_at_commit": "f759310fc87760e56432e734db76c540c6e936ae",
-      "source_tree": "sha256:aa3ad171f5d91c360fbf933a32218fdf45a93340d22a63baea46a61f9b95a942"
+      "generated_at_commit": "ed308de52ede1d4c8a211d88e0e4a3ac5c92ec23",
+      "source_tree": "sha256:4be513f71b655a5ddef8e3bb8bf5b15e77f9cb4ca5214a8e290af31a24b38cab"
     },
     "owner_lane": "",
     "provenance": {
diff --git a/docs/GB10_DMA_ROUTE_INVENTORY.md b/docs/GB10_DMA_ROUTE_INVENTORY.md
index be97780e..300164d1 100644
--- a/docs/GB10_DMA_ROUTE_INVENTORY.md
+++ b/docs/GB10_DMA_ROUTE_INVENTORY.md
@@ -32,10 +32,9 @@ lines cited below match the pinned lines in that map).
 | IORT table is present (3904 bytes); Linux reports one Arm SMMUv3, 40-bit output, 2-level stream table covering 25 of 32 stream-ID bits, default domain Translated | [SOURCE docs/GB10_PLATFORM_TOPOLOGY.md:68-74] (Linux observed) |
 | GB10 is alone in IOMMU group 20 | [SOURCE docs/GB10_PLATFORM_TOPOLOGY.md:73-74] |
 | The GB10's IORT stream ID and stream table entry are not decoded by this project | [SOURCE docs/GB10_PLATFORM_TOPOLOGY.md:76-78,165] |
-| Resolved in cut B5: GB10 = StreamID 0x100 on the IORT's second SMMUv3 node (base 0x13000000); the kernel today drives only the first (0x13800000) | [SOURCE docs/GB10_IORT_DECODE.md] |
-| Which SMMU node the GB10's IORT mapping points at (the kernel drives only the IORT's first SMMUv3 node) | [UNKNOWN] |
-| Whether the GB10's stream ID is below the 4096 stream IDs the aienos stream table covers (`STE_N`) | [UNKNOWN] |
-| Number of SMMUs on the machine, beyond "an Arm SMMUv3" | [UNKNOWN] (platform USB nodes may sit behind a second one; see `CK_SMMU_OTHER`, native/kernel/include/ck.h:99-100) |
+| Resolved in cut B5: GB10 = StreamID 0x100 on the IORT's second SMMUv3 node (base 0x13000000). Cut B7a (QEMU/host only): the kernel routes a requester to its own SMMUv3 node and brings that node up on first use, mapping the RMR ranges beside the window; running this on SMMUv3 B is cut B7b (machine window) | [SOURCE docs/GB10_IORT_DECODE.md sections 4, 9] |
+| Stream 0x100 fits both the linear table (`STE_N` 4096) and the two-level table | [SOURCE native/kernel/core/smmu_svc.c] |
+| Three SMMUv3 nodes in the IORT (A 0x13800000 PCI segments 0..14 + USB, B 0x13000000 segment 15 + HDA0, C platform peripherals) | [SOURCE docs/GB10_IORT_DECODE.md section 3] |
 
 Note: the kernel's lookup is `ck_iort_stream_id(segment, rid)`. For the GB10 the
 inputs would be segment 15 and rid 0x0100 (bus 1, device 0, function 0).
diff --git a/docs/GB10_IORT_DECODE.md b/docs/GB10_IORT_DECODE.md
index a851cdb2..66a9a594 100644
--- a/docs/GB10_IORT_DECODE.md
+++ b/docs/GB10_IORT_DECODE.md
@@ -103,14 +103,14 @@ regions for group 20. [SOURCE linux iort.c:361; sysfs above]
 
 | Fact | Where in the kernel | Consequence |
 |---|---|---|
-| Parser keeps only the first SMMUv3 node (`pass == 0 && type == IORT_NODE_SMMUV3 && !found`) | native/kernel/core/acpi.c:368-375 | SMMUv3 A is the only SMMU aienos can bring up; SMMUv3 B (GB10) is never programmed |
+| Parser kept only the first SMMUv3 node (until cut B7a, section 9: now every node, `smmus[]`) | native/kernel/core/acpi.c | until B7a SMMUv3 A was the only SMMU aienos could bring up; B is now brought up by its first confined stream |
 | Root-complex mappings whose output is another SMMU are skipped (`rd32(e + 12) != s.node_off`) | native/kernel/core/acpi.c:386-387 | segment 15 has no mapping in `g.iort`; `ck_iort_stream_id(15, 0x100)` returns -1 |
-| `ck_dma_confine` then returns `CK_SMMU_NOSTREAM` | native/kernel/core/smmu_svc.c:142-143 | fail closed: a GB10 DMA window is refused today, never granted unconfined |
+| `ck_dma_confine` returned `CK_SMMU_NOSTREAM` (B5), `CK_SMMU_OTHER` (B6); since B7a it routes to SMMUv3 B | native/kernel/core/smmu_svc.c | fail closed throughout: never granted unconfined; a GB10 window now needs a caller (B7b) |
 | Only the named-component path knows the "other SMMU" case (`CK_SMMU_OTHER`) | native/kernel/core/smmu_svc.c:162-167; native/kernel/include/ck.h:116 | the PCI path reports NOSTREAM where OTHER is the truth; a report-only mismatch, not a safety hole |
 | Range test `rel > m->id_count` | native/kernel/core/acpi.c:430 | inclusive, agrees with Linux; no change needed |
 | `STE_N 4096` | native/kernel/core/smmu_svc.c:14 | StreamID 0x100 fits |
 | Window leaf is Normal Non-cacheable | native/kernel/core/smmu_svc.c:16-19 | same attribute the RMR demands (Normal NC), so the RMR ranges could be expressed as windows [INFERRED] |
-| One contiguous span per stream | native/kernel/core/smmu_svc.c:15-19 (B4 report section 1) | the three RMR ranges plus a ring/completion window need at least four spans for StreamID 0x100 [INFERRED] |
+| One window plus the stream's RMR ranges per stream (B7a) | native/kernel/core/smmu_svc.c `map_reserved` | the three RMR ranges are identity-mapped beside the window in one stage-1 table |
 
 Gaps a future cut would have to close before any GB10 DMA (design facts, not a plan):
 1. Bring up SMMUv3 B (base 0x13000000) in addition to or instead of A: own
@@ -144,3 +144,62 @@ on 0x13000000), `iort-mutants` with the new `CK_IORT_MUTANT_OTHER_BLIND`
 killed, and `ck_acpi_scan --iort` on the real table printing the segment 15
 mapping as not driven. The second SMMU is still not brought up; that is a
 later cut with its own approval.
+
+## 9. Cut B7a (done, QEMU/host only): several SMMUs, RMR honoured
+
+Approval: aienos#286 (comment of 2026-10-10). Hardware boot is cut B7b and
+needs a machine window; nothing here was run on the Spark's SMMUs.
+
+What changed:
+
+- `ck_iort_parse` keeps every SMMUv3 node in table order (`smmus[]`,
+  `nsmmus`, cap `CK_IORT_MAX_SMMUS`) and every RMR node (type 6) that maps
+  to one of them (`rmr[]`: SMMU index, inclusive stream range, flags, up to
+  `CK_IORT_MAX_RMR_RANGES` page-aligned non-empty ranges). A malformed RMR
+  node (zero or too many descriptors, descriptor array past the node,
+  unaligned or empty range) refuses the whole table, like every other
+  malformed node.
+- `ck_iort_route(segment, rid)` is the one routing lookup: the SMMU index,
+  base and node offset, the stream id, and the RMR nodes covering that
+  stream. `ck_iort_rmr_for(smmu_off, sid)` serves the named-component path.
+- `core/smmu_svc.c` holds one instance block per SMMUv3 node. The IORT is
+  parsed once per boot; an instance is brought up (own stream table, queues,
+  context descriptors, `GBPA.ABORT` first) the first time a stream behind it
+  is confined. `ck_dma_confine` routes through `ck_iort_route`;
+  `ck_dma_confine_named` finds the instance by the component's target node.
+  `CK_SMMU_OTHER` is now reported only for a node the parser did not keep
+  (beyond `CK_IORT_MAX_SMMUS`). `ck_dma_unconfine` looks through every live
+  instance (the same stream id confined on two SMMUs at once is ambiguous
+  and refused with `CK_SMMU_EARG`; stream ids are per SMMU, IHI0070H.a
+  "The StreamID namespace is per-SMMU."). `ck_dma_faults` drains every live
+  instance.
+- RMR: when a confined stream is covered by an RMR node, its ranges are
+  identity-mapped in the same stage-1 table as the DMA window, Normal
+  Non-cacheable, and the confine log says how many. Attributes 4 (Normal NC)
+  and 5 (Normal IWB-OWB) are honoured, both as Normal NC like the window; any
+  other attribute refuses the confinement (`CK_SMMU_FAILED`, fail closed).
+  A stream the RMR names that nobody confines stays aborted. The page-table
+  mapper uses 1 GiB and 2 MiB blocks, so the Spark's 2 GiB range costs two
+  level-1 entries, not a page table per 4 KiB.
+
+Behaviour on the Spark that this cut does NOT change: USB0..USB5 and
+UBF0..UBF3 (the xHCI path) sit on SMMUv3 A (section 3), so the keyboard and
+recovery flows still touch only the first SMMU. SMMUv3 B is brought up only
+when a caller confines a segment 15 requester (the GB10) or HDA0; no such
+caller exists yet (that is cut B7b, with its own approval and a machine
+window).
+
+Checks (host, QEMU): `test_smmu` Spark-shape case with the RMR node
+(`route(15, 0x100)` -> instance 1, base 0x13000000, stream 0x100, one RMR
+with three ranges; `0x101` has none; `route(4, 0x100)` -> instance 0 stream
+0x50100; malformed RMR nodes refused), `iort-mutants` with three new killed
+mutants (`CK_IORT_MUTANT_RMR_BLIND`: RMR nodes ignored;
+`CK_IORT_MUTANT_RMR_EXCLUSIVE`: stream range read as exclusive, dropping
+stream 0x100; `CK_IORT_MUTANT_ROUTE_FIRST`: every requester routed to the
+first SMMU), sanitizer build, the freestanding build, the QEMU gates (one
+SMMU on QEMU virt: behaviour unchanged), and `ck_acpi_scan --iort` on the
+real table printing the three instances, the segment 15 route to instance 1
+and the RMR node.
+
+Still unknown after this cut: everything in section 7, plus whether SMMUv3 B
+comes up with this driver's geometry (IDR0/IDR1 read only at B7b).
diff --git a/native/.crumb b/native/.crumb
index 729b7eeb..2facbb22 100644
--- a/native/.crumb
+++ b/native/.crumb
@@ -79,8 +79,8 @@
           "purpose": "Directory native/disk. Purpose not yet described by a human."
         },
         {
-          "digest": "2921a914fc906e8535222b97e684ad38763a1fe70957337e58f5aa83b35ca555",
-          "last_commit": "f759310",
+          "digest": "efbe476665c1f3d9c13abb2aa1745d0c1e9e6815b64a7e310010ce5f359afe0f",
+          "last_commit": "ed308de",
           "name": "kernel",
           "purpose": "Directory native/kernel. Purpose not yet described by a human."
         },
@@ -109,15 +109,15 @@
           "purpose": "Directory native/store. Purpose not yet described by a human."
         }
       ],
-      "children_root": "sha256:22b977bfd6db6545e512a083b0fb6c9c644b7a04c84d1a1c3de2389f49b60bc8",
-      "compiled_at": "2026-10-10T03:01:04Z",
+      "children_root": "sha256:11cfba659c10c0f8a1e95db0dc0935f780002a6689a1fb1c27b1f978d0828a8c",
+      "compiled_at": "2026-10-10T04:29:33Z",
       "compiler": "crumb-compile/1",
-      "digest": "sha256:14192734c76840815c344af42af21c84274265dcc374a3ce2bccb01113bc83a9",
+      "digest": "sha256:1dd726352055e65ac3c21d6f8c4e0c841a8c4912ba8384dfa8968fb7ce4d82fb",
       "evidence_files": 4,
       "evidence_root": "sha256:e410b845507e00568e15b51a5797af32a97e0e4b8ab4e8487bb7c98e7e0cf335",
       "files": 456,
-      "generated_at_commit": "f759310fc87760e56432e734db76c540c6e936ae",
-      "source_tree": "sha256:b6069184b55fd3b9c5a36e34b4255c05c6d52491a0c37209df04b14283550d5d"
+      "generated_at_commit": "ed308de52ede1d4c8a211d88e0e4a3ac5c92ec23",
+      "source_tree": "sha256:3bd830711ca4188336373bd4e130f53b14f6ba4a3f2f64336e1a448e01e97b3d"
     },
     "owner_lane": "",
     "provenance": {
diff --git a/native/kernel/.crumb b/native/kernel/.crumb
index 360beb65..5e68e34d 100644
--- a/native/kernel/.crumb
+++ b/native/kernel/.crumb
@@ -57,8 +57,8 @@
           "purpose": "Directory native/kernel/artifact. Purpose not yet described by a human."
         },
         {
-          "digest": "8d23109c0020750054a7d8fe88c08caea0f602ea4cd80d42df1eded1239cd1e4",
-          "last_commit": "f759310",
+          "digest": "a7b75170badd729f33774cf301d1cc72cc031719630b00ef079b2a2754b8172d",
+          "last_commit": "ed308de",
           "name": "core",
           "purpose": "Directory native/kernel/core. Purpose not yet described by a human."
         },
@@ -69,8 +69,8 @@
           "purpose": "Directory native/kernel/dev. Purpose not yet described by a human."
         },
         {
-          "digest": "8be1f15e7d5a46e33259c2e3300e8a73900b857cdf840137f4bbaa33474c5c14",
-          "last_commit": "f759310",
+          "digest": "2e52b5bd3addb2fff0ab5f761e1daf67befcc72291117a03534857fff229ae45",
+          "last_commit": "ed308de",
           "name": "include",
           "purpose": "Directory native/kernel/include. Purpose not yet described by a human."
         },
@@ -87,27 +87,27 @@
           "purpose": "Directory native/kernel/svc. Purpose not yet described by a human."
         },
         {
-          "digest": "bd7a628ec21fa55aba03262d870b561131e94872127ad7e05ea864f2e4cf41f8",
-          "last_commit": "f759310",
+          "digest": "7d63e0731c50350099774d048adcb20faa53e61648fb164ead40e7f7b3f3cd92",
+          "last_commit": "ed308de",
           "name": "tests",
           "purpose": "Directory native/kernel/tests. Purpose not yet described by a human."
         },
         {
-          "digest": "a1d0d3826f56fa39927cea4b9d0187774cebf0ce3472c8bcc0fb6c0ce791f572",
-          "last_commit": "f759310",
+          "digest": "118855445b6fc55bc5abbcfc5d684135abcb0e8092d43edde4bca881ae5213f7",
+          "last_commit": "ed308de",
           "name": "tools",
           "purpose": "Directory native/kernel/tools. Purpose not yet described by a human."
         }
       ],
-      "children_root": "sha256:f65291ec86dd22c897d67da90555dc6d851d5cfd6a98fcf48dab9ae612230ca3",
-      "compiled_at": "2026-10-10T03:01:04Z",
+      "children_root": "sha256:8a95e9f19c06a8c76c4e50447cd2b10b03b6807c2d3c5605de1d36b5519990c4",
+      "compiled_at": "2026-10-10T04:29:33Z",
       "compiler": "crumb-compile/1",
-      "digest": "sha256:2921a914fc906e8535222b97e684ad38763a1fe70957337e58f5aa83b35ca555",
+      "digest": "sha256:efbe476665c1f3d9c13abb2aa1745d0c1e9e6815b64a7e310010ce5f359afe0f",
       "evidence_files": 0,
       "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
       "files": 292,
-      "generated_at_commit": "f759310fc87760e56432e734db76c540c6e936ae",
-      "source_tree": "sha256:8b96c3b614798fa1d9248e06cbc212ae767a700c199f7b091115c769e5b6135f"
+      "generated_at_commit": "ed308de52ede1d4c8a211d88e0e4a3ac5c92ec23",
+      "source_tree": "sha256:82b6db3163b0d9935bb22bceca95a69318f02829700043cfce5093b9ddae330b"
     },
     "owner_lane": "",
     "provenance": {
diff --git a/native/kernel/Makefile b/native/kernel/Makefile
index 2ae18b32..e5a4cbab 100644
--- a/native/kernel/Makefile
+++ b/native/kernel/Makefile
@@ -871,9 +871,14 @@ acpi-dev-mutant: $(KDIR)/tests/test_acpi_dev.c $(HOST_SRCS) $(KDIR)/tests/ck_tes
 # refused; SEGMENT_BLIND: lookup ignores the PCI segment; OVERLAP_OK:
 # overlapping input ranges in one segment accepted; OTHER_BLIND: mappings to
 # a second SMMUv3 node forgotten, so a GB10-shaped requester reads as "no
-# stream" instead of "behind another SMMU"). Host only (acpi.c refuses them
+# stream" instead of "behind another SMMU"; RMR_BLIND: RMR nodes ignored, so
+# the GB10 stream would lose its firmware-reserved ranges; RMR_EXCLUSIVE:
+# the RMR stream range read as exclusive, dropping the last stream (the
+# GB10, 0x100); ROUTE_FIRST: every requester routed to the first SMMU, so the
+# GB10 would be programmed on the wrong SMMU). Host only (acpi.c refuses them
 # freestanding and with CK_HARDWARE_STAGING).
-IORT_MUTANTS := CK_IORT_MUTANT_TRUNCATE CK_IORT_MUTANT_SEGMENT_BLIND CK_IORT_MUTANT_OVERLAP_OK CK_IORT_MUTANT_OTHER_BLIND
+IORT_MUTANTS := CK_IORT_MUTANT_TRUNCATE CK_IORT_MUTANT_SEGMENT_BLIND CK_IORT_MUTANT_OVERLAP_OK CK_IORT_MUTANT_OTHER_BLIND \
+                CK_IORT_MUTANT_RMR_BLIND CK_IORT_MUTANT_RMR_EXCLUSIVE CK_IORT_MUTANT_ROUTE_FIRST
 iort-mutants: $(OUT)/host/test_smmu
 	@mkdir -p $(OUT)/host-mut; fail=0; \
 	$(OUT)/host/test_smmu > $(OUT)/host-mut/iort-base.log 2>&1 || { echo "unmutated test_smmu fails"; fail=1; }; \
diff --git a/native/kernel/core/.crumb b/native/kernel/core/.crumb
index 7b04a4a1..f13cde7f 100644
--- a/native/kernel/core/.crumb
+++ b/native/kernel/core/.crumb
@@ -7,14 +7,14 @@
     "generated": {
       "children": [],
       "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
-      "compiled_at": "2026-10-10T03:01:04Z",
+      "compiled_at": "2026-10-10T04:29:33Z",
       "compiler": "crumb-compile/1",
-      "digest": "sha256:8d23109c0020750054a7d8fe88c08caea0f602ea4cd80d42df1eded1239cd1e4",
+      "digest": "sha256:a7b75170badd729f33774cf301d1cc72cc031719630b00ef079b2a2754b8172d",
       "evidence_files": 0,
       "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
       "files": 39,
-      "generated_at_commit": "f759310fc87760e56432e734db76c540c6e936ae",
-      "source_tree": "sha256:1a91ae0dcaa6205fbb096691cb5808b5f1415580966d65b5c5337f72607df938"
+      "generated_at_commit": "ed308de52ede1d4c8a211d88e0e4a3ac5c92ec23",
+      "source_tree": "sha256:d315325bddf9d40544bb3f04f5c5db8057ee5e04f186976781f965f47098ef4e"
     },
     "owner_lane": "",
     "provenance": {
diff --git a/native/kernel/core/acpi.c b/native/kernel/core/acpi.c
index e3a46ce4..9b3f3e68 100644
--- a/native/kernel/core/acpi.c
+++ b/native/kernel/core/acpi.c
@@ -315,7 +315,8 @@ int ck_acpi_spans(uint64_t rsdp, void (*fn)(uint64_t lo, uint64_t hi, void *ctx)
 /* TEST-only IORT mutants (make iort-mutants): each must make test_smmu
  * FAIL. Host builds only; never part of an image. */
 #if defined(CK_IORT_MUTANT_TRUNCATE) || defined(CK_IORT_MUTANT_SEGMENT_BLIND) || defined(CK_IORT_MUTANT_OVERLAP_OK) || \
-    defined(CK_IORT_MUTANT_OTHER_BLIND)
+    defined(CK_IORT_MUTANT_OTHER_BLIND) || defined(CK_IORT_MUTANT_RMR_BLIND) || \
+    defined(CK_IORT_MUTANT_RMR_EXCLUSIVE) || defined(CK_IORT_MUTANT_ROUTE_FIRST)
 #if !__STDC_HOSTED__
 #error "CK_IORT_MUTANT_* are host test mutants only"
 #endif
@@ -329,6 +330,9 @@ int ck_acpi_spans(uint64_t rsdp, void (*fn)(uint64_t lo, uint64_t hi, void *ctx)
 #define IORT_NODE_HDR 16u
 #define IORT_NODE_ROOT_COMPLEX 2u
 #define IORT_NODE_SMMUV3 4u
+#define IORT_NODE_RMR 6u
+#define IORT_RMR_HDR 28u        /* node header + flags, rmr_count, rmr_offset */
+#define IORT_RMR_DESC_BYTES 20u /* base u64, length u64, reserved u32 */
 #define IORT_MAP_BYTES 20u
 #define IORT_TABLE_HDR 48u /* SDT header + node count, node array offset, reserved */
 #define IORT_RC_SEGMENT 28u /* root complex node: pci_segment_number */
@@ -350,11 +354,10 @@ int ck_iort_parse(const void *iort, struct ck_iort_smmu *out)
     if (iort_nodes(t, len, &count, &at))
         return -1;
     int found = 0;
-    /* Every SMMUv3 node seen in pass 0 (offset, base); the first one is
-     * the SMMU this kernel drives, the rest only name what refuses a
-     * requester mapped to them (ck_iort_other_stream). */
-    struct { uint32_t off; uint64_t base; } smmus[CK_IORT_MAX_SMMUS];
-    uint32_t nsmmus = 0;
+    /* Every SMMUv3 node seen in pass 0 goes to s.smmus (table order); the
+     * first one is `base`/`node_off`, the ones root complexes map to
+     * besides it are named by ck_iort_other_stream, and ck_iort_route
+     * resolves a requester to any of them (cut B7a). */
     for (int pass = 0; pass < 2; pass++) {
         uint32_t off = at;
         for (uint32_t i = 0; i < count; i++) {
@@ -377,17 +380,69 @@ int ck_iort_parse(const void *iort, struct ck_iort_smmu *out)
                 uint64_t base = rd64(n + 16);
                 if (!base)
                     return -1;
-                if (nsmmus >= CK_IORT_MAX_SMMUS)
+                if (s.nsmmus >= CK_IORT_MAX_SMMUS)
                     return -1;
-                smmus[nsmmus].off = off;
-                smmus[nsmmus].base = base;
-                nsmmus++;
+                s.smmus[s.nsmmus].off = off;
+                s.smmus[s.nsmmus].base = base;
+                s.nsmmus++;
                 if (!found) {
                     s.base = base;
                     s.node_off = off;
                     found = 1;
                 }
             }
+            if (pass == 1 && type == IORT_NODE_RMR) {
+#ifndef CK_IORT_MUTANT_RMR_BLIND
+                /* RMR node (ACPICA actbl2.h acpi_iort_rmr): flags @16,
+                 * rmr_count @20, rmr_offset @24 (from the node start);
+                 * acpi_iort_rmr_desc 20 bytes: base_address u64, length
+                 * u64, reserved u32. One entry per ID mapping that targets
+                 * an SMMUv3 node; its output range is the StreamID range
+                 * (Linux iort.c iort_rmr_alloc_sids reads output_base and
+                 * id_count the same way). Ranges must be page aligned and
+                 * non-empty: the kernel maps them identity. */
+                if (nlen < IORT_RMR_HDR)
+                    return -1;
+                uint32_t flags = rd32(n + 16), rcount = rd32(n + 20), roff = rd32(n + 24);
+                if (!rcount || rcount > CK_IORT_MAX_RMR_RANGES || roff < IORT_RMR_HDR || roff > nlen ||
+                    (uint64_t)rcount * IORT_RMR_DESC_BYTES > (uint64_t)(nlen - roff))
+                    return -1;
+                struct ck_iort_rmr r = { 0 };
+                r.node_off = off;
+                r.flags = flags;
+                r.nranges = rcount;
+                for (uint32_t d = 0; d < rcount; d++) {
+                    const uint8_t *e = n + roff + d * IORT_RMR_DESC_BYTES;
+                    uint64_t b = rd64(e), l = rd64(e + 8);
+                    if (!l || (b & 0xfffu) || (l & 0xfffu) || b + l < b)
+                        return -1;
+                    r.range[d].base = b;
+                    r.range[d].len = l;
+                }
+                for (uint32_t m = 0; m < mcount; m++) {
+                    const uint8_t *e = n + moff + m * IORT_MAP_BYTES;
+                    uint32_t ref = rd32(e + 12), k;
+                    for (k = 0; k < s.nsmmus; k++)
+                        if (s.smmus[k].off == ref)
+                            break;
+                    if (k == s.nsmmus)
+                        continue; /* a mapping to a non-SMMU node is not a stream range */
+                    if (s.nrmr >= CK_IORT_MAX_RMR)
+                        return -1;
+                    uint32_t ob = rd32(e + 8), cnt = rd32(e + 4);
+                    if (ob + cnt < ob)
+                        return -1;
+                    r.smmu_index = k;
+                    r.sid_lo = ob;
+#ifndef CK_IORT_MUTANT_RMR_EXCLUSIVE
+                    r.sid_hi = ob + cnt; /* id_count = number of IDs - 1: inclusive */
+#else
+                    r.sid_hi = cnt ? ob + cnt - 1u : ob; /* TEST mutant: id_count read as a count */
+#endif
+                    s.rmr[s.nrmr++] = r;
+                }
+#endif
+            }
             if (pass == 1 && type == IORT_NODE_ROOT_COMPLEX) {
                 /* Root complex node: PCI segment number at +28 (ACPICA
                  * actbl2.h acpi_iort_root_complex: memory_properties u64
@@ -404,8 +459,8 @@ int ck_iort_parse(const void *iort, struct ck_iort_smmu *out)
                          * the requester is reported as behind that SMMU.
                          * A mapping to anything else (an ITS group) is not
                          * a stream at all. */
-                        for (uint32_t k = 0; k < nsmmus; k++) {
-                            if (smmus[k].off != ref)
+                        for (uint32_t k = 0; k < s.nsmmus; k++) {
+                            if (s.smmus[k].off != ref)
                                 continue;
                             if (s.nother >= CK_IORT_MAX_OTHER)
                                 return -1;
@@ -414,12 +469,12 @@ int ck_iort_parse(const void *iort, struct ck_iort_smmu *out)
                             o->map.input_base = rd32(e);
                             o->map.id_count = rd32(e + 4);
                             o->map.output_base = rd32(e + 8);
-                            o->smmu_base = smmus[k].base;
-                            o->smmu_off = smmus[k].off;
+                            o->smmu_base = s.smmus[k].base;
+                            o->smmu_off = s.smmus[k].off;
                             break;
                         }
 #else
-                        (void)smmus; (void)nsmmus; /* TEST mutant: other SMMUs forgotten */
+                        (void)0; /* TEST mutant: other SMMUs forgotten */
 #endif
                         continue;
                     }
@@ -490,6 +545,61 @@ int ck_iort_other_stream(const struct ck_iort_smmu *s, uint32_t segment, uint32_
     return -1;
 }
 
+uint32_t ck_iort_rmr_for(const struct ck_iort_smmu *s, uint32_t smmu_off, uint32_t sid, struct ck_iort_route *out)
+{
+    out->nrmr = 0;
+    for (uint32_t i = 0; i < s->nrmr; i++) {
+        const struct ck_iort_rmr *r = &s->rmr[i];
+        if (r->smmu_index >= s->nsmmus || s->smmus[r->smmu_index].off != smmu_off)
+            continue;
+        if (sid < r->sid_lo || sid > r->sid_hi)
+            continue;
+        if (out->nrmr < CK_IORT_MAX_RMR)
+            out->rmr[out->nrmr++] = r;
+    }
+    return out->nrmr;
+}
+
+int ck_iort_route(const struct ck_iort_smmu *s, uint32_t segment, uint32_t rid, struct ck_iort_route *out)
+{
+    struct ck_iort_route r = { 0 };
+    if (ck_iort_stream_id(s, segment, rid, &r.sid) == 0) {
+        r.smmu_index = 0;
+        r.smmu_base = s->base;
+        r.smmu_off = s->node_off;
+    } else {
+        const struct ck_iort_other *hit = 0;
+        for (uint32_t i = 0; i < s->nother && !hit; i++) {
+            const struct ck_iort_map *m = &s->other[i].map;
+            if (m->segment != segment || rid < m->input_base)
+                continue;
+            uint32_t rel = rid - m->input_base;
+            if (rel > m->id_count || m->output_base + rel < m->output_base)
+                continue;
+            hit = &s->other[i];
+            r.sid = m->output_base + rel;
+        }
+        if (!hit)
+            return -1;
+        uint32_t k;
+        for (k = 0; k < s->nsmmus; k++)
+            if (s->smmus[k].off == hit->smmu_off)
+                break;
+        if (k == s->nsmmus)
+            return -1; /* not reachable after a successful parse */
+#ifndef CK_IORT_MUTANT_ROUTE_FIRST
+        r.smmu_index = k;
+#else
+        r.smmu_index = 0; /* TEST mutant: every requester routed to the first SMMU */
+#endif
+        r.smmu_base = s->smmus[r.smmu_index].base;
+        r.smmu_off = s->smmus[r.smmu_index].off;
+    }
+    (void)ck_iort_rmr_for(s, r.smmu_off, r.sid, &r);
+    *out = r;
+    return 0;
+}
+
 /* ---- IORT named components (platform devices such as the DGX Spark USB
  * controllers, ACPI ids NVDA8000/NVDA8001) ---- */
 #define IORT_NODE_NAMED 1u
diff --git a/native/kernel/core/acpi.h b/native/kernel/core/acpi.h
index 007c6f6e..af8a372b 100644
--- a/native/kernel/core/acpi.h
+++ b/native/kernel/core/acpi.h
@@ -113,13 +113,55 @@ struct ck_iort_other {
     uint64_t smmu_base; /* register base of the SMMUv3 node the mapping targets */
     uint32_t smmu_off;  /* offset of that node in the table */
 };
+/* Every SMMUv3 node of the table in table order (aienos#286 cut B7a): index
+ * 0 is the first node (`base`, `node_off` above repeat it); the kernel may
+ * bring up any of them (core/smmu_svc.c keeps one instance per entry). */
+struct ck_iort_node {
+    uint64_t base;
+    uint32_t off;
+};
+/* IORT RMR node (type 6, reserved memory ranges; ACPICA actbl2.h
+ * acpi_iort_rmr: flags u32 @16, rmr_count u32 @20, rmr_offset u32 @24;
+ * acpi_iort_rmr_desc: base_address u64, length u64, reserved u32, 20 bytes
+ * each). One entry per ID mapping of the node: the mapping names the SMMUv3
+ * and the inclusive StreamID range (output_base .. output_base + id_count,
+ * as Linux iort.c iort_rmr_alloc_sids reads it) whose transactions the
+ * firmware expects to reach these ranges untranslated. flags: bit 0 remap
+ * permitted, bit 1 privileged, bits [9:2] access attributes (ACPICA
+ * ACPI_IORT_RMR_ATTR_*: 4 = Normal Non-cacheable, 5 = Normal IWB-OWB, 0..3
+ * Device). On the DGX Spark (MEASURED 2026-10-10, docs/GB10_IORT_DECODE.md)
+ * one RMR node, flags 0x10 (Normal NC, remap not permitted), streams
+ * 0x0..=0x100 of the second SMMUv3 (0x13000000), three ranges:
+ * 0x280000000+2 GiB, 0x300000000+48 MiB, 0xa1600000+386 MiB. */
+#define CK_IORT_MAX_RMR 4        /* RMR (node, mapping) pairs remembered (Spark: 1) */
+#define CK_IORT_MAX_RMR_RANGES 4 /* ranges per RMR node (Spark: 3) */
+#define CK_IORT_RMR_REMAP_PERMITTED 1u
+#define CK_IORT_RMR_PRIVILEGED 2u
+#define CK_IORT_RMR_ATTR(flags) (((flags) >> 2) & 0xffu)
+#define CK_IORT_RMR_ATTR_NORMAL_NC 4u
+#define CK_IORT_RMR_ATTR_NORMAL_IWB_OWB 5u
+struct ck_iort_rmr_range {
+    uint64_t base, len;
+};
+struct ck_iort_rmr {
+    uint32_t node_off;        /* the RMR node */
+    uint32_t smmu_index;      /* index into ck_iort_smmu.smmus */
+    uint32_t sid_lo, sid_hi;  /* inclusive StreamID range on that SMMU */
+    uint32_t flags;
+    uint32_t nranges;
+    struct ck_iort_rmr_range range[CK_IORT_MAX_RMR_RANGES];
+};
 struct ck_iort_smmu {
-    uint64_t base;      /* SMMUv3 register base */
-    uint32_t node_off;  /* offset of the SMMUv3 node in the table */
+    uint64_t base;      /* SMMUv3 register base (= smmus[0].base) */
+    uint32_t node_off;  /* offset of the SMMUv3 node in the table (= smmus[0].off) */
     uint32_t nmaps;
     struct ck_iort_map map[CK_IORT_MAX_MAPS];
     uint32_t nother;
     struct ck_iort_other other[CK_IORT_MAX_OTHER];
+    uint32_t nsmmus;
+    struct ck_iort_node smmus[CK_IORT_MAX_SMMUS];
+    uint32_t nrmr;
+    struct ck_iort_rmr rmr[CK_IORT_MAX_RMR];
 };
 /* 1 found, 0 no SMMUv3 node, -1 malformed (bad signature, truncation, a
  * node or mapping array outside the table, base 0, a root complex node
@@ -141,6 +183,25 @@ int ck_iort_stream_id(const struct ck_iort_smmu *s, uint32_t segment, uint32_t r
  * window; it only names what refuses the requester. */
 int ck_iort_other_stream(const struct ck_iort_smmu *s, uint32_t segment, uint32_t rid, uint32_t *sid,
                          uint64_t *smmu_base);
+/* Route for PCI requester (segment, rid) (aienos#286 cut B7a): which SMMUv3
+ * node (index into s->smmus, base, offset) and StreamID it reaches, through
+ * the first-node mappings or the other-SMMU mappings, plus every RMR entry
+ * that covers that stream on that SMMU (pointers into s). 0 found, -1 no
+ * mapping covers the requester. Pure: reads the parse only. */
+struct ck_iort_route {
+    uint32_t smmu_index;
+    uint64_t smmu_base;
+    uint32_t smmu_off;
+    uint32_t sid;
+    uint32_t nrmr;
+    const struct ck_iort_rmr *rmr[CK_IORT_MAX_RMR];
+};
+int ck_iort_route(const struct ck_iort_smmu *s, uint32_t segment, uint32_t rid, struct ck_iort_route *out);
+/* RMR entries covering stream `sid` of the SMMUv3 node at table offset
+ * `smmu_off` (used for named components, whose target the IORT names by
+ * node). Fills out->rmr/nrmr only (and smmu_index when the node is known);
+ * returns that count. */
+uint32_t ck_iort_rmr_for(const struct ck_iort_smmu *s, uint32_t smmu_off, uint32_t sid, struct ck_iort_route *out);
 
 /* IORT named component (node type 1) whose device object name has the same
  * final segment as `name` ("USB0" matches "\\_SB_.USB0"). out gets the node
diff --git a/native/kernel/core/smmu_svc.c b/native/kernel/core/smmu_svc.c
index 516d1d91..ff5fc9ad 100644
--- a/native/kernel/core/smmu_svc.c
+++ b/native/kernel/core/smmu_svc.c
@@ -2,11 +2,28 @@
  * friends) over core/smmu.c, the IORT parser and the DMA pool. Kernel only
  * (the host tests drive core/smmu.c directly against a model SMMU).
  *
- * Memory: stream table (two-level when the SMMU supports it: an L1 table of
- * at most 128 KiB plus one 4 KiB L2 page per granted span; else linear, 4096
- * STEs, 256 KiB), command and event queues, the
- * context descriptors and every stage-1 table come from ck_dma_alloc, which
- * is Normal Non-cacheable, so a dsb orders them before register writes. */
+ * One instance block per SMMUv3 node the IORT lists (cut B7a, aienos#286):
+ * a requester is routed to the node its root complex or named component
+ * maps it to (ck_iort_route / ck_iort_named), and that node is brought up
+ * the first time a stream behind it is confined. The DGX Spark lists three
+ * (docs/GB10_IORT_DECODE.md): A at 0x13800000 (PCI segments 0..14, the
+ * USB controllers), B at 0x13000000 (segment 15: the GB10, stream 0x100,
+ * and HDA0), C for the small platform peripherals. QEMU virt lists one.
+ *
+ * Firmware-reserved ranges (IORT RMR nodes): a stream the RMR names gets
+ * its ranges identity-mapped in the same stage-1 table as its DMA window,
+ * so the device keeps reaching what the firmware set up for it while
+ * everything else still faults and aborts. Only Normal memory attributes
+ * (Non-cacheable, or Inner/Outer Write-back, both mapped Normal
+ * Non-cacheable like the window) are honoured; any other attribute refuses
+ * the confinement (fail closed). A stream the RMR names but nobody confines
+ * stays aborted like every other stream.
+ *
+ * Memory: per instance a stream table (two-level when the SMMU supports it:
+ * an L1 table of at most 128 KiB plus one 4 KiB L2 page per granted span;
+ * else linear, 4096 STEs, 256 KiB), command and event queues, the context
+ * descriptors and every stage-1 table come from ck_dma_alloc, which is
+ * Normal Non-cacheable, so a dsb orders them before register writes. */
 #include "ck_internal.h"
 #include "pt.h"
 #include "smmu.h"
@@ -18,37 +35,41 @@
  * (PCIe requests are usually unprivileged), never executable. */
 #define WINDOW_ATTRS (CK_PT_NORMAL_NC | (1ull << 6))
 
-static struct {
-    int state; /* 0 not tried, 1 up, CK_SMMU_ABSENT / CK_SMMU_FAILED */
+struct inst {
+    int state; /* 0 not tried, 1 up, CK_SMMU_FAILED */
+    uint32_t index; /* position in g.iort.smmus */
     uint64_t base;
-    struct ck_iort_smmu iort;
+    uint32_t node_off;
+    struct ck_smmu_regs regs; /* ctx = this instance */
     struct ck_smmu_tables t;
     uint64_t *cds; /* CK_DMA_MAX_STREAMS context descriptors, one page */
     uint32_t sid[CK_DMA_MAX_STREAMS];
     int used[CK_DMA_MAX_STREAMS];
+};
+
+static struct {
+    int state; /* IORT: 0 not read, 1 parsed, CK_SMMU_ABSENT / CK_SMMU_FAILED */
+    struct ck_iort_smmu iort;
+    struct inst inst[CK_IORT_MAX_SMMUS];
 } g;
 
 static uint32_t r_rd32(void *ctx, uint32_t off)
 {
-    (void)ctx;
-    return *(volatile uint32_t *)(uintptr_t)(g.base + off);
+    return *(volatile uint32_t *)(uintptr_t)(((struct inst *)ctx)->base + off);
 }
 static void r_wr32(void *ctx, uint32_t off, uint32_t v)
 {
-    (void)ctx;
-    *(volatile uint32_t *)(uintptr_t)(g.base + off) = v;
+    *(volatile uint32_t *)(uintptr_t)(((struct inst *)ctx)->base + off) = v;
 }
 static void r_wr64(void *ctx, uint32_t off, uint64_t v)
 {
-    (void)ctx;
-    *(volatile uint64_t *)(uintptr_t)(g.base + off) = v;
+    *(volatile uint64_t *)(uintptr_t)(((struct inst *)ctx)->base + off) = v;
 }
 static void r_bar(void *ctx)
 {
     (void)ctx;
     ck_mb();
 }
-static const struct ck_smmu_regs regs = { 0, r_rd32, r_wr32, r_wr64, r_bar };
 
 static int pt_alloc(void *ctx, uint64_t *phys)
 {
@@ -69,29 +90,31 @@ static int l2_alloc(void *ctx, uint64_t **page)
  * StreamID bits, so the DGX Spark's PCI streams (up to 0xfffff, MEASURED
  * from its IORT) fit; L2 spans are allocated per grant. Otherwise the
  * linear table of STE_N entries. 0 ok, -1 allocation failed. */
-static int alloc_strtab(void)
+static int alloc_strtab(struct inst *in)
 {
     uint64_t p;
-    uint32_t idr0 = r_rd32(0, CK_SMMU_IDR0), sidsize = r_rd32(0, CK_SMMU_IDR1) & CK_SMMU_IDR1_SIDSIZE_MASK;
+    uint32_t idr0 = r_rd32(in, CK_SMMU_IDR0), sidsize = r_rd32(in, CK_SMMU_IDR1) & CK_SMMU_IDR1_SIDSIZE_MASK;
     if (((idr0 >> CK_SMMU_IDR0_ST_LEVEL_SHIFT) & CK_SMMU_IDR0_ST_LEVEL_MASK) == 1u && sidsize >= CK_SMMU_L2_MIN_BITS) {
         uint32_t bits = sidsize < CK_SMMU_L2_MAX_BITS ? sidsize : CK_SMMU_L2_MAX_BITS;
         uint32_t l1_bytes = (1u << (bits - CK_SMMU_SPLIT)) * 8u;
         if (l1_bytes < 64u)
             l1_bytes = 64u;
-        g.t.sid_bits = bits;
-        g.t.l2_alloc = l2_alloc;
-        g.t.l1 = ck_dma_alloc(l1_bytes, l1_bytes, &p);
+        in->t.sid_bits = bits;
+        in->t.l2_alloc = l2_alloc;
+        in->t.l1 = ck_dma_alloc(l1_bytes, l1_bytes, &p);
         ck_printf("smmu: stream table 2-level log2size=%u split=%u (spans allocated per grant)\n", bits,
                   CK_SMMU_SPLIT);
-        return g.t.l1 ? 0 : -1;
+        return in->t.l1 ? 0 : -1;
     }
-    g.t.ste_n = STE_N;
-    g.t.strtab = ck_dma_alloc(STE_N * CK_SMMU_STE_BYTES, STE_N * CK_SMMU_STE_BYTES, &p);
+    in->t.ste_n = STE_N;
+    in->t.strtab = ck_dma_alloc(STE_N * CK_SMMU_STE_BYTES, STE_N * CK_SMMU_STE_BYTES, &p);
     ck_printf("smmu: stream table linear entries=%u\n", STE_N);
-    return g.t.strtab ? 0 : -1;
+    return in->t.strtab ? 0 : -1;
 }
 
-static int bring_up(void)
+/* Read and parse the IORT once per boot. 0 parsed, else CK_SMMU_ABSENT /
+ * CK_SMMU_FAILED (fail closed). */
+static int parse_iort(void)
 {
     if (g.state)
         return g.state == 1 ? 0 : g.state;
@@ -102,65 +125,78 @@ static int bring_up(void)
     int rc = ck_iort_parse(iort, &g.iort);
     if (rc == 0)
         return g.state;
-    g.state = CK_SMMU_FAILED;
     if (rc < 0) {
+        g.state = CK_SMMU_FAILED;
         ck_printf("smmu: IORT malformed, SMMU unusable (fail closed)\n");
         return g.state;
     }
-    g.base = g.iort.base;
-    ck_mmio_map(g.base, CK_SMMU_MMIO_BYTES);
+    g.state = 1;
+    return 0;
+}
+
+/* Bring up the SMMUv3 node at g.iort.smmus[index] the first time it is
+ * needed. 0 up, else CK_SMMU_FAILED (fail closed). */
+static int bring_up(uint32_t index)
+{
+    struct inst *in = &g.inst[index];
+    if (in->state)
+        return in->state == 1 ? 0 : in->state;
+    in->state = CK_SMMU_FAILED;
+    in->index = index;
+    in->base = g.iort.smmus[index].base;
+    in->node_off = g.iort.smmus[index].off;
+    in->regs.ctx = in;
+    in->regs.rd32 = r_rd32;
+    in->regs.wr32 = r_wr32;
+    in->regs.wr64 = r_wr64;
+    in->regs.barrier = r_bar;
+    ck_mmio_map(in->base, CK_SMMU_MMIO_BYTES);
     uint64_t p;
-    int st = alloc_strtab(); /* first, as before: the largest aligned block */
-    g.t.cmd_n = QUEUE_N;
-    g.t.evt_n = QUEUE_N;
-    g.t.cmdq = ck_dma_alloc(4096, 4096, &p);
-    g.t.evtq = ck_dma_alloc(4096, 4096, &p);
-    g.cds = ck_dma_alloc(4096, 4096, &p);
-    if (st || !g.t.cmdq || !g.t.evtq || !g.cds) {
+    int st = alloc_strtab(in); /* first, as before: the largest aligned block */
+    in->t.cmd_n = QUEUE_N;
+    in->t.evt_n = QUEUE_N;
+    in->t.cmdq = ck_dma_alloc(4096, 4096, &p);
+    in->t.evtq = ck_dma_alloc(4096, 4096, &p);
+    in->cds = ck_dma_alloc(4096, 4096, &p);
+    if (st || !in->t.cmdq || !in->t.evtq || !in->cds) {
         ck_printf("smmu: table allocation failed (fail closed)\n");
-        return g.state;
+        return in->state;
     }
-    rc = ck_smmu_enable(&regs, &g.t, CK_SMMU_DEFAULT_SPINS);
+    int rc = ck_smmu_enable(&in->regs, &in->t, CK_SMMU_DEFAULT_SPINS);
     if (rc) {
-        ck_printf("smmu: bring-up failed rc=%d base=0x%llx (fail closed)\n", rc, (unsigned long long)g.base);
-        return g.state;
+        ck_printf("smmu: bring-up failed rc=%d base=0x%llx (fail closed)\n", rc, (unsigned long long)in->base);
+        return in->state;
     }
-    g.state = 1;
+    if (index)
+        ck_printf("smmu: instance %u up base=0x%llx\n", index, (unsigned long long)in->base);
+    in->state = 1;
     return 0;
 }
 
-static int confine_sid(uint32_t sid, uint64_t phys, uint64_t len, struct ck_dma_confinement *out);
+static int confine_sid(uint32_t index, uint32_t sid, uint64_t phys, uint64_t len, const struct ck_iort_route *rt,
+                       struct ck_dma_confinement *out);
 
 int ck_dma_confine(uint32_t segment, uint32_t rid, uint64_t phys, uint64_t len, struct ck_dma_confinement *out)
 {
     if (!len || (phys & 0xfffu) || (len & 0xfffu) || phys + len < phys)
         return CK_SMMU_EARG;
-    int rc = bring_up();
+    int rc = parse_iort();
     if (rc)
         return rc;
-    uint32_t sid;
-    if (ck_iort_stream_id(&g.iort, segment, rid, &sid)) {
-        /* Behind an SMMUv3 this kernel does not drive (Spark: the GB10,
-         * segment 15, on the IORT's second SMMUv3): refused as
-         * CK_SMMU_OTHER with that SMMU and stream named, len 0, exactly
-         * as the named-component path does. Never granted unconfined. */
-        uint64_t other_base;
-        if (ck_iort_other_stream(&g.iort, segment, rid, &sid, &other_base) == 0) {
-            out->smmu_base = other_base; /* reported, never used */
-            out->stream_id = sid;
-            out->iova = out->len = 0;
-            return CK_SMMU_OTHER;
-        }
+    struct ck_iort_route rt;
+    if (ck_iort_route(&g.iort, segment, rid, &rt))
         return CK_SMMU_NOSTREAM;
-    }
-    return confine_sid(sid, phys, len, out);
+    rc = bring_up(rt.smmu_index);
+    if (rc)
+        return rc;
+    return confine_sid(rt.smmu_index, rt.sid, phys, len, &rt, out);
 }
 
 int ck_dma_confine_named(const char *acpi_name, uint64_t phys, uint64_t len, struct ck_dma_confinement *out)
 {
     if (!acpi_name || !len || (phys & 0xfffu) || (len & 0xfffu) || phys + len < phys)
         return CK_SMMU_EARG;
-    int rc = bring_up();
+    int rc = parse_iort();
     if (rc)
         return rc;
     const void *iort = ck_acpi_find("IORT");
@@ -168,91 +204,164 @@ int ck_dma_confine_named(const char *acpi_name, uint64_t phys, uint64_t len, str
     int nrc = iort ? ck_iort_named(iort, acpi_name, &nc) : 0;
     if (nrc != 1 || !nc.target_off)
         return nrc == -2 ? CK_SMMU_EARG : CK_SMMU_NOSTREAM;
-    /* Only the SMMU this kernel drives (the IORT's first SMMUv3 node) can
-     * confine a stream; a stream behind another SMMU is refused, never
-     * granted unconfined. */
-    if (nc.target_off != g.iort.node_off) {
+    /* The SMMUv3 node the component maps to; one the parser did not keep
+     * (beyond CK_IORT_MAX_SMMUS) is refused, never granted unconfined. */
+    uint32_t index;
+    for (index = 0; index < g.iort.nsmmus; index++)
+        if (g.iort.smmus[index].off == nc.target_off)
+            break;
+    if (index == g.iort.nsmmus) {
         out->smmu_base = nc.target_base; /* reported, never used */
         out->stream_id = nc.stream_id;
         out->iova = out->len = 0;
         return CK_SMMU_OTHER;
     }
-    return confine_sid(nc.stream_id, phys, len, out);
+    rc = bring_up(index);
+    if (rc)
+        return rc;
+    struct ck_iort_route rt = { 0 };
+    (void)ck_iort_rmr_for(&g.iort, nc.target_off, nc.stream_id, &rt);
+    return confine_sid(index, nc.stream_id, phys, len, &rt, out);
 }
 
-/* Stage-1 window [phys, phys+len) for stream sid on the SMMU brought up. */
-static int confine_sid(uint32_t sid, uint64_t phys, uint64_t len, struct ck_dma_confinement *out)
+/* Identity-map every firmware-reserved range the IORT names for this
+ * stream into pt, Normal Non-cacheable. 0 ok (ranges mapped in *n), -1 an
+ * attribute this kernel does not honour or a range that collides with the
+ * window (fail closed). */
+static int map_reserved(struct ck_pt *pt, const struct ck_iort_route *rt, uint32_t sid, uint32_t *n)
 {
+    *n = 0;
+    for (uint32_t i = 0; i < rt->nrmr; i++) {
+        const struct ck_iort_rmr *r = rt->rmr[i];
+        uint32_t attr = CK_IORT_RMR_ATTR(r->flags);
+        if (attr != CK_IORT_RMR_ATTR_NORMAL_NC && attr != CK_IORT_RMR_ATTR_NORMAL_IWB_OWB) {
+            ck_printf("smmu: stream 0x%x reserved range attr %u unsupported (fail closed)\n", sid, attr);
+            return -1;
+        }
+        for (uint32_t k = 0; k < r->nranges; k++) {
+            if (ck_pt_map(pt, r->range[k].base, r->range[k].base, r->range[k].len, WINDOW_ATTRS)) {
+                ck_printf("smmu: stream 0x%x reserved range 0x%llx+0x%llx not mappable (fail closed)\n", sid,
+                          (unsigned long long)r->range[k].base, (unsigned long long)r->range[k].len);
+                return -1;
+            }
+            (*n)++;
+        }
+    }
+    return 0;
+}
+
+/* Stage-1 window [phys, phys+len) (plus the stream's reserved ranges) for
+ * stream sid on instance index, which is up. */
+static int confine_sid(uint32_t index, uint32_t sid, uint64_t phys, uint64_t len, const struct ck_iort_route *rt,
+                       struct ck_dma_confinement *out)
+{
+    struct inst *in = &g.inst[index];
     int rc;
-    if (!ck_smmu_sid_in_range(&g.t, sid))
+    if (!ck_smmu_sid_in_range(&in->t, sid))
         return CK_SMMU_NOSTREAM; /* beyond the stream table this SMMU runs */
     int slot = -1;
     for (int i = 0; i < CK_DMA_MAX_STREAMS; i++) {
-        if (g.used[i] && g.sid[i] == sid)
+        if (in->used[i] && in->sid[i] == sid)
             return CK_SMMU_EARG;
-        if (!g.used[i] && slot < 0)
+        if (!in->used[i] && slot < 0)
             slot = i;
     }
     if (slot < 0)
         return CK_SMMU_EARG;
     struct ck_pt pt;
-    if (ck_pt_init(&pt, pt_alloc, 0) || ck_pt_map(&pt, phys, phys, len, WINDOW_ATTRS))
+    uint32_t reserved;
+    if (ck_pt_init(&pt, pt_alloc, 0) || ck_pt_map(&pt, phys, phys, len, WINDOW_ATTRS) ||
+        map_reserved(&pt, rt, sid, &reserved))
         return CK_SMMU_FAILED;
-    uint64_t *cd = g.cds + (uint64_t)slot * 8u;
+    uint64_t *cd = in->cds + (uint64_t)slot * 8u;
     if (ck_smmu_cd_stage1(cd, pt.root, (uint16_t)(slot + 1), CK_MAIR_VALUE, 16))
         return CK_SMMU_FAILED;
     uint64_t ste[8];
     ck_smmu_ste_stage1(ste, (uint64_t)(uintptr_t)cd);
     ck_mb(); /* tables and CD written before the STE goes live */
-    rc = ck_smmu_install_ste(&regs, &g.t, sid, ste, CK_SMMU_DEFAULT_SPINS);
+    rc = ck_smmu_install_ste(&in->regs, &in->t, sid, ste, CK_SMMU_DEFAULT_SPINS);
     if (rc) {
-        (void)ck_smmu_abort_ste(&regs, &g.t, sid, CK_SMMU_DEFAULT_SPINS);
+        (void)ck_smmu_abort_ste(&in->regs, &in->t, sid, CK_SMMU_DEFAULT_SPINS);
         ck_printf("smmu: stream 0x%x install failed rc=%d (stream aborts)\n", sid, rc);
         return CK_SMMU_FAILED;
     }
-    g.used[slot] = 1;
-    g.sid[slot] = sid;
-    out->smmu_base = g.base;
+    if (reserved)
+        ck_printf("smmu: stream 0x%x on 0x%llx: %u firmware-reserved range(s) identity-mapped beside the window\n",
+                  sid, (unsigned long long)in->base, reserved);
+    in->used[slot] = 1;
+    in->sid[slot] = sid;
+    out->smmu_base = in->base;
     out->stream_id = sid;
     out->iova = phys;
     out->len = len;
     return 0;
 }
 
-int ck_dma_unconfine(uint32_t stream_id)
+/* The one live instance holding stream_id confined, or NULL. Two instances
+ * holding the same stream id (the namespace is per SMMU) is ambiguous:
+ * *ambiguous is set and NULL returned. */
+static struct inst *holder(uint32_t stream_id, int *slot, int *ambiguous)
 {
-    for (int i = 0; i < CK_DMA_MAX_STREAMS; i++) {
-        if (!g.used[i] || g.sid[i] != stream_id)
+    struct inst *found = 0;
+    *ambiguous = 0;
+    for (uint32_t k = 0; k < CK_IORT_MAX_SMMUS; k++) {
+        struct inst *in = &g.inst[k];
+        if (in->state != 1)
             continue;
-        if (ck_smmu_abort_ste(&regs, &g.t, stream_id, CK_SMMU_DEFAULT_SPINS))
-            return CK_SMMU_FAILED;
-        g.used[i] = 0;
-        return 0;
+        for (int i = 0; i < CK_DMA_MAX_STREAMS; i++) {
+            if (!in->used[i] || in->sid[i] != stream_id)
+                continue;
+            if (found) {
+                *ambiguous = 1;
+                return 0;
+            }
+            found = in;
+            *slot = i;
+        }
     }
-    return CK_SMMU_EARG;
+    return found;
+}
+
+int ck_dma_unconfine(uint32_t stream_id)
+{
+    int slot = 0, amb;
+    struct inst *in = holder(stream_id, &slot, &amb);
+    if (!in)
+        return CK_SMMU_EARG; /* not confined, or confined on two SMMUs */
+    if (ck_smmu_abort_ste(&in->regs, &in->t, stream_id, CK_SMMU_DEFAULT_SPINS))
+        return CK_SMMU_FAILED;
+    in->used[slot] = 0;
+    return 0;
 }
 
 int ck_dma_faults(uint32_t stream_id, struct ck_dma_fault *first)
 {
-    if (g.state != 1)
-        return -1;
-    int matched = 0, ovf = 0, n;
-    struct ck_smmu_event ev[4];
-    do {
-        int o = 0;
-        n = ck_smmu_read_events(&regs, &g.t, ev, 4, &o);
-        ovf |= o;
-        for (int i = 0; i < n; i++) {
-            if (ev[i].sid != stream_id)
-                continue;
-            if (!matched && first) {
-                first->type = ev[i].type;
-                first->stream_id = ev[i].sid;
-                first->addr = ev[i].addr;
+    int matched = 0, ovf = 0, any = 0;
+    for (uint32_t k = 0; k < CK_IORT_MAX_SMMUS; k++) {
+        struct inst *in = &g.inst[k];
+        if (in->state != 1)
+            continue;
+        any = 1;
+        int n;
+        struct ck_smmu_event ev[4];
+        do {
+            int o = 0;
+            n = ck_smmu_read_events(&in->regs, &in->t, ev, 4, &o);
+            ovf |= o;
+            for (int i = 0; i < n; i++) {
+                if (ev[i].sid != stream_id)
+                    continue;
+                if (!matched && first) {
+                    first->type = ev[i].type;
+                    first->stream_id = ev[i].sid;
+                    first->addr = ev[i].addr;
+                }
+                matched++;
             }
-            matched++;
-        }
-    } while (n == 4);
+        } while (n == 4);
+    }
+    if (!any)
+        return -1;
     if (first)
         first->overflow = ovf;
     return matched;
diff --git a/native/kernel/include/.crumb b/native/kernel/include/.crumb
index cf2619d3..483da3df 100644
--- a/native/kernel/include/.crumb
+++ b/native/kernel/include/.crumb
@@ -7,14 +7,14 @@
     "generated": {
       "children": [],
       "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
-      "compiled_at": "2026-10-10T03:01:04Z",
+      "compiled_at": "2026-10-10T04:29:33Z",
       "compiler": "crumb-compile/1",
-      "digest": "sha256:8be1f15e7d5a46e33259c2e3300e8a73900b857cdf840137f4bbaa33474c5c14",
+      "digest": "sha256:2e52b5bd3addb2fff0ab5f761e1daf67befcc72291117a03534857fff229ae45",
       "evidence_files": 0,
       "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
       "files": 1,
-      "generated_at_commit": "f759310fc87760e56432e734db76c540c6e936ae",
-      "source_tree": "sha256:42b0464a43072df25a15e267fb6ccc34dcf65afa6696eb97dc6ca350a1098f81"
+      "generated_at_commit": "ed308de52ede1d4c8a211d88e0e4a3ac5c92ec23",
+      "source_tree": "sha256:2128bf32de038e79e9edcc00174b47170014c8ad879f910f70c5ba3e19a0ed48"
     },
     "owner_lane": "",
     "provenance": {
diff --git a/native/kernel/include/ck.h b/native/kernel/include/ck.h
index d16396b2..d86e60d1 100644
--- a/native/kernel/include/ck.h
+++ b/native/kernel/include/ck.h
@@ -113,7 +113,7 @@ void ck_irq_cpu_enable(int on);
 #define CK_SMMU_FAILED (-2)
 #define CK_SMMU_NOSTREAM (-3)
 #define CK_SMMU_EARG (-4)
-#define CK_SMMU_OTHER (-5) /* the device's stream belongs to an SMMU this kernel does not drive */
+#define CK_SMMU_OTHER (-5) /* the stream belongs to an SMMUv3 node the IORT parser did not keep (beyond CK_IORT_MAX_SMMUS) */
 #define CK_DMA_MAX_STREAMS 8
 struct ck_dma_confinement {
     uint64_t smmu_base;
@@ -122,10 +122,12 @@ struct ck_dma_confinement {
 };
 /* `segment` is the PCI segment of the device and `rid` its requester id
  * (bus<<8 | dev<<3 | fn) inside that segment: the IORT resolves the stream
- * id within that segment's root complex only. Also CK_SMMU_OTHER when that
- * root complex maps the requester to an SMMUv3 other than the one this
- * kernel brings up (the IORT's first); *out then names that SMMU and the
- * stream, with len 0, for the report. Never grants unconfined. */
+ * id within that segment's root complex only, and names the SMMUv3 node
+ * it sits behind; that node is brought up on its first confined stream
+ * (cut B7a: several SMMUs, the Spark GB10 is stream 0x100 of the second).
+ * Firmware-reserved ranges the IORT (RMR) names for the stream are
+ * identity-mapped beside the window; an RMR attribute other than Normal
+ * memory refuses the confinement (CK_SMMU_FAILED). Never grants unconfined. */
 int ck_dma_confine(uint32_t segment, uint32_t rid, uint64_t phys, uint64_t len, struct ck_dma_confinement *out);
 /* Same window for an ACPI platform device (no PCI requester id), added for
  * the platform xHCI path (NEXT-PHASE-3 cut 2): the stream comes from the
@@ -133,9 +135,9 @@ int ck_dma_confine(uint32_t segment, uint32_t rid, uint64_t phys, uint64_t len,
  * acpi_name ("USB0" for "\\_SB_.USB0"), through its single mapping. Returns
  * as ck_dma_confine, plus CK_SMMU_NOSTREAM when no named component or no
  * stream mapping exists, CK_SMMU_EARG when two named components carry that
- * name, and CK_SMMU_OTHER when the stream belongs to an SMMUv3 other than
- * the one this kernel brings up (the IORT's first; *out then names that
- * SMMU and the stream, with len 0, for the report). Never grants unconfined. */
+ * name, and CK_SMMU_OTHER when the stream belongs to an SMMUv3 node the
+ * parser did not keep (*out then names that SMMU and the stream, with len
+ * 0, for the report). Never grants unconfined. */
 int ck_dma_confine_named(const char *acpi_name, uint64_t phys, uint64_t len, struct ck_dma_confinement *out);
 
 /* ACPI platform devices (core/acpi_platform.c, NEXT-PHASE-3 cut 2): a
@@ -161,11 +163,13 @@ struct ck_acpi_scan_info {
 int ck_acpi_platform_devices(const char *const *ids, unsigned nids, struct ck_platform_dev *out, unsigned max,
                              struct ck_acpi_scan_info *info);
 /* Return a confined stream to abort (after the device's bus mastering is
- * off). 0 ok, CK_SMMU_EARG if not confined, CK_SMMU_FAILED on a command
+ * off). 0 ok, CK_SMMU_EARG if not confined (or, stream ids being per SMMU,
+ * confined on two SMMUs at once: ambiguous), CK_SMMU_FAILED on a command
  * timeout. */
 int ck_dma_unconfine(uint32_t stream_id);
-/* Drain the SMMU event queue. Returns how many records named `stream_id`
- * (others are dropped); *first gets the first of them. -1 if no SMMU. */
+/* Drain the event queue of every SMMU brought up. Returns how many records
+ * named `stream_id` (others are dropped); *first gets the first of them.
+ * -1 if no SMMU is up. */
 #define CK_DMA_FAULT_TRANSLATION 0x10u /* SMMUv3 F_TRANSLATION event */
 struct ck_dma_fault {
     uint32_t type, stream_id;
diff --git a/native/kernel/tests/.crumb b/native/kernel/tests/.crumb
index 973cf4e9..78c97e86 100644
--- a/native/kernel/tests/.crumb
+++ b/native/kernel/tests/.crumb
@@ -7,14 +7,14 @@
     "generated": {
       "children": [],
       "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
-      "compiled_at": "2026-10-10T03:01:04Z",
+      "compiled_at": "2026-10-10T04:29:33Z",
       "compiler": "crumb-compile/1",
-      "digest": "sha256:bd7a628ec21fa55aba03262d870b561131e94872127ad7e05ea864f2e4cf41f8",
+      "digest": "sha256:7d63e0731c50350099774d048adcb20faa53e61648fb164ead40e7f7b3f3cd92",
       "evidence_files": 0,
       "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
       "files": 149,
-      "generated_at_commit": "f759310fc87760e56432e734db76c540c6e936ae",
-      "source_tree": "sha256:2f0d2318feac266813ecc6ba2e9f643207b666885291c9a542805441d9757d49"
+      "generated_at_commit": "ed308de52ede1d4c8a211d88e0e4a3ac5c92ec23",
+      "source_tree": "sha256:013cd0c0c95a0421fa4c01157ab0901ff0b64450aa40d22b5ae8a11b16d0a5c0"
     },
     "owner_lane": "",
     "provenance": {
diff --git a/native/kernel/tests/test_smmu.c b/native/kernel/tests/test_smmu.c
index 85d3650c..1ac65e60 100644
--- a/native/kernel/tests/test_smmu.c
+++ b/native/kernel/tests/test_smmu.c
@@ -422,6 +422,24 @@ static void iort_end(uint8_t *t, uint32_t at, uint32_t nodes)
     w32(t + 4, at);
     w32(t + 36, nodes);
 }
+/* RMR node (type 6) with `nr` ranges and one mapping covering streams
+ * [in, in + cnt] of node `ref`: flags @16, rmr_count @20, rmr_offset @24,
+ * mapping array @28, descriptors (20 bytes each) after it. */
+static uint32_t iort_rmr(uint8_t *t, uint32_t at, uint32_t flags, uint32_t in, uint32_t cnt, uint32_t ref,
+                         const uint64_t *ranges, uint32_t nr)
+{
+    uint32_t roff = 28 + 20, nlen = roff + 20 * nr;
+    t[at] = 6; w16(t + at + 1, (uint16_t)nlen);
+    w32(t + at + 8, 1); w32(t + at + 12, 28);
+    w32(t + at + 16, flags); w32(t + at + 20, nr); w32(t + at + 24, roff);
+    uint8_t *e = t + at + 28;
+    w32(e, in); w32(e + 4, cnt); w32(e + 8, in); w32(e + 12, ref);
+    for (uint32_t i = 0; i < nr; i++) {
+        w64(t + at + roff + 20 * i, ranges[2 * i]);
+        w64(t + at + roff + 20 * i + 8, ranges[2 * i + 1]);
+    }
+    return at + nlen;
+}
 
 static void test_iort_spark_shape(void)
 {
@@ -458,6 +476,57 @@ static void test_iort_spark_shape(void)
      * starts at stream 0x50000, so 0x50000 + 0x100 = 0x50100. */
     CHECK(ck_iort_stream_id(&s, 4, 0x100, &sid) == 0 && sid == 0x50100);
     CHECK(ck_iort_stream_id(&s, 0, 0x100, &sid) == 0 && sid == 0x10100);
+    /* Cut B7a: every SMMUv3 node is kept in table order and a requester is
+     * routed to the node it reaches. */
+    CHECK(s.nsmmus == 2 && s.smmus[0].off == a && s.smmus[0].base == 0x13800000ull && s.smmus[1].off == b &&
+          s.smmus[1].base == 0x13000000ull);
+    struct ck_iort_route rt;
+    CHECK(ck_iort_route(&s, 4, 0x100, &rt) == 0 && rt.smmu_index == 0 && rt.smmu_base == 0x13800000ull &&
+          rt.sid == 0x50100 && rt.nrmr == 0);
+    CHECK(ck_iort_route(&s, 15, 0x100, &rt) == 0 && rt.smmu_index == 1 && rt.smmu_base == 0x13000000ull &&
+          rt.smmu_off == b && rt.sid == 0x100 && rt.nrmr == 0); /* no RMR node in this table */
+    CHECK(ck_iort_route(&s, 16, 0x100, &rt) == -1);
+    CHECK(ck_iort_route(&s, 15, 0x10000, &rt) == -1);
+    /* The same shape with the Spark's RMR node (MEASURED 2026-10-10,
+     * docs/GB10_IORT_DECODE.md): flags 0x10 (Normal NC, remap not
+     * permitted), streams 0x0..=0x100 of the second SMMUv3, three ranges. */
+    static const uint64_t spark_rmr[6] = { 0x300000000ull, 0x3000000ull, 0x280000000ull, 0x80000000ull,
+                                           0xa1600000ull, 0x18200000ull };
+    at = iort_rmr(t, at, 0x10, 0, 0x100, b, spark_rmr, 3);
+    iort_end(t, at, 19);
+    CHECK(ck_iort_parse(t, &s) == 1 && s.nrmr == 1 && s.rmr[0].smmu_index == 1 && s.rmr[0].sid_lo == 0 &&
+          s.rmr[0].sid_hi == 0x100 && s.rmr[0].flags == 0x10 && s.rmr[0].nranges == 3 &&
+          s.rmr[0].range[1].base == 0x280000000ull && s.rmr[0].range[1].len == 0x80000000ull);
+    CHECK(CK_IORT_RMR_ATTR(s.rmr[0].flags) == CK_IORT_RMR_ATTR_NORMAL_NC && !(s.rmr[0].flags & CK_IORT_RMR_REMAP_PERMITTED));
+    /* The GB10 stream (0x100, the last one, inclusive) is covered; 0x101 is not. */
+    CHECK(ck_iort_route(&s, 15, 0x100, &rt) == 0 && rt.smmu_index == 1 && rt.nrmr == 1 && rt.rmr[0] == &s.rmr[0] &&
+          rt.rmr[0]->range[2].base == 0xa1600000ull);
+    CHECK(ck_iort_route(&s, 15, 0x101, &rt) == 0 && rt.smmu_index == 1 && rt.nrmr == 0);
+    CHECK(ck_iort_route(&s, 15, 0x0, &rt) == 0 && rt.nrmr == 1);
+    /* Stream 0x100 of the FIRST SMMU (segment 0 rid 0x100 is 0x10100; here
+     * use a table where the first node has a stream 0x100): the RMR names
+     * the second node only, so the first node's stream 0x100 gets none. */
+    CHECK(ck_iort_rmr_for(&s, a, 0x100, &rt) == 0);
+    CHECK(ck_iort_rmr_for(&s, b, 0x100, &rt) == 1);
+    /* Malformed RMR nodes refuse the whole table: unaligned range, empty
+     * range, zero descriptors, descriptor array past the node. */
+    uint32_t rmr_at = at - (28 + 20 + 20 * 3);
+    w64(t + rmr_at + 48 + 20 * 0, 0x300000001ull);
+    CHECK(ck_iort_parse(t, &s) == -1);
+    w64(t + rmr_at + 48 + 20 * 0, 0x300000000ull);
+    w64(t + rmr_at + 48 + 20 * 0 + 8, 0);
+    CHECK(ck_iort_parse(t, &s) == -1);
+    w64(t + rmr_at + 48 + 20 * 0 + 8, 0x3000000ull);
+    w32(t + rmr_at + 20, 0);
+    CHECK(ck_iort_parse(t, &s) == -1);
+    w32(t + rmr_at + 20, 4); /* claims 4 descriptors, the node holds 3 */
+    CHECK(ck_iort_parse(t, &s) == -1);
+    w32(t + rmr_at + 20, 3);
+    CHECK(ck_iort_parse(t, &s) == 1 && s.nrmr == 1);
+    /* An RMR mapping to a non-SMMU node (the root complex) is ignored, not a range. */
+    w32(t + rmr_at + 28 + 12, rc15);
+    CHECK(ck_iort_parse(t, &s) == 1 && s.nrmr == 0);
+    w32(t + rmr_at + 28 + 12, b);
     CHECK(ck_iort_stream_id(&s, 0, 0x0, &sid) == 0 && sid == 0x10000);
     CHECK(ck_iort_stream_id(&s, 14, 0xffff, &sid) == 0 && sid == 0xfffff);
     /* Wrong segment: segment 15 belongs to the second SMMU, segment 16
diff --git a/native/kernel/tools/.crumb b/native/kernel/tools/.crumb
index 9f3b7993..67bb86e3 100644
--- a/native/kernel/tools/.crumb
+++ b/native/kernel/tools/.crumb
@@ -7,14 +7,14 @@
     "generated": {
       "children": [],
       "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
-      "compiled_at": "2026-10-10T03:01:04Z",
+      "compiled_at": "2026-10-10T04:29:33Z",
       "compiler": "crumb-compile/1",
-      "digest": "sha256:a1d0d3826f56fa39927cea4b9d0187774cebf0ce3472c8bcc0fb6c0ce791f572",
+      "digest": "sha256:118855445b6fc55bc5abbcfc5d684135abcb0e8092d43edde4bca881ae5213f7",
       "evidence_files": 0,
       "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
       "files": 12,
-      "generated_at_commit": "f759310fc87760e56432e734db76c540c6e936ae",
-      "source_tree": "sha256:6ac752f541641e60c4bdaf06ee43079c2f5b8402350a29ca3fa71a066cb00c35"
+      "generated_at_commit": "ed308de52ede1d4c8a211d88e0e4a3ac5c92ec23",
+      "source_tree": "sha256:180f992d3310a0d3e83349cfb54abcab8a83a6094c3340de1a9a45c7191f7b8b"
     },
     "owner_lane": "",
     "provenance": {
diff --git a/native/kernel/tools/ck_acpi_scan.c b/native/kernel/tools/ck_acpi_scan.c
index ef77807b..45a352e0 100644
--- a/native/kernel/tools/ck_acpi_scan.c
+++ b/native/kernel/tools/ck_acpi_scan.c
@@ -121,6 +121,14 @@ static void iort_notes(const uint8_t *t)
         uint32_t mcount = rd32(n + 8), moff = rd32(n + 12);
         if (n[0] == 4 && nlen >= 24)
             printf("# iort: node@0x%x smmuv3 base=0x%llx\n", off, (unsigned long long)rd64(n + 16));
+        else if (n[0] == 6 && nlen >= 28) {
+            uint32_t flags = rd32(n + 16), rcount = rd32(n + 20), roff = rd32(n + 24);
+            printf("# iort: node@0x%x rmr flags=0x%x (attr=%u remap=%u priv=%u) ranges=%u maps=%u\n", off, flags,
+                   (flags >> 2) & 0xff, flags & 1, (flags >> 1) & 1, rcount, mcount);
+            for (uint32_t r = 0; r < rcount && roff + (r + 1) * 20 <= nlen; r++)
+                printf("#   reserved base=0x%llx len=0x%llx\n", (unsigned long long)rd64(n + roff + r * 20),
+                       (unsigned long long)rd64(n + roff + r * 20 + 8));
+        }
         else if (n[0] == 1 && nlen > 29) {
             char name[64];
             uint32_t end = mcount ? moff : nlen, k = 0;
@@ -225,16 +233,31 @@ int main(int argc, char **argv)
     if (iort) {
         iort_notes(iort);
         prc = ck_iort_parse(iort, &first);
-        if (prc == 1)
-            printf("# smmu: the kernel drives the first SMMUv3 node: node@0x%x base=0x%llx (pci maps=%u, maps to other SMMUs=%u)\n",
-                   first.node_off, (unsigned long long)first.base, first.nmaps, first.nother);
-        if (prc == 1)
-            for (uint32_t i = 0; i < first.nother; i++)
-                printf("# smmu: segment %u rid 0x%x..0x%x -> stream 0x%x.. on SMMUv3 node@0x%x base=0x%llx (not driven: CK_SMMU_OTHER)\n",
+        if (prc == 1) {
+            printf("# smmu: %u SMMUv3 node(s), each brought up by its first confined stream (cut B7a); first: node@0x%x base=0x%llx (pci maps=%u, maps to other SMMUs=%u, rmr nodes=%u)\n",
+                   first.nsmmus, first.node_off, (unsigned long long)first.base, first.nmaps, first.nother, first.nrmr);
+            for (uint32_t i = 1; i < first.nsmmus; i++)
+                printf("# smmu: instance %u: node@0x%x base=0x%llx\n", i, first.smmus[i].off,
+                       (unsigned long long)first.smmus[i].base);
+            for (uint32_t i = 0; i < first.nother; i++) {
+                struct ck_iort_route rt;
+                int rrc = ck_iort_route(&first, first.other[i].map.segment, first.other[i].map.input_base, &rt);
+                printf("# smmu: segment %u rid 0x%x..0x%x -> stream 0x%x.. on SMMUv3 node@0x%x base=0x%llx (route: instance %d, reserved ranges for the first rid: %u)\n",
                        first.other[i].map.segment, first.other[i].map.input_base,
                        first.other[i].map.input_base + first.other[i].map.id_count, first.other[i].map.output_base,
-                       first.other[i].smmu_off, (unsigned long long)first.other[i].smmu_base);
-        else
+                       first.other[i].smmu_off, (unsigned long long)first.other[i].smmu_base,
+                       rrc == 0 ? (int)rt.smmu_index : -1, rrc == 0 ? rt.nrmr : 0u);
+            }
+            for (uint32_t i = 0; i < first.nrmr; i++) {
+                uint32_t attr = CK_IORT_RMR_ATTR(first.rmr[i].flags);
+                printf("# smmu: rmr node@0x%x: streams 0x%x..0x%x of instance %u, %u range(s), attr %u (%s)\n",
+                       first.rmr[i].node_off, first.rmr[i].sid_lo, first.rmr[i].sid_hi, first.rmr[i].smmu_index,
+                       first.rmr[i].nranges, attr,
+                       attr == CK_IORT_RMR_ATTR_NORMAL_NC || attr == CK_IORT_RMR_ATTR_NORMAL_IWB_OWB
+                           ? "identity-mapped beside a confined window"
+                           : "unsupported: confinement refused");
+            }
+        } else
             printf("# smmu: ck_iort_parse=%d (%s)\n", prc, prc == 0 ? "no SMMUv3 node" : "malformed");
         parse_notes(iort);
     } else