Link device_pd statically.

Reduces the likelihood of issue reported by #2209. Commit is meant as stop
gap until #2209 gets fixed.
This commit is contained in:
Alexander Boettcher 2017-01-19 13:06:27 +01:00 committed by Christian Helmuth
parent 645cd88a8b
commit dfe351a02c
2 changed files with 9 additions and 4 deletions

View File

@ -114,8 +114,13 @@ void Platform::Device_pd_component::attach_dma_mem(Genode::Dataspace_capability
} catch (Rm_session::Out_of_metadata) {
throw;
} catch (Rm_session::Region_conflict) {
/* memory already attached before - done */
return;
/*
* DMA memory already attached before or collision with normal
* device_pd memory (text, data, etc).
* Currently we can't distinguish it easily - show error
* message as a precaution.
*/
Genode::error("region conflict");
} catch (...) { }
/* sanity check */
@ -166,7 +171,7 @@ void Platform::Device_pd_component::assign_pci(Genode::Io_mem_dataspace_capabili
using Genode::print;
using Genode::Hex;
print(out, Hex(v >> 8, Hex::Prefix::OMIT_PREFIX), ":",
Hex((v >> 3) & 3, Hex::Prefix::OMIT_PREFIX), ".",
Hex((v >> 3) & 0x1f, Hex::Prefix::OMIT_PREFIX), ".",
Hex(v & 0x7, Hex::Prefix::OMIT_PREFIX));
}
};

View File

@ -1,6 +1,6 @@
TARGET = device_pd
SRC_CC = main.cc
LIBS = base
LIBS = base-nova
REQUIRES = nova