genode/base-nova/patches/assign_pci.patch
Alexander Boettcher c114014c1c nova: kernel patch for assign_pci
Apply lookup of pci config memory address to target pd.
2013-02-21 11:52:02 +01:00

17 lines
643 B
Diff

diff --git a/src/syscall.cpp b/src/syscall.cpp
index ee6dc42..9d5eba3 100644
--- a/src/syscall.cpp
+++ b/src/syscall.cpp
@@ -462,8 +487,10 @@ void Ec::sys_assign_pci()
sys_finish<Sys_regs::BAD_CAP>();
}
+ Pd * pd = static_cast<Pd *>(obj);
+
Paddr phys; unsigned rid;
- if (EXPECT_FALSE (!Pd::current->Space_mem::lookup (r->dev(), phys) || (rid = Pci::phys_to_rid (phys)) == ~0U)) {
+ if (EXPECT_FALSE (!pd->Space_mem::lookup (r->dev(), phys) || (rid = Pci::phys_to_rid (phys)) == ~0U)) {
trace (TRACE_ERROR, "%s: Non-DEV CAP (%#lx)", __func__, r->dev());
sys_finish<Sys_regs::BAD_DEV>();
}