mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-29 15:44:02 +00:00
sel4: convert io memory on demand
instead all during boot. On x86 and qemu this takes quite a while until the system is booted. Fixes #4913
This commit is contained in:
parent
97bf616b5b
commit
b349dd9c0a
@ -22,7 +22,7 @@
|
||||
using namespace Core;
|
||||
|
||||
|
||||
void Io_mem_session_component::_unmap_local(addr_t base, size_t)
|
||||
void Io_mem_session_component::_unmap_local(addr_t base, size_t, addr_t)
|
||||
{
|
||||
platform().region_alloc().free(reinterpret_cast<void *>(base));
|
||||
}
|
||||
|
@ -21,7 +21,7 @@
|
||||
using namespace Core;
|
||||
|
||||
|
||||
void Io_mem_session_component::_unmap_local(addr_t base, size_t)
|
||||
void Io_mem_session_component::_unmap_local(addr_t base, size_t, addr_t)
|
||||
{
|
||||
platform().region_alloc().free(reinterpret_cast<void *>(base));
|
||||
}
|
||||
|
@ -18,7 +18,7 @@
|
||||
using namespace Core;
|
||||
|
||||
|
||||
void Io_mem_session_component::_unmap_local(addr_t, size_t) { }
|
||||
void Io_mem_session_component::_unmap_local(addr_t, size_t, addr_t) { }
|
||||
|
||||
|
||||
addr_t Io_mem_session_component::_map_local(addr_t base, size_t) { return base; }
|
||||
|
@ -21,6 +21,6 @@
|
||||
using namespace Core;
|
||||
|
||||
|
||||
void Io_mem_session_component::_unmap_local(addr_t, size_t) { }
|
||||
void Io_mem_session_component::_unmap_local(addr_t, size_t, addr_t) { }
|
||||
|
||||
addr_t Io_mem_session_component::_map_local(addr_t, size_t) { return 0; }
|
||||
|
@ -19,7 +19,7 @@
|
||||
using namespace Core;
|
||||
|
||||
|
||||
void Io_mem_session_component::_unmap_local(addr_t, size_t) { }
|
||||
void Io_mem_session_component::_unmap_local(addr_t, size_t, addr_t) { }
|
||||
|
||||
|
||||
addr_t Io_mem_session_component::_map_local(addr_t, size_t) { return 0; }
|
||||
|
@ -46,7 +46,7 @@ static bool is_conventional_memory(addr_t base)
|
||||
}
|
||||
|
||||
|
||||
void Io_mem_session_component::_unmap_local(addr_t, size_t) { }
|
||||
void Io_mem_session_component::_unmap_local(addr_t, size_t, addr_t) { }
|
||||
|
||||
|
||||
static inline bool can_use_super_page(addr_t base, size_t size)
|
||||
|
@ -252,12 +252,6 @@ class Core::Initial_untyped_pool
|
||||
|
||||
/* track memory left to be converted */
|
||||
max_memory -= batch_size;
|
||||
|
||||
/* convert device memory directly into page frames */
|
||||
if (range.device) {
|
||||
size_t const num_pages = batch_size >> get_page_size_log2();
|
||||
Untyped_memory::convert_to_page_frames(phys_addr, num_pages);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -13,12 +13,22 @@
|
||||
|
||||
/* core includes */
|
||||
#include <io_mem_session_component.h>
|
||||
#include <untyped_memory.h>
|
||||
|
||||
|
||||
using namespace Core;
|
||||
|
||||
|
||||
void Io_mem_session_component::_unmap_local(addr_t, size_t) { }
|
||||
void Io_mem_session_component::_unmap_local(addr_t, size_t size, addr_t phys)
|
||||
{
|
||||
Untyped_memory::convert_to_untyped_frames(phys, size);
|
||||
}
|
||||
|
||||
|
||||
addr_t Io_mem_session_component::_map_local(addr_t, size_t) { return 0; }
|
||||
addr_t Io_mem_session_component::_map_local(addr_t phys, size_t size)
|
||||
{
|
||||
size_t const num_pages = size >> get_page_size_log2();
|
||||
Untyped_memory::convert_to_page_frames(phys, num_pages);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ class Core::Io_mem_session_component : public Rpc_object<Io_mem_session>
|
||||
*
|
||||
* Both parameters - base and size - must be page-aligned.
|
||||
*/
|
||||
void _unmap_local(addr_t base, size_t size);
|
||||
void _unmap_local(addr_t virt_base, size_t size, addr_t phys_base);
|
||||
|
||||
public:
|
||||
|
||||
|
@ -87,7 +87,7 @@ Io_mem_session_component::~Io_mem_session_component()
|
||||
_ds_ep.dissolve(&_ds);
|
||||
|
||||
/* flush local mapping of IO_MEM */
|
||||
_unmap_local(_ds.core_local_addr(), _ds.size());
|
||||
_unmap_local(_ds.core_local_addr(), _ds.size(), _ds.phys_addr());
|
||||
|
||||
/*
|
||||
* The Dataspace will remove itself from all RM sessions when its
|
||||
|
Loading…
x
Reference in New Issue
Block a user