From 2fd68105a366b84ada11083a3fbed63850606132 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Tue, 11 Sep 2012 12:09:53 +0200 Subject: [PATCH] Vancouver: Make sure context area gets reserved --- ports/src/vancouver/main.cc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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 */