<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/drivers/iommu, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>iommu: Validate device tree node in dev_iommu_enable</title>
<updated>2026-02-26T15:04:46+00:00</updated>
<author>
<name>Peng Fan</name>
<email>peng.fan@nxp.com</email>
</author>
<published>2026-02-10T08:12:16+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=efc9be77d851b98b38afcfb4e46d17703057efad'/>
<id>efc9be77d851b98b38afcfb4e46d17703057efad</id>
<content type='text'>
Similar to pinctrl_select_state(), add dev_has_ofnode() check before doing the
real work. Device(scmi_base.0) does not have a real device node, ofnode_null()
is assigned as the device tree node for scmi base protocol device:
'commit 7eb4eb541c14 ("firmware: scmi: install base protocol to SCMI agent")'

However with recent update in
'commit 0535e46d55d7 ("scripts/dtc: Update to upstream version v1.7.2-35-g52f07dcca47c")',
SPL panic in fdt_check_node_offset_()-&gt;fdt_next_tag(), because offset is -1
and SPL_OF_LIBFDT_ASSUME_MASK is 0xFF.

So need to validate device tree node.

Reported-by: Ye Li &lt;ye.li@nxp.com&gt;
Closes: https://lore.kernel.org/u-boot/939a9696-27fa-45a1-b428-feffe21ac6d5@oss.nxp.com/
Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Similar to pinctrl_select_state(), add dev_has_ofnode() check before doing the
real work. Device(scmi_base.0) does not have a real device node, ofnode_null()
is assigned as the device tree node for scmi base protocol device:
'commit 7eb4eb541c14 ("firmware: scmi: install base protocol to SCMI agent")'

However with recent update in
'commit 0535e46d55d7 ("scripts/dtc: Update to upstream version v1.7.2-35-g52f07dcca47c")',
SPL panic in fdt_check_node_offset_()-&gt;fdt_next_tag(), because offset is -1
and SPL_OF_LIBFDT_ASSUME_MASK is 0xFF.

So need to validate device tree node.

Reported-by: Ye Li &lt;ye.li@nxp.com&gt;
Closes: https://lore.kernel.org/u-boot/939a9696-27fa-45a1-b428-feffe21ac6d5@oss.nxp.com/
Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iommu: qcom-smmu: Introduce sc7180 compatible string</title>
<updated>2025-10-30T17:04:51+00:00</updated>
<author>
<name>George Chan</name>
<email>gchan9527@gmail.com</email>
</author>
<published>2025-10-20T16:23:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=5d6042ce3fdacefb075ef22ca9e14a7d13f43eca'/>
<id>5d6042ce3fdacefb075ef22ca9e14a7d13f43eca</id>
<content type='text'>
Add basic compatible string for sc7180 family soc.

Signed-off-by: Vitalii Skorkin &lt;nikroks@mainlining.org&gt;
Co-developed-by: George Chan &lt;gchan9527@gmail.com&gt;
Signed-off-by: George Chan &lt;gchan9527@gmail.com&gt;
Reviewed-by: Casey Connolly &lt;casey.connolly@linaro.org&gt;
Link: https://patch.msgid.link/20251021-sc7180-minor-v1-1-9fe33c73365e@gmail.com
Signed-off-by: Casey Connolly &lt;casey.connolly@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add basic compatible string for sc7180 family soc.

Signed-off-by: Vitalii Skorkin &lt;nikroks@mainlining.org&gt;
Co-developed-by: George Chan &lt;gchan9527@gmail.com&gt;
Signed-off-by: George Chan &lt;gchan9527@gmail.com&gt;
Reviewed-by: Casey Connolly &lt;casey.connolly@linaro.org&gt;
Link: https://patch.msgid.link/20251021-sc7180-minor-v1-1-9fe33c73365e@gmail.com
Signed-off-by: Casey Connolly &lt;casey.connolly@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iommu: qcom-smmu: Add qcom,sm6350-smmu-500 compatible</title>
<updated>2025-10-29T11:27:33+00:00</updated>
<author>
<name>Luca Weiss</name>
<email>luca.weiss@fairphone.com</email>
</author>
<published>2025-09-17T12:47:37+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=11003e47800f572c4506d6bd1e7c049b2f90fd16'/>
<id>11003e47800f572c4506d6bd1e7c049b2f90fd16</id>
<content type='text'>
This SoC doesn't have the generic compatible.

Reviewed-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Signed-off-by: Luca Weiss &lt;luca.weiss@fairphone.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This SoC doesn't have the generic compatible.

Reviewed-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Signed-off-by: Luca Weiss &lt;luca.weiss@fairphone.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iommu: qcom-smmu: add missing linux/bug.h header for WARN_ON</title>
<updated>2025-06-14T15:11:10+00:00</updated>
<author>
<name>Christian Marangi</name>
<email>ansuelsmth@gmail.com</email>
</author>
<published>2025-06-07T21:11:18+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1f1aafe0b526ae22b0b1673d440c58fa99d5d4bf'/>
<id>1f1aafe0b526ae22b0b1673d440c58fa99d5d4bf</id>
<content type='text'>
The WARN macro requires inclusion of linux/bug.h header. It does
currently work as bitfield.h includes it indirectly but this will
change when bitfield.h will be synced with new Linux version.

Explicitly include the header to fix future compilation error.

Signed-off-by: Christian Marangi &lt;ansuelsmth@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The WARN macro requires inclusion of linux/bug.h header. It does
currently work as bitfield.h includes it indirectly but this will
change when bitfield.h will be synced with new Linux version.

Explicitly include the header to fix future compilation error.

Signed-off-by: Christian Marangi &lt;ansuelsmth@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge patch series "Fix device removal order for Apple dart iommu"</title>
<updated>2024-11-24T21:41:32+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2024-11-24T21:41:32+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=880fcc49eb40a78ed27ff575aa02034d7bd74e80'/>
<id>880fcc49eb40a78ed27ff575aa02034d7bd74e80</id>
<content type='text'>
Janne Grunau &lt;j@jannau.net&gt; says:

Starting with v2024.10 dev_iommu_dma_unmap calls during device removal
trigger a NULL pointer dereference in the Apple dart iommu driver. The
iommu device is removed before its user. The sparsely used DM_FLAG_VITAL
flag is intended to describe this dependency. Add it to the driver.

Adding this flag is unfortunately not enough since the boot routines
except the arm one simply remove all drivers. Add and use a new function
which calls
    dm_remove_devioce_flags(DM_REMOVE_ACTIVE_ALL | DM_REMOVE_NON_VITAL);
    dm_remove_devices_flags(DM_REMOVE_ACTIVE_ALL);
to ensure this order dependency is head consistently.

Link: https://lore.kernel.org/r/20241123-iommu_apple_dart_ordering-v2-0-cc2ade6dde97@jannau.net
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Janne Grunau &lt;j@jannau.net&gt; says:

Starting with v2024.10 dev_iommu_dma_unmap calls during device removal
trigger a NULL pointer dereference in the Apple dart iommu driver. The
iommu device is removed before its user. The sparsely used DM_FLAG_VITAL
flag is intended to describe this dependency. Add it to the driver.

Adding this flag is unfortunately not enough since the boot routines
except the arm one simply remove all drivers. Add and use a new function
which calls
    dm_remove_devioce_flags(DM_REMOVE_ACTIVE_ALL | DM_REMOVE_NON_VITAL);
    dm_remove_devices_flags(DM_REMOVE_ACTIVE_ALL);
to ensure this order dependency is head consistently.

Link: https://lore.kernel.org/r/20241123-iommu_apple_dart_ordering-v2-0-cc2ade6dde97@jannau.net
</pre>
</div>
</content>
</entry>
<entry>
<title>iommu: apple: Mark device with DM_FLAG_VITAL</title>
<updated>2024-11-24T21:41:28+00:00</updated>
<author>
<name>Janne Grunau</name>
<email>j@jannau.net</email>
</author>
<published>2024-11-23T21:44:04+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=544a76bac3393045e86a56cc5dfe2477e437c59b'/>
<id>544a76bac3393045e86a56cc5dfe2477e437c59b</id>
<content type='text'>
Avoids NULL pointer dereferences in apple_dart_unmap when the iommu
device is removed before its user. U-boot's device model does not track
dependencies between devices.
Observed on a M1 Ultra Mac Studio with v2024.10.

Acked-by: Mark Kettenis &lt;kettenis@openbsd.org&gt;
Signed-off-by: Janne Grunau &lt;j@jannau.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Avoids NULL pointer dereferences in apple_dart_unmap when the iommu
device is removed before its user. U-boot's device model does not track
dependencies between devices.
Observed on a M1 Ultra Mac Studio with v2024.10.

Acked-by: Mark Kettenis &lt;kettenis@openbsd.org&gt;
Signed-off-by: Janne Grunau &lt;j@jannau.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iommu: qcom-smmu: handle running in el2</title>
<updated>2024-11-20T16:57:58+00:00</updated>
<author>
<name>Caleb Connolly</name>
<email>caleb.connolly@linaro.org</email>
</author>
<published>2024-11-13T05:09:24+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=e55fc3ab205c6e81ac52fe2550478ea746d9b512'/>
<id>e55fc3ab205c6e81ac52fe2550478ea746d9b512</id>
<content type='text'>
We only need to configure the SMMU when running in EL1. In EL2 the
hypervisor isn't running so peripherals can just do DMA as they wish.

Reviewed-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Signed-off-by: Caleb Connolly &lt;caleb.connolly@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We only need to configure the SMMU when running in EL1. In EL2 the
hypervisor isn't running so peripherals can just do DMA as they wish.

Reviewed-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Signed-off-by: Caleb Connolly &lt;caleb.connolly@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iommu: qcom-smmu: allow SID 0</title>
<updated>2024-11-20T16:57:58+00:00</updated>
<author>
<name>Caleb Connolly</name>
<email>caleb.connolly@linaro.org</email>
</author>
<published>2024-11-13T05:00:56+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=53c0f1beac1e528f4ccfd116d6d4fde9881b3c91'/>
<id>53c0f1beac1e528f4ccfd116d6d4fde9881b3c91</id>
<content type='text'>
It turns out this is a very real stream ID. Who woulda thought?

Drop the 0 check on the SID, there's no reason for it to be there in the first
place.

Reviewed-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Signed-off-by: Caleb Connolly &lt;caleb.connolly@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It turns out this is a very real stream ID. Who woulda thought?

Drop the 0 check on the SID, there's no reason for it to be there in the first
place.

Reviewed-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Signed-off-by: Caleb Connolly &lt;caleb.connolly@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iommu: apple: Manage IOVA separately from global LMB mem map</title>
<updated>2024-11-11T13:26:44+00:00</updated>
<author>
<name>Janne Grunau</name>
<email>j@jannau.net</email>
</author>
<published>2024-11-11T06:56:34+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f642f344348558e05902175e7517c7a12f2c5562'/>
<id>f642f344348558e05902175e7517c7a12f2c5562</id>
<content type='text'>
There is no overlap between the IOVA space managed by the iommu (here
the 32-bit address space) and physical RAM on Apple silicon systems. The
RAM starts at 0x10_0000_0000 or 0x100_0000_0000 so it's not possible to
manage the IOVA with the global memory LMB and use 1:1 translation.
In addition each device has its own iommu and does not need to share the
address space with all other devices. This should not be problem for
u-boot's limited use and hardware support.
Restore the private per instance LMB IOVA map.

Fixes: ed17a33fed2 ("lmb: make LMB memory map persistent and global")
Signed-off-by: Janne Grunau &lt;j@jannau.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is no overlap between the IOVA space managed by the iommu (here
the 32-bit address space) and physical RAM on Apple silicon systems. The
RAM starts at 0x10_0000_0000 or 0x100_0000_0000 so it's not possible to
manage the IOVA with the global memory LMB and use 1:1 translation.
In addition each device has its own iommu and does not need to share the
address space with all other devices. This should not be problem for
u-boot's limited use and hardware support.
Restore the private per instance LMB IOVA map.

Fixes: ed17a33fed2 ("lmb: make LMB memory map persistent and global")
Signed-off-by: Janne Grunau &lt;j@jannau.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iommu: qcom-smmu: add sc7280-smmu-500 compatible</title>
<updated>2024-09-06T08:47:47+00:00</updated>
<author>
<name>Caleb Connolly</name>
<email>caleb.connolly@linaro.org</email>
</author>
<published>2024-08-21T13:41:49+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=2bb90ac29fcf04ecc3ff8eb5d419549ba59077b0'/>
<id>2bb90ac29fcf04ecc3ff8eb5d419549ba59077b0</id>
<content type='text'>
This soc doesn't have the generic compatible.

Reviewed-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Caleb Connolly &lt;caleb.connolly@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This soc doesn't have the generic compatible.

Reviewed-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Caleb Connolly &lt;caleb.connolly@linaro.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
