diff --git a/repos/base-hw/include/base/native_types.h b/repos/base-hw/include/base/native_types.h index 30fff4e9c..c6fe26031 100644 --- a/repos/base-hw/include/base/native_types.h +++ b/repos/base-hw/include/base/native_types.h @@ -186,14 +186,16 @@ class Genode::Native_utcb namespace Genode { static constexpr addr_t VIRT_ADDR_SPACE_START = 0x1000; - static constexpr size_t VIRT_ADDR_SPACE_SIZE = 0xfffef000; + static constexpr size_t VIRT_ADDR_SPACE_SIZE = 0xfffee000; - static constexpr Native_utcb * utcb_main_thread() - { - return (Native_utcb *) - ((VIRT_ADDR_SPACE_START + VIRT_ADDR_SPACE_SIZE - sizeof(Native_utcb)) - & ~(get_page_size() - 1)); - } + /** + * The main thread's UTCB, used during bootstrap of the main thread before it + * allocates its context area, needs to be outside the virtual memory area + * controlled by the RM session, because it is needed before the main + * thread can access its RM session. + */ + static constexpr Native_utcb * utcb_main_thread() { + return (Native_utcb *) (VIRT_ADDR_SPACE_START + VIRT_ADDR_SPACE_SIZE); } } #endif /* _BASE__NATIVE_TYPES_H_ */