diff --git a/repos/base-fiasco/src/core/io_mem_session_support.cc b/repos/base-fiasco/src/core/io_mem_session_support.cc index 123b1e8cf..609d8d995 100644 --- a/repos/base-fiasco/src/core/io_mem_session_support.cc +++ b/repos/base-fiasco/src/core/io_mem_session_support.cc @@ -31,9 +31,14 @@ void Io_mem_session_component::_unmap_local(addr_t base, size_t) } -static inline bool can_use_super_page(addr_t base, size_t size) { - return (base & (get_super_page_size() - 1)) == 0 - && (size >= get_super_page_size()); } +static inline bool can_use_super_page(addr_t, size_t) +{ + /* + * We disable super-page I/O mappings as unmap does not flush the local + * mapping which breaks later re-mappings of different page size. + */ + return false; +} addr_t Io_mem_session_component::_map_local(addr_t base, size_t size) diff --git a/repos/base-foc/src/core/include/map_local.h b/repos/base-foc/src/core/include/map_local.h index a6fdb3425..0b31c6a27 100644 --- a/repos/base-foc/src/core/include/map_local.h +++ b/repos/base-foc/src/core/include/map_local.h @@ -66,10 +66,13 @@ namespace Genode { } - static inline bool can_use_super_page(addr_t base, size_t size) + static inline bool can_use_super_page(addr_t, size_t) { - return (base & (get_super_page_size() - 1)) == 0 - && (size >= get_super_page_size()); + /* + * We disable super-page I/O mappings as unmap does not flush the local + * mapping which breaks later re-mappings of different page size. + */ + return false; }