From 1520d9c1d91f44e2fa030dd6293ad349102e939d Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Tue, 20 Mar 2012 16:52:58 +0100 Subject: [PATCH] Fiasco.OC: Map ROM-modules in advance (fix #157). There seems to be a bug in Fiasco.OC, that is hard to reproduce. The scenario discussed in issue #157 triggers it relatively often. When sigma0 handles pagefaults of core on demand at runtime, at some point its reply ipc-message gets stucked in the kernel. This commit touches all ROM-modules when the platform is initialized in advance (like it was done for RAM etc. already before). --- base-foc/src/core/platform.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/base-foc/src/core/platform.cc b/base-foc/src/core/platform.cc index 2798c7a580..d811d910b5 100644 --- a/base-foc/src/core/platform.cc +++ b/base-foc/src/core/platform.cc @@ -417,6 +417,9 @@ void Platform::_setup_rom() Rom_module *new_rom = new(core_mem_alloc()) Rom_module(rom); _rom_fs.insert(new_rom); + /* map module */ + touch_ro((const void*)new_rom->addr(), new_rom->size()); + if (verbose) printf(" mod[%d] [%p,%p) %s\n", i, (void *)new_rom->addr(), ((char *)new_rom->addr()) + new_rom->size(),