diff --git a/repos/base-sel4/lib/mk/base-common.inc b/repos/base-sel4/lib/mk/base-common.inc index fd4fa6f871..5a71e30220 100644 --- a/repos/base-sel4/lib/mk/base-common.inc +++ b/repos/base-sel4/lib/mk/base-common.inc @@ -16,12 +16,14 @@ SRC_CC += child/child.cc SRC_CC += process/process.cc SRC_CC += elf/elf_binary.cc SRC_CC += lock/lock.cc -SRC_CC += signal/signal.cc signal/common.cc -SRC_CC += server/server.cc -#SRC_CC += thread/thread.cc +SRC_CC += signal/signal.cc signal/common.cc signal/platform.cc +SRC_CC += server/server.cc server/common.cc +SRC_CC += pager/pager.cc pager/common.cc +SRC_CC += thread/thread.cc SRC_CC += thread/trace.cc SRC_CC += thread/myself.cc SRC_CC += thread/context_allocator.cc +SRC_CC += thread/thread_bootstrap.cc #SRC_CC += env/cap_map.cc INC_DIR += $(REP_DIR)/src/base/lock diff --git a/repos/base-sel4/src/base/ipc/ipc.cc b/repos/base-sel4/src/base/ipc/ipc.cc index b78a0a8499..dbf13d4e32 100644 --- a/repos/base-sel4/src/base/ipc/ipc.cc +++ b/repos/base-sel4/src/base/ipc/ipc.cc @@ -20,6 +20,22 @@ using namespace Genode; +/***************************** + ** IPC marshalling support ** + *****************************/ + +void Ipc_ostream::_marshal_capability(Native_capability const &cap) +{ + PDBG("not implemented"); +} + + +void Ipc_istream::_unmarshal_capability(Native_capability &cap) +{ + PDBG("not implemented"); +} + + /***************** ** Ipc_ostream ** *****************/ diff --git a/repos/base-sel4/src/base/pager/pager.cc b/repos/base-sel4/src/base/pager/pager.cc new file mode 100644 index 0000000000..24090bef2e --- /dev/null +++ b/repos/base-sel4/src/base/pager/pager.cc @@ -0,0 +1,69 @@ +/* + * \brief Pager framework + * \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 +#include + +using namespace Genode; + + +/********************** + ** Pager activation ** + **********************/ + +void Pager_activation_base::entry() +{ + Ipc_pager pager; + _cap = pager; + _cap_valid.unlock(); + + while (1) { + + PDBG("not implemented"); + sleep_forever(); + } +} + + +/********************** + ** Pager entrypoint ** + **********************/ + +Pager_entrypoint::Pager_entrypoint(Cap_session *, Pager_activation_base *a) +: _activation(a) +{ _activation->ep(this); } + + +void Pager_entrypoint::dissolve(Pager_object *obj) +{ + remove_locked(obj); +} + + +Pager_capability Pager_entrypoint::manage(Pager_object *obj) +{ + /* return invalid capability if no activation is present */ + if (!_activation) return Pager_capability(); + + _activation->cap(); + + Untyped_capability cap = Native_capability(_activation->cap().dst(), obj->badge()); + + /* add server object to object pool */ + obj->cap(cap); + insert(obj); + + /* return capability that uses the object id as badge */ + return reinterpret_cap_cast(cap); +}