mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-23 21:08:00 +00:00
base: make stack area base specifiable for core
When running core as the kernel inside every component, a separate stack area for core is needed that is different from the user-land component's one. Ref #2091
This commit is contained in:
parent
3906568908
commit
ea46c462a4
@ -11,3 +11,4 @@ LIBS += startup-fiasco syscall-fiasco
|
||||
SRC_CC += capability.cc capability_raw.cc
|
||||
SRC_CC += rpc_dispatch_loop.cc
|
||||
SRC_CC += thread.cc thread_bootstrap.cc thread_myself.cc
|
||||
SRC_CC += stack_area_addr.cc
|
||||
|
@ -5,3 +5,4 @@ LIBS += base-foc-common syscall-foc cxx
|
||||
SRC_CC += cap_map_remove.cc cap_alloc.cc
|
||||
SRC_CC += thread_start.cc
|
||||
SRC_CC += signal_transmitter.cc signal.cc
|
||||
SRC_CC += stack_area_addr.cc
|
||||
|
@ -3,6 +3,7 @@ GEN_CORE_DIR = $(BASE_DIR)/src/core
|
||||
LIBS += base-foc-common syscall-foc cxx
|
||||
|
||||
SRC_CC += stack_area.cc \
|
||||
stack_area_addr.cc \
|
||||
core_log.cc \
|
||||
core_region_map.cc \
|
||||
core_rpc_cap_alloc.cc \
|
||||
|
@ -1,4 +0,0 @@
|
||||
# override default stack-area location
|
||||
INC_DIR += $(REP_DIR)/src/include/spec/arm
|
||||
|
||||
include $(REP_DIR)/lib/mk/base-foc-common.inc
|
@ -1 +0,0 @@
|
||||
include $(REP_DIR)/lib/mk/base-foc-common.inc
|
24
repos/base-foc/src/core/stack_area_addr.cc
Normal file
24
repos/base-foc/src/core/stack_area_addr.cc
Normal file
@ -0,0 +1,24 @@
|
||||
/*
|
||||
* \brief Component-local stack area base address for core on Fiasco.OC
|
||||
* \author Stefan Kalkowski
|
||||
* \date 2017-06-02
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2017 Genode Labs GmbH
|
||||
*
|
||||
* This file is part of the Genode OS framework, which is distributed
|
||||
* under the terms of the GNU Affero General Public License version 3.
|
||||
*/
|
||||
|
||||
/* base-internal includes */
|
||||
#include <base/internal/stack_area.h>
|
||||
|
||||
/*
|
||||
* The base address of the context area differs for core, because
|
||||
* roottask on Fiasco.OC uses identity mappings. The virtual address range
|
||||
* of the stack area must not overlap with physical memory. We pick an
|
||||
* address range that lies outside of the RAM of the currently supported
|
||||
* platforms.
|
||||
*/
|
||||
Genode::addr_t Genode::stack_area_virtual_base() { return 0x20000000UL; }
|
@ -1,33 +0,0 @@
|
||||
/*
|
||||
* \brief Stack area layout parameters
|
||||
* \author Norman Feske
|
||||
* \date 2016-03-03
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2016-2017 Genode Labs GmbH
|
||||
*
|
||||
* This file is part of the Genode OS framework, which is distributed
|
||||
* under the terms of the GNU Affero General Public License version 3.
|
||||
*/
|
||||
|
||||
#ifndef _INCLUDE__BASE__INTERNAL__STACK_AREA_H_
|
||||
#define _INCLUDE__BASE__INTERNAL__STACK_AREA_H_
|
||||
|
||||
#include <base/stdint.h>
|
||||
|
||||
namespace Genode {
|
||||
|
||||
/*
|
||||
* The base address of the context area differs between ARM and x86 because
|
||||
* roottask on Fiasco.OC uses identity mappings. The virtual address range
|
||||
* of the stack area must not overlap with physical memory. We pick an
|
||||
* address range that lies outside of the RAM of the currently supported
|
||||
* ARM platforms.
|
||||
*/
|
||||
static constexpr addr_t stack_area_virtual_base() { return 0x20000000UL; }
|
||||
static constexpr addr_t stack_area_virtual_size() { return 0x10000000UL; }
|
||||
static constexpr addr_t stack_virtual_size() { return 0x00100000UL; }
|
||||
}
|
||||
|
||||
#endif /* _INCLUDE__BASE__INTERNAL__STACK_AREA_H_ */
|
@ -5,5 +5,6 @@ SRC_CC += capability.cc
|
||||
SRC_CC += cache.cc
|
||||
SRC_CC += raw_write_string.cc
|
||||
SRC_CC += signal_receiver.cc
|
||||
SRC_CC += stack_area_addr.cc
|
||||
|
||||
LIBS += startup-hw base-hw-common cxx timeout-hw
|
||||
|
@ -62,6 +62,7 @@ SRC_CC += kernel/timer.cc
|
||||
SRC_CC += kernel/object.cc
|
||||
SRC_CC += init_main_thread.cc
|
||||
SRC_CC += capability.cc
|
||||
SRC_CC += stack_area_addr.cc
|
||||
|
||||
# provide Genode version information
|
||||
include $(BASE_DIR)/src/core/version.inc
|
||||
|
17
repos/base-hw/src/core/stack_area_addr.cc
Normal file
17
repos/base-hw/src/core/stack_area_addr.cc
Normal file
@ -0,0 +1,17 @@
|
||||
/*
|
||||
* \brief Component-local stack area base address for HW core
|
||||
* \author Stefan Kalkowski
|
||||
* \date 2017-06-02
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2017 Genode Labs GmbH
|
||||
*
|
||||
* This file is part of the Genode OS framework, which is distributed
|
||||
* under the terms of the GNU Affero General Public License version 3.
|
||||
*/
|
||||
|
||||
/* base-internal includes */
|
||||
#include <base/internal/stack_area.h>
|
||||
|
||||
Genode::addr_t Genode::stack_area_virtual_base() { return 0xd0000000UL; }
|
@ -1,26 +0,0 @@
|
||||
/*
|
||||
* \brief Stack area layout parameters
|
||||
* \author Norman Feske
|
||||
* \date 2016-03-03
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2016-2017 Genode Labs GmbH
|
||||
*
|
||||
* This file is part of the Genode OS framework, which is distributed
|
||||
* under the terms of the GNU Affero General Public License version 3.
|
||||
*/
|
||||
|
||||
#ifndef _INCLUDE__BASE__INTERNAL__STACK_AREA_H_
|
||||
#define _INCLUDE__BASE__INTERNAL__STACK_AREA_H_
|
||||
|
||||
#include <base/stdint.h>
|
||||
|
||||
namespace Genode {
|
||||
|
||||
static constexpr addr_t stack_area_virtual_base() { return 0xe0000000UL; }
|
||||
static constexpr addr_t stack_area_virtual_size() { return 0x10000000UL; }
|
||||
static constexpr addr_t stack_virtual_size() { return 0x00100000UL; }
|
||||
}
|
||||
|
||||
#endif /* _INCLUDE__BASE__INTERNAL__STACK_AREA_H_ */
|
@ -10,6 +10,7 @@ LIBS += startup-nova
|
||||
|
||||
SRC_CC += thread.cc thread_myself.cc
|
||||
SRC_CC += stack.cc
|
||||
SRC_CC += stack_area_addr.cc
|
||||
SRC_CC += cap_map.cc
|
||||
SRC_CC += capability.cc
|
||||
SRC_CC += signal_transmitter.cc
|
||||
|
@ -1,26 +0,0 @@
|
||||
/*
|
||||
* \brief Stack area layout parameters
|
||||
* \author Norman Feske
|
||||
* \date 2016-03-03
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2016-2017 Genode Labs GmbH
|
||||
*
|
||||
* This file is part of the Genode OS framework, which is distributed
|
||||
* under the terms of the GNU Affero General Public License version 3.
|
||||
*/
|
||||
|
||||
#ifndef _INCLUDE__BASE__INTERNAL__STACK_AREA_H_
|
||||
#define _INCLUDE__BASE__INTERNAL__STACK_AREA_H_
|
||||
|
||||
#include <base/stdint.h>
|
||||
|
||||
namespace Genode {
|
||||
|
||||
static constexpr addr_t stack_area_virtual_base() { return 0xa0000000UL; }
|
||||
static constexpr addr_t stack_area_virtual_size() { return 0x10000000UL; }
|
||||
static constexpr addr_t stack_virtual_size() { return 0x00100000UL; }
|
||||
}
|
||||
|
||||
#endif /* _INCLUDE__BASE__INTERNAL__STACK_AREA_H_ */
|
17
repos/base-nova/src/lib/base/stack_area_addr.cc
Normal file
17
repos/base-nova/src/lib/base/stack_area_addr.cc
Normal file
@ -0,0 +1,17 @@
|
||||
/*
|
||||
* \brief Component-local stack area base address for NOVA
|
||||
* \author Stefan Kalkowski
|
||||
* \date 2017-06-02
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2017 Genode Labs GmbH
|
||||
*
|
||||
* This file is part of the Genode OS framework, which is distributed
|
||||
* under the terms of the GNU Affero General Public License version 3.
|
||||
*/
|
||||
|
||||
/* base-internal includes */
|
||||
#include <base/internal/stack_area.h>
|
||||
|
||||
Genode::addr_t Genode::stack_area_virtual_base() { return 0xa0000000UL; }
|
@ -11,3 +11,4 @@ LIBS += startup-okl4 syscall-okl4
|
||||
SRC_CC += capability.cc capability_raw.cc
|
||||
SRC_CC += rpc_dispatch_loop.cc
|
||||
SRC_CC += thread.cc thread_bootstrap.cc thread_myself.cc
|
||||
SRC_CC += stack_area_addr.cc
|
||||
|
@ -11,6 +11,7 @@ LIBS += startup-pistachio syscall-pistachio
|
||||
SRC_CC += capability.cc capability_raw.cc
|
||||
SRC_CC += rpc_dispatch_loop.cc
|
||||
SRC_CC += thread.cc thread_bootstrap.cc thread_myself.cc
|
||||
SRC_CC += stack_area_addr.cc
|
||||
|
||||
# suppress warning caused by Pistachio's 'l4/message.h'
|
||||
CC_WARN += -Wno-array-bounds
|
||||
|
@ -11,3 +11,4 @@ LIBS += startup-sel4 syscall-sel4
|
||||
SRC_CC += rpc_dispatch_loop.cc
|
||||
SRC_CC += thread.cc thread_myself.cc thread_bootstrap.cc
|
||||
SRC_CC += capability.cc capability_raw.cc
|
||||
SRC_CC += stack_area_addr.cc
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
namespace Genode {
|
||||
|
||||
static constexpr addr_t stack_area_virtual_base() { return 0x40000000UL; }
|
||||
addr_t stack_area_virtual_base();
|
||||
static constexpr addr_t stack_area_virtual_size() { return 0x10000000UL; }
|
||||
static constexpr addr_t stack_virtual_size() { return 0x00100000UL; }
|
||||
}
|
||||
|
17
repos/base/src/lib/base/stack_area_addr.cc
Normal file
17
repos/base/src/lib/base/stack_area_addr.cc
Normal file
@ -0,0 +1,17 @@
|
||||
/*
|
||||
* \brief Component-local stack area base address
|
||||
* \author Stefan Kalkowski
|
||||
* \date 2017-06-02
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2017 Genode Labs GmbH
|
||||
*
|
||||
* This file is part of the Genode OS framework, which is distributed
|
||||
* under the terms of the GNU Affero General Public License version 3.
|
||||
*/
|
||||
|
||||
/* base-internal includes */
|
||||
#include <base/internal/stack_area.h>
|
||||
|
||||
Genode::addr_t Genode::stack_area_virtual_base() { return 0x40000000UL; }
|
Loading…
Reference in New Issue
Block a user