diff --git a/base-nova/patches/translate.patch b/base-nova/patches/translate.patch new file mode 100644 index 0000000000..619a47607c --- /dev/null +++ b/base-nova/patches/translate.patch @@ -0,0 +1,25 @@ +diff --git a/src/pd.cpp b/src/pd.cpp +index 8160d73..be6fd41 100644 +--- a/src/pd.cpp ++++ b/src/pd.cpp +@@ -167,6 +167,20 @@ void Pd::xlt_crd (Pd *pd, Crd xlt, Crd &crd) + if ((ro = clamp (node->node_base, rb, node->node_order, ro)) != ~0UL) + break; + ++ if (!node) { ++ /* Special handling on Genode: ++ * If a translate of an item inside the same PD (receiver/sender in same PD) ++ * are of no success, then return the very same item. ++ */ ++ Mdb *first = snd->tree_lookup (crd.base()); ++ if (first && first->space == rcv && first == mdb) { ++ rb = xlt.base(); ++ ro = xlt.order(); ++ if ((ro = clamp (first->node_base, rb, first->node_order, ro)) != ~0UL) ++ node = first; ++ } ++ } ++ + if (node) { + + so = clamp (mdb->node_base, sb, mdb->node_order, so); diff --git a/base-nova/patches/xlt_rcv.patch b/base-nova/patches/xlt_rcv.patch index 4eb83dba39..670039433b 100644 --- a/base-nova/patches/xlt_rcv.patch +++ b/base-nova/patches/xlt_rcv.patch @@ -2,17 +2,14 @@ diff --git a/src/pd.cpp b/src/pd.cpp index 8160d73..be9aa63 100644 --- a/src/pd.cpp +++ b/src/pd.cpp -@@ -173,8 +173,9 @@ void Pd::xlt_crd (Pd *pd, Crd xlt, Crd &crd) +@@ -173,6 +173,7 @@ void Pd::xlt_crd (Pd *pd, Crd xlt, Crd &crd) sb = (sb - mdb->node_base) + (mdb->node_phys - node->node_phys) + node->node_base; if ((ro = clamp (sb, rb, so, ro)) != ~0UL) { + trace (TRACE_DEL, "XLT OBJ PD:%p->%p SB:%#010lx RB:%#010lx O:%#04lx", pd, this, crd.base(), rb, so); crd = Crd (crd.type(), rb, ro, mdb->node_attr); -- return; -+ return; + return; } - } - } @@ -245,22 +246,32 @@ void Pd::rev_crd (Crd crd, bool self) void Pd::xfer_items (Pd *src, Crd xlt, Crd del, Xfer *s, Xfer *d, unsigned long ti)