Skip to content

Commit 2d70fdd

Browse files
Kaustabh Chakrabortywilldeacon
authored andcommitted
iommu/exynos: add support for reserved regions
The bootloader configures a reserved memory region for framebuffer, which is protected by the IOMMU. The kernel-side driver is oblivious as of which memory region is set up by the bootloader. In such case, the IOMMU tries to reference the reserved region - which is not reserved in the kernel anymore - and it results in an unrecoverable page fault. More information about it is provided in [1]. Add support for reserved regions using iommu_dma_get_resv_regions(). For OF supported boards, this requires defining the region in the iommu-addresses property of the IOMMU owner's node. Link: https://lore.kernel.org/r/[email protected] [1] Signed-off-by: Kaustabh Chakraborty <[email protected]> Link: https://lore.kernel.org/r/20250712-exynos-sysmmu-resv-regions-v1-1-e79681fcab1a@disroot.org Signed-off-by: Will Deacon <[email protected]>
1 parent 86731a2 commit 2d70fdd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/iommu/exynos-iommu.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include <linux/pm_runtime.h>
2323
#include <linux/slab.h>
2424

25+
#include "dma-iommu.h"
2526
#include "iommu-pages.h"
2627

2728
typedef u32 sysmmu_iova_t;
@@ -1478,6 +1479,7 @@ static const struct iommu_ops exynos_iommu_ops = {
14781479
.probe_device = exynos_iommu_probe_device,
14791480
.release_device = exynos_iommu_release_device,
14801481
.pgsize_bitmap = SECT_SIZE | LPAGE_SIZE | SPAGE_SIZE,
1482+
.get_resv_regions = iommu_dma_get_resv_regions,
14811483
.of_xlate = exynos_iommu_of_xlate,
14821484
.default_domain_ops = &(const struct iommu_domain_ops) {
14831485
.attach_dev = exynos_iommu_attach_device,

0 commit comments

Comments
 (0)