Skip to content

Commit

Permalink
seoul: fix region conflicts
Browse files Browse the repository at this point in the history
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
  • Loading branch information
alex-ab authored and nfeske committed Aug 15, 2013
1 parent 32e3eee commit 009adff
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
5 changes: 5 additions & 0 deletions ports/src/vancouver/32bit/target.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
REQUIRES = 32bit

LD_TEXT_ADDR = 0xbf800000

include $(REP_DIR)/src/vancouver/target.inc
5 changes: 5 additions & 0 deletions ports/src/vancouver/64bit/target.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
REQUIRES = 64bit

LD_TEXT_ADDR = 0x7fffff800000

include $(REP_DIR)/src/vancouver/target.inc
10 changes: 5 additions & 5 deletions ports/src/vancouver/target.mk → ports/src/vancouver/target.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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)/..

0 comments on commit 009adff

Please sign in to comment.