foc: Make context area configurable in core

Make 'context_area_virtual_base' platform configurable. On Arndale, we
need to move the context area to a location that does not interfere with
the address range of physical memory.
This commit is contained in:
Sebastian Sumpf 2013-02-12 17:33:08 +01:00 committed by Norman Feske
parent 6e034efca4
commit f9ba60e501
6 changed files with 36 additions and 4 deletions

View File

@ -150,9 +150,9 @@ namespace Genode {
struct Native_config
{
/**
* Thread-context area configuration.
* Thread-context area configuration
*/
static addr_t context_area_virtual_base() { return 0x40000000UL; }
static addr_t context_area_virtual_base();
static addr_t context_area_virtual_size() { return 0x10000000UL; }
/**

View File

@ -9,7 +9,7 @@ LIBS += base-common
SRC_CC += console/log_console.cc
SRC_CC += env/env.cc env/context_area.cc env/reload_parent_cap.cc \
env/cap_map_remove.cc env/cap_alloc.cc
SRC_CC += thread/thread_start.cc
SRC_CC += thread/thread_start.cc thread/thread_context_area.cc
INC_DIR += $(BASE_DIR)/src/base/env

View File

@ -0,0 +1,11 @@
/*
* \brief Generic definitions for the location of the thread-context area
* \author Sebastian Sumpf
* \date 2013-02-12
*/
#include <base/native_types.h>
using namespace Genode;
addr_t Native_config::context_area_virtual_base() { return 0x40000000UL; }

View File

@ -1,3 +1,8 @@
vpath platform_services.cc $(GEN_CORE_DIR)
# override default location of thread context area within core
vpath thread_context_area.cc $(PRG_DIR)
include $(PRG_DIR)/../target.inc
LD_TEXT_ADDR = 0x80100000
@ -6,4 +11,3 @@ REQUIRES += arm foc_arndale
SRC_CC += arm/platform_arm.cc
INC_DIR += $(REP_DIR)/src/core/include/arm
vpath platform_services.cc $(GEN_CORE_DIR)

View File

@ -0,0 +1,15 @@
/*
* \brief Arndale specific definition of the context area location
* \author Sebastian Sumpf
* \date 2013-02-12
*
* We need to place the context area within core outside the physical memory.
* Sigma0 maps physical to core-local memory always 1:1 when using
* SIGMA0_REQ_FPAGE_ANY. Those mappings would interfere with the context area.
*/
#include <base/native_types.h>
using namespace Genode;
addr_t Native_config::context_area_virtual_base() { return 0x20000000UL; }

View File

@ -32,6 +32,7 @@ SRC_CC = cap_session_component.cc \
signal_session_component.cc \
signal_source_component.cc \
thread_start.cc \
thread_context_area.cc \
core_printf.cc
INC_DIR += $(REP_DIR)/src/core/include \
@ -55,3 +56,4 @@ vpath rom_session_component.cc $(GEN_CORE_DIR)
vpath signal_session_component.cc $(GEN_CORE_DIR)
vpath core_printf.cc $(BASE_DIR)/src/base/console
vpath %.cc $(REP_DIR)/src/core
vpath %.cc $(REP_DIR)/src/base/thread