Commit 0fb648c
committed
iommu: bcm2712-iommu: Allocate tables on demand; add OF properties
Allocate space for level-2 IOMMU translation tables on demand.
This should save memory in most cases but means that map_pages()
can now fail with -ENOMEM. Free unused tables pages (keeping
just one free page in hand for re-use).
Increase the default IOVA aperture size from 2GB to 4GB.
Add OF properties to override the default size and base address
(default 40GB); this doesn't include any dma-iova-offset.
Various tidy-ups. The internal representation of aperture limits
*does* include dma_iova_offset, as that is more commonly useful.
Clarify the distinction between Linux pages and IOMMU table pages.
Fix wrong definition of MMMU_CTRL_PT_INVALID_EN flag.
Signed-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>1 parent 8394326 commit 0fb648c
2 files changed
Lines changed: 279 additions & 188 deletions
0 commit comments