mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 20:42:56 +01:00
committed by
Christian Helmuth
parent
675aa2cd2f
commit
77bbe87dc8
@@ -45,8 +45,10 @@ void Pd_session_component::map(addr_t virt, addr_t size)
|
||||
addr_t region_offset) -> addr_t
|
||||
{
|
||||
Dataspace_component * dsc = region ? region->dataspace() : nullptr;
|
||||
if (!dsc)
|
||||
return ~0UL;
|
||||
if (!dsc) {
|
||||
struct No_dataspace{};
|
||||
throw No_dataspace();
|
||||
}
|
||||
|
||||
Mapping mapping = Region_map_component::create_map_item(region_map,
|
||||
region,
|
||||
@@ -87,9 +89,13 @@ void Pd_session_component::map(addr_t virt, addr_t size)
|
||||
return mapped;
|
||||
};
|
||||
|
||||
while (size) {
|
||||
addr_t mapped = _address_space.apply_to_dataspace(virt, lambda);
|
||||
virt += mapped;
|
||||
size = size < mapped ? size : size - mapped;
|
||||
try {
|
||||
while (size) {
|
||||
addr_t mapped = _address_space.apply_to_dataspace(virt, lambda);
|
||||
virt += mapped;
|
||||
size = size < mapped ? size : size - mapped;
|
||||
}
|
||||
} catch (...) {
|
||||
error(__func__, " failed ", Hex(virt), "+", Hex(size));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user