diff --git a/ports/src/vancouver/main.cc b/ports/src/vancouver/main.cc index 9bd04e353..0e4b10642 100644 --- a/ports/src/vancouver/main.cc +++ b/ports/src/vancouver/main.cc @@ -1039,10 +1039,25 @@ class Machine : public StaticReceiver extern unsigned long _prog_img_beg; /* begin of program image (link address) */ extern unsigned long _prog_img_end; /* end of program image */ +namespace Genode { + + Rm_session *env_context_area_rm_session(); + +} + int main(int argc, char **argv) { Genode::printf("--- Vancouver VMM starting ---\n"); + /** + * XXX Invoke env_context_rm_session to make sure the virtual region of + * the context area is reserved at core. Typically this happens when + * the first time a thread is allocated. + * Unfortunately, beforehand the VMM tries to grab the same region for + * large VM sizes. + */ + Genode::env_context_area_rm_session(); + /* request max available memory */ Genode::addr_t vm_size = Genode::env()->ram_session()->avail(); /* reserve some memory for the VMM */