sel4: properly detach core local regions

Issue #2044
This commit is contained in:
Alexander Boettcher 2016-07-04 14:49:32 +02:00 committed by Christian Helmuth
parent a396fa9563
commit 5b9a61fcb9
2 changed files with 13 additions and 1 deletions

View File

@ -66,4 +66,8 @@ Core_region_map::attach(Dataspace_capability ds_cap, size_t size,
}
void Core_region_map::detach(Local_addr) { }
void Core_region_map::detach(Local_addr core_local_addr)
{
size_t size = platform_specific()->region_alloc_size_at(core_local_addr);
unmap_local(core_local_addr, size >> get_page_size_log2());
}

View File

@ -193,6 +193,14 @@ class Genode::Platform : public Platform_generic
Cap_sel asid_pool() const { return _asid_pool_sel; }
void wait_for_exit();
/**
* Determine size of a core local mapping required for a
* core_rm_session detach().
*/
size_t region_alloc_size_at(void * addr) {
return (*_core_mem_alloc.virt_alloc())()->size_at(addr); }
};
#endif /* _CORE__INCLUDE__PLATFORM_H_ */