mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-07 11:27:29 +00:00
sel4: add base.mk lib to build and link init
This commit is contained in:
parent
6ffba0e473
commit
56ec0ad172
18
repos/base-sel4/lib/mk/base.mk
Normal file
18
repos/base-sel4/lib/mk/base.mk
Normal 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
|
18
repos/base-sel4/src/base/env/capability_space.cc
vendored
18
repos/base-sel4/src/base/env/capability_space.cc
vendored
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
30
repos/base-sel4/src/base/thread/thread_init.cc
Normal file
30
repos/base-sel4/src/base/thread/thread_init.cc
Normal 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");
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user