sel4: add base.mk lib to build and link init

This commit is contained in:
Norman Feske 2015-05-11 17:54:11 +02:00 committed by Christian Helmuth
parent 6ffba0e473
commit 56ec0ad172
3 changed files with 57 additions and 9 deletions

View File

@ -0,0 +1,18 @@
#
# \brief Portions of base library that are exclusive to non-core processes
# \author Norman Feske
# \date 2013-02-14
#
LIBS += base-common syscall
SRC_CC += console/log_console.cc
SRC_CC += env/env.cc env/context_area.cc env/reinitialize.cc
SRC_CC += env/capability_space.cc
SRC_CC += thread/thread_start.cc thread/thread_init.cc
INC_DIR += $(REP_DIR)/src/base
INC_DIR += $(BASE_DIR)/src/base/env
vpath %.cc $(REP_DIR)/src/base
vpath %.cc $(BASE_DIR)/src/base

View File

@ -1,7 +1,7 @@
/*
* \brief Instance of the component's local capability space
* \brief Instance of the (Genode) capability space for non-core components
* \author Norman Feske
* \date 2015-05-08
* \date 2015-05-11
*/
/*
@ -19,14 +19,12 @@
#include <internal/capability_data.h>
#include <internal/capability_space_sel4.h>
/**
* Definition of capability meta data
*/
struct Genode::Native_capability::Data : Capability_data
{
Data(Rpc_obj_key key) : Capability_data(key) { }
Data() { }
};
@ -35,13 +33,13 @@ using namespace Genode;
/**
* Singleton instance of core-specific capability space
* Singleton instance of component-local capability space
*/
namespace {
struct Local_capability_space
:
Capability_space_sel4<8*1024, Native_capability::Data>
Capability_space_sel4<4*1024, 1024UL, Native_capability::Data>
{ };
static Local_capability_space &local_capability_space()
@ -56,12 +54,14 @@ namespace {
** Implementation of the Capability_space interface **
******************************************************/
Native_capability::Data &Capability_space::create_ep_cap(Thread_base &ep_thread)
Native_capability Capability_space::create_ep_cap(Thread_base &ep_thread)
{
unsigned const ep_sel = ep_thread.tid().ep_sel;
return local_capability_space().create_capability(ep_sel,
Rpc_obj_key());
Native_capability::Data &data =
local_capability_space().create_capability(ep_sel, Rpc_obj_key());
return Native_capability(data);
}

View File

@ -0,0 +1,30 @@
/*
* \brief Implementation of Thread API interface
* \author Norman Feske
* \date 2015-05-01
*/
/*
* Copyright (C) 2015 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
*/
/* Genode includes */
#include <base/thread.h>
#include <base/printf.h>
#include <base/sleep.h>
using namespace Genode;
void Thread_base::_init_platform_thread(size_t, Type type)
{
/*
* XXX initialize the 'Native_thread' structure with the thread's
* tcb_sel, ep_sel.
*/
PDBG("not implemented");
}