base-foc: fix placement of utcb area stack area

This commit ensures that UTCB areas of PDs are positioned relative to
the stack areas of regular components, not the one of core.

Fixes #3108
This commit is contained in:
Norman Feske 2019-01-09 12:33:09 +01:00
parent 3f60dcfae8
commit 97e3d05f37
3 changed files with 27 additions and 2 deletions

View File

@ -31,6 +31,7 @@
/* base-internal includes */
#include <base/internal/stack_area.h>
#include <base/internal/non_core_stack_area_addr.h>
/* Fiasco.OC includes */
namespace Fiasco {
@ -57,7 +58,7 @@ namespace Genode {
addr_t utcb_area_start()
{
return stack_area_virtual_base() +
return NON_CORE_STACK_AREA_ADDR +
THREAD_MAX*stack_virtual_size();
}

View File

@ -0,0 +1,23 @@
/*
* \brief Definition of the stack area outside of core
* \author Norman Feske
* \date 2019-01-09
*/
/*
* Copyright (C) 2019 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__NON_CORE_STACK_AREA_ADDR_H_
#define _INCLUDE__BASE__INTERNAL__NON_CORE_STACK_AREA_ADDR_H_
namespace Genode
{
static constexpr addr_t NON_CORE_STACK_AREA_ADDR = 0x40000000UL;
}
#endif /* _INCLUDE__BASE__INTERNAL__NON_CORE_STACK_AREA_ADDR_H_ */

View File

@ -13,5 +13,6 @@
/* base-internal includes */
#include <base/internal/stack_area.h>
#include <base/internal/non_core_stack_area_addr.h>
Genode::addr_t Genode::stack_area_virtual_base() { return 0x40000000UL; }
Genode::addr_t Genode::stack_area_virtual_base() { return NON_CORE_STACK_AREA_ADDR; }