From 7771292d0391b57ea21c621293651d21d5824a9f Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Thu, 2 May 2024 11:36:37 +0200 Subject: [PATCH] nova: support iommu enabling per intel/amd separately. Genode's pc_platform_drv is now capable of driving the Intel IOMMU completely. The "iommu" option is now split up into "iommu_intel" and "iommu_amd", and is off for Intel with this commit. Fixes #5206 --- repos/base-nova/patches/allow_iommu_access.patch | 14 -------------- repos/base-nova/ports/nova.hash | 2 +- repos/base-nova/ports/nova.port | 2 +- tool/run/boot_dir/nova | 4 ++-- 4 files changed, 4 insertions(+), 18 deletions(-) delete mode 100644 repos/base-nova/patches/allow_iommu_access.patch diff --git a/repos/base-nova/patches/allow_iommu_access.patch b/repos/base-nova/patches/allow_iommu_access.patch deleted file mode 100644 index a569a96d8e0..00000000000 --- a/repos/base-nova/patches/allow_iommu_access.patch +++ /dev/null @@ -1,14 +0,0 @@ -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 (list), reg_base ((hwdev_addr -= PAGE_SIZE) | (p & PAGE_MASK)), invq (static_cast(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(REG_CAP); diff --git a/repos/base-nova/ports/nova.hash b/repos/base-nova/ports/nova.hash index 906673092fb..2fbf3f3b1e5 100644 --- a/repos/base-nova/ports/nova.hash +++ b/repos/base-nova/ports/nova.hash @@ -1 +1 @@ -18c9f39895331b972b524a8572163f40f168b763 +030c7f7648d3d41447c98ca726938b80460ee431 diff --git a/repos/base-nova/ports/nova.port b/repos/base-nova/ports/nova.port index aad52c95e15..defdfd29c1c 100644 --- a/repos/base-nova/ports/nova.port +++ b/repos/base-nova/ports/nova.port @@ -4,7 +4,7 @@ DOWNLOADS := nova.git # r10 branch URL(nova) := https://github.com/alex-ab/NOVA.git -REV(nova) := 9f727ff80f4ff7eb70b67cdbbed383a6af550038 +REV(nova) := f35787e37eaf9774e246cc44345f0a65bf4df712 DIR(nova) := src/kernel/nova PATCHES := $(sort $(wildcard $(REP_DIR)/patches/*.patch)) diff --git a/tool/run/boot_dir/nova b/tool/run/boot_dir/nova index 5272791ebdf..e5be6415f81 100644 --- a/tool/run/boot_dir/nova +++ b/tool/run/boot_dir/nova @@ -129,7 +129,7 @@ proc run_boot_dir {binaries} { if {[apply_microcode]} { puts $fh " module2 /boot/micro.code micro.code" } - puts $fh " module2 /boot/hypervisor hypervisor iommu [kernel_output]" + puts $fh " module2 /boot/hypervisor hypervisor iommu_amd [kernel_output]" puts $fh " module2 /boot/image.elf.gz image.elf" puts $fh "}" close $fh @@ -154,7 +154,7 @@ proc run_boot_dir {binaries} { if {[apply_microcode]} { puts $fh " load /boot/micro.code micro.code" } - puts $fh " load /boot/hypervisor iommu [kernel_output]" + puts $fh " load /boot/hypervisor iommu_amd [kernel_output]" puts $fh " load /boot/image.elf" close $fh