From 009adff4412147673bc021bb4c5d1a49cd134e9f Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Fri, 9 Aug 2013 12:05:30 +0200 Subject: [PATCH] seoul: fix region conflicts At least 64bit Seoul dies with Region_conflict reliable and reproducible. When during startup of Seoul some Genode code (caused by executing some constructors) try to attach a region, the region manager code in the rm_session will try to place the attachment at the smallest large enough aligned free virtual region. For now, I observed one attachment causing trouble (but not knowing who causes this - it does also not really matter). The questionable region is 0x4000 of size for 32bit and 0x8000 of size for 64bit. To steer the region manager a bit, we try now following trick: With this commit the load address of the binary for 32 and 64 bit is moved close to the end of the virtual address space, but leaving enough free virtual space for the above observed attachment (and a bit more). The region manager code now will try to fill up the virtual region behind the binary up to the end of the virtual address space, effectively letting the lower virtual region untouched - hopefully. Works for now, but it will break again - for sure. Fixes #519 --- ports/src/vancouver/32bit/target.mk | 5 +++++ ports/src/vancouver/64bit/target.mk | 5 +++++ ports/src/vancouver/{target.mk => target.inc} | 10 +++++----- 3 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 ports/src/vancouver/32bit/target.mk create mode 100644 ports/src/vancouver/64bit/target.mk rename ports/src/vancouver/{target.mk => target.inc} (90%) diff --git a/ports/src/vancouver/32bit/target.mk b/ports/src/vancouver/32bit/target.mk new file mode 100644 index 000000000..e95f2b356 --- /dev/null +++ b/ports/src/vancouver/32bit/target.mk @@ -0,0 +1,5 @@ +REQUIRES = 32bit + +LD_TEXT_ADDR = 0xbf800000 + +include $(REP_DIR)/src/vancouver/target.inc diff --git a/ports/src/vancouver/64bit/target.mk b/ports/src/vancouver/64bit/target.mk new file mode 100644 index 000000000..6652af337 --- /dev/null +++ b/ports/src/vancouver/64bit/target.mk @@ -0,0 +1,5 @@ +REQUIRES = 64bit + +LD_TEXT_ADDR = 0x7fffff800000 + +include $(REP_DIR)/src/vancouver/target.inc diff --git a/ports/src/vancouver/target.mk b/ports/src/vancouver/target.inc similarity index 90% rename from ports/src/vancouver/target.mk rename to ports/src/vancouver/target.inc index 4fd248e35..a180035ef 100644 --- a/ports/src/vancouver/target.mk +++ b/ports/src/vancouver/target.inc @@ -5,7 +5,7 @@ VANCOUVER_DIR = $(CONTRIB_DIR) GENODE_DIR = $(CONTRIB_DIR)/genode NOVA_INCLUDE_DIR = $(REP_DIR)/contrib/seoul-git/include -REQUIRES = nova +REQUIRES += nova ifeq ($(wildcard $(VANCOUVER_DIR)),) REQUIRES += prepare_ports_vancouver @@ -29,8 +29,8 @@ SRC_CC += $(filter-out $(FILTER_OUT),$(addprefix model/,$(MODEL_SRC_CC))) SRC_CC += $(filter-out $(FILTER_OUT),$(addprefix executor/,$(EXECUTOR_SRC_CC))) SRC_CC += model/sink.cc -INC_DIR += $(PRG_DIR) -INC_DIR += $(PRG_DIR)/executor +INC_DIR += $(PRG_DIR)/.. +INC_DIR += $(PRG_DIR)/../executor INC_DIR += $(VANCOUVER_DIR)/model INC_DIR += $(VANCOUVER_DIR)/executor INC_DIR += $(VANCOUVER_DIR)/include $(GENODE_DIR)/include @@ -39,7 +39,7 @@ INC_DIR += $(NOVA_INCLUDE_DIR) CC_WARN += -Wno-parentheses CC_CXX_OPT += -std=gnu++11 -LD_TEXT_ADDR = 0xb0000000 - vpath %.cc $(VANCOUVER_DIR) vpath %.cc $(CONTRIB_DIR) +vpath %.cc $(PRG_DIR)/.. +vpath %.tff $(PRG_DIR)/..