base-nova: allow access to Intel IOMMU

This allows the platform driver to take over control of DMA remapping
and keeps NOVA-driven interrupt remapping active.

genodelabs/genode#5002
This commit is contained in:
Johannes Schlatow 2023-11-27 22:37:09 +01:00
parent 039ade7ad0
commit 518a57d8e5
2 changed files with 15 additions and 1 deletions

View File

@ -0,0 +1,14 @@
diff --git a/src/iommu_intel.cpp b/src/iommu_intel.cpp
index 1441466..c07224e 100644
--- a/src/iommu_intel.cpp
+++ b/src/iommu_intel.cpp
@@ -36,7 +36,8 @@ uint32 Dmar::gcmd = GCMD_TE;
Dmar::Dmar (Paddr p) : List<Dmar> (list), reg_base ((hwdev_addr -= PAGE_SIZE) | (p & PAGE_MASK)), invq (static_cast<Dmar_qi *>(Buddy::allocator.alloc (ord, Pd::kern.quota, Buddy::FILL_0))), invq_idx (0)
{
- Pd::kern.Space_mem::delreg (Pd::kern.quota, Pd::kern.mdb_cache, p & ~PAGE_MASK);
+// XXX allow Genode platform driver to access device and take over control
+// Pd::kern.Space_mem::delreg (Pd::kern.quota, Pd::kern.mdb_cache, p & ~PAGE_MASK);
Pd::kern.Space_mem::insert (Pd::kern.quota, reg_base, 0, Hpt::HPT_NX | Hpt::HPT_G | Hpt::HPT_UC | Hpt::HPT_W | Hpt::HPT_P, p & ~PAGE_MASK);
cap = read<uint64>(REG_CAP);

View File

@ -1 +1 @@
851c274f32d9ba3706a20407755ce6d17139afc6
33fbac63a46a1d91daa48833fb17e0ab4b0a04c7