nova: set max memory mapping supported by nova ABI

Related #2063
This commit is contained in:
Alexander Boettcher 2016-08-19 16:45:28 +02:00 committed by Christian Helmuth
parent 9c098752b0
commit fdf41cd08c

View File

@ -33,7 +33,12 @@ namespace Genode {
inline addr_t map_src_addr(addr_t core_local, addr_t phys) { return phys; }
inline size_t constrain_map_size_log2(size_t size_log2) { return size_log2; }
inline size_t constrain_map_size_log2(size_t size_log2)
{
/* Nova::Mem_crd order has 5 bits available and is in 4K page units */
enum { MAX_MAP_LOG2 = (1U << 5) - 1 + 12 };
return size_log2 > MAX_MAP_LOG2 ? MAX_MAP_LOG2 : size_log2;
}
inline void print_page_fault(const char *msg, addr_t pf_addr, addr_t pf_ip,