parent
0188b08f6a
commit
146292dba9
|
@ -1,7 +0,0 @@
|
||||||
This repository contains dummy implementations of platform-specific Genode APIs
|
|
||||||
to enable the compilation of Genode for the host platform. Because the
|
|
||||||
repository provides only dummy implementations, most of the generated binaries
|
|
||||||
will not work. However, the repository serves two important purposes. It
|
|
||||||
documents the platform- specific APIs that must be filled out when porting
|
|
||||||
Genode to another platform, and it is the build environment for unit tests
|
|
||||||
executed on the host platform.
|
|
|
@ -1,13 +0,0 @@
|
||||||
#
|
|
||||||
# Description of build platform
|
|
||||||
#
|
|
||||||
|
|
||||||
#
|
|
||||||
# If you want to build the host-specific Genode
|
|
||||||
# binaries, use this config option.
|
|
||||||
#
|
|
||||||
ifeq ($(shell uname -m),x86_64)
|
|
||||||
SPECS ?= host x86_64
|
|
||||||
else
|
|
||||||
SPECS ?= host x86_32
|
|
||||||
endif
|
|
|
@ -1,4 +0,0 @@
|
||||||
#
|
|
||||||
# Use the default host compiler instead of the Genode tool chain
|
|
||||||
#
|
|
||||||
CROSS_DEV_PREFIX =
|
|
|
@ -1,39 +0,0 @@
|
||||||
/*
|
|
||||||
* \brief Dummy IPC message buffer
|
|
||||||
* \author Norman Feske
|
|
||||||
* \date 2009-10-02
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (C) 2009-2013 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _INCLUDE__BASE__IPC_MSGBUF_H_
|
|
||||||
#define _INCLUDE__BASE__IPC_MSGBUF_H_
|
|
||||||
|
|
||||||
namespace Genode {
|
|
||||||
|
|
||||||
class Msgbuf_base
|
|
||||||
{
|
|
||||||
private:
|
|
||||||
|
|
||||||
size_t _size;
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
char buf[];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return size of message buffer
|
|
||||||
*/
|
|
||||||
inline size_t size() const { return _size; };
|
|
||||||
};
|
|
||||||
|
|
||||||
template <unsigned BUF_SIZE>
|
|
||||||
class Msgbuf : public Msgbuf_base { };
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* _INCLUDE__BASE__IPC_MSGBUF_H_ */
|
|
|
@ -1,141 +0,0 @@
|
||||||
/*
|
|
||||||
* \brief Dummy pager support for Genode
|
|
||||||
* \author Norman Feske
|
|
||||||
* \date 2009-10-02
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (C) 2009-2013 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _INCLUDE__BASE__IPC_PAGER_H_
|
|
||||||
#define _INCLUDE__BASE__IPC_PAGER_H_
|
|
||||||
|
|
||||||
#include <base/cache.h>
|
|
||||||
#include <base/ipc.h>
|
|
||||||
#include <base/stdint.h>
|
|
||||||
#include <base/native_types.h>
|
|
||||||
|
|
||||||
namespace Genode {
|
|
||||||
|
|
||||||
class Mapping
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
Mapping(addr_t dst_addr, addr_t src_addr,
|
|
||||||
Cache_attribute, bool io_mem,
|
|
||||||
unsigned l2size = 12, bool rw = true) { }
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Construct invalid mapping
|
|
||||||
*/
|
|
||||||
Mapping() { }
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Prepare map operation
|
|
||||||
*/
|
|
||||||
void prepare_map_operation() { }
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Special paging server class
|
|
||||||
*/
|
|
||||||
class Ipc_pager : public Native_capability
|
|
||||||
{
|
|
||||||
protected:
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Wait for short-message (register) IPC -- pagefault
|
|
||||||
*/
|
|
||||||
void _wait() { }
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Send short flex page and
|
|
||||||
* wait for next short-message (register) IPC -- pagefault
|
|
||||||
*/
|
|
||||||
void _reply_and_wait() { }
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
Ipc_pager() { }
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Wait for a new fault received as short message IPC
|
|
||||||
*/
|
|
||||||
void wait_for_fault() { }
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reply current page-fault and wait for a new one
|
|
||||||
*
|
|
||||||
* Send short flex page and wait for next short-message (register)
|
|
||||||
* IPC -- fault
|
|
||||||
*/
|
|
||||||
void reply_and_wait_for_fault() { }
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Request instruction pointer of current page fault
|
|
||||||
*/
|
|
||||||
addr_t fault_ip() { return 0; }
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Request fault address of current page fault
|
|
||||||
*/
|
|
||||||
addr_t fault_addr() { return 0; }
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set parameters for next reply
|
|
||||||
*/
|
|
||||||
void set_reply_mapping(Mapping m) { }
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set destination for next reply
|
|
||||||
*/
|
|
||||||
void set_reply_dst(Native_capability pager_object) { }
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Answer call without sending a flex-page mapping
|
|
||||||
*
|
|
||||||
* This function is used to acknowledge local calls from one of
|
|
||||||
* core's region-manager sessions.
|
|
||||||
*/
|
|
||||||
void acknowledge_wakeup() { }
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return thread ID of last faulter
|
|
||||||
*/
|
|
||||||
Native_thread_id last() const { return 0; }
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return badge for faulting thread
|
|
||||||
*/
|
|
||||||
unsigned long badge() const { return 0; }
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return true if last fault was a write fault
|
|
||||||
*/
|
|
||||||
bool is_write_fault() const { return false; }
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return true if last fault was an exception
|
|
||||||
*/
|
|
||||||
bool is_exception() const
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
* Reflection of exceptions is not supported on this platform.
|
|
||||||
*/
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* _INCLUDE__BASE__IPC_PAGER_H_ */
|
|
|
@ -1,54 +0,0 @@
|
||||||
/*
|
|
||||||
* \brief Dummy definitions for native types used for compiling unit tests
|
|
||||||
* \author Norman Feske
|
|
||||||
* \date 2009-10-02
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (C) 2009-2013 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _INCLUDE__BASE__NATIVE_TYPES_H_
|
|
||||||
#define _INCLUDE__BASE__NATIVE_TYPES_H_
|
|
||||||
|
|
||||||
#include <base/native_capability.h>
|
|
||||||
#include <base/stdint.h>
|
|
||||||
|
|
||||||
namespace Genode {
|
|
||||||
|
|
||||||
struct Cap_dst_policy {
|
|
||||||
typedef int Dst;
|
|
||||||
static bool valid(Dst) { return false; }
|
|
||||||
static Dst invalid() { return false; }
|
|
||||||
static void copy(void* dst, Native_capability_tpl<Cap_dst_policy>* src);
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef int Native_thread;
|
|
||||||
typedef Native_thread Native_thread_id;
|
|
||||||
typedef struct { } Native_utcb;
|
|
||||||
typedef int Native_connection_state;
|
|
||||||
typedef Native_capability_tpl<Cap_dst_policy> Native_capability;
|
|
||||||
|
|
||||||
struct Native_config
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Thread-context area configuration.
|
|
||||||
*/
|
|
||||||
static constexpr addr_t context_area_virtual_base() {
|
|
||||||
return 0x40000000UL; }
|
|
||||||
static constexpr addr_t context_area_virtual_size() {
|
|
||||||
return 0x10000000UL; }
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Size of virtual address region holding the context of one thread
|
|
||||||
*/
|
|
||||||
static constexpr addr_t context_virtual_size() { return 0x00100000UL; }
|
|
||||||
};
|
|
||||||
|
|
||||||
struct Native_pd_args { };
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* _INCLUDE__BASE__NATIVE_TYPES_H_ */
|
|
|
@ -1,31 +0,0 @@
|
||||||
#
|
|
||||||
# \brief Portions of base library shared by core and non-core processes
|
|
||||||
# \author Norman Feske
|
|
||||||
# \date 2013-02-14
|
|
||||||
#
|
|
||||||
|
|
||||||
LIBS += cxx
|
|
||||||
|
|
||||||
SRC_CC += cap_copy.cc
|
|
||||||
SRC_CC += ipc/ipc.cc ipc/ipc_marshal_cap.cc
|
|
||||||
SRC_CC += pager/pager.cc pager/common.cc
|
|
||||||
SRC_CC += avl_tree/avl_tree.cc
|
|
||||||
SRC_CC += allocator/slab.cc
|
|
||||||
SRC_CC += allocator/allocator_avl.cc
|
|
||||||
SRC_CC += heap/heap.cc heap/sliced_heap.cc
|
|
||||||
SRC_CC += console/console.cc
|
|
||||||
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 signal/platform.cc
|
|
||||||
SRC_CC += server/server.cc server/common.cc
|
|
||||||
SRC_CC += thread/thread.cc thread/thread_bootstrap_empty.cc
|
|
||||||
|
|
||||||
INC_DIR += $(REP_DIR)/src/base/lock
|
|
||||||
INC_DIR += $(BASE_DIR)/src/platform $(REP_DIR)/src/platform
|
|
||||||
|
|
||||||
vpath cap_copy.cc $(BASE_DIR)/src/platform
|
|
||||||
vpath %.cc $(BASE_DIR)/src/base
|
|
||||||
vpath %.cc $(REP_DIR)/src/base
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
SRC_CC += new_delete.cc
|
|
||||||
|
|
||||||
vpath %.cc $(BASE_DIR)/src/base/cxx
|
|
||||||
|
|
24
repos/base-host/src/base/env/parent.cc
vendored
24
repos/base-host/src/base/env/parent.cc
vendored
|
@ -1,24 +0,0 @@
|
||||||
/*
|
|
||||||
* \brief Access to pseudo parent capability
|
|
||||||
* \author Norman Feske
|
|
||||||
* \date 2009-10-02
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (C) 2009-2013 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <base/capability.h>
|
|
||||||
|
|
||||||
namespace Genode {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return parent capability
|
|
||||||
*
|
|
||||||
* This function is normally provided by the 'startup' library.
|
|
||||||
*/
|
|
||||||
Native_capability parent_cap() { return Native_capability(); }
|
|
||||||
}
|
|
|
@ -1,77 +0,0 @@
|
||||||
/*
|
|
||||||
* \brief Dummy implementation of the IPC API
|
|
||||||
* \author Norman Feske
|
|
||||||
* \date 2009-10-02
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (C) 2009-2013 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/ipc.h>
|
|
||||||
|
|
||||||
using namespace Genode;
|
|
||||||
|
|
||||||
|
|
||||||
/*****************
|
|
||||||
** Ipc_ostream **
|
|
||||||
*****************/
|
|
||||||
|
|
||||||
Ipc_ostream::Ipc_ostream(Native_capability dst, Msgbuf_base *snd_msg)
|
|
||||||
:
|
|
||||||
Ipc_marshaller(&snd_msg->buf[0], snd_msg->size()),
|
|
||||||
_snd_msg(snd_msg), _dst(dst)
|
|
||||||
{ }
|
|
||||||
|
|
||||||
|
|
||||||
/*****************
|
|
||||||
** Ipc_istream **
|
|
||||||
*****************/
|
|
||||||
|
|
||||||
void Ipc_istream::_wait()
|
|
||||||
{ }
|
|
||||||
|
|
||||||
|
|
||||||
Ipc_istream::Ipc_istream(Msgbuf_base *rcv_msg) :
|
|
||||||
Ipc_unmarshaller(&rcv_msg->buf[0], rcv_msg->size()),
|
|
||||||
_rcv_msg(rcv_msg)
|
|
||||||
{ }
|
|
||||||
|
|
||||||
|
|
||||||
Ipc_istream::~Ipc_istream() { }
|
|
||||||
|
|
||||||
|
|
||||||
/****************
|
|
||||||
** Ipc_client **
|
|
||||||
****************/
|
|
||||||
|
|
||||||
void Ipc_client::_call() { }
|
|
||||||
|
|
||||||
|
|
||||||
Ipc_client::Ipc_client(Native_capability const &srv, Msgbuf_base *snd_msg,
|
|
||||||
Msgbuf_base *rcv_msg, unsigned short)
|
|
||||||
: Ipc_istream(rcv_msg), Ipc_ostream(srv, snd_msg), _result(0)
|
|
||||||
{ }
|
|
||||||
|
|
||||||
|
|
||||||
/****************
|
|
||||||
** Ipc_server **
|
|
||||||
****************/
|
|
||||||
|
|
||||||
void Ipc_server::_wait() { }
|
|
||||||
|
|
||||||
|
|
||||||
void Ipc_server::_reply() { }
|
|
||||||
|
|
||||||
|
|
||||||
void Ipc_server::_reply_wait() { }
|
|
||||||
|
|
||||||
|
|
||||||
Ipc_server::Ipc_server(Msgbuf_base *snd_msg,
|
|
||||||
Msgbuf_base *rcv_msg)
|
|
||||||
: Ipc_istream(rcv_msg), Ipc_ostream(Native_capability(), snd_msg)
|
|
||||||
{ }
|
|
|
@ -1,35 +0,0 @@
|
||||||
/*
|
|
||||||
* \brief Dummy helper functions for the Lock implementation
|
|
||||||
* \author Norman Feske
|
|
||||||
* \date 2009-10-02
|
|
||||||
*
|
|
||||||
* For documentation about the interface, please revisit the 'base-pistachio'
|
|
||||||
* implementation.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (C) 2009-2013 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/native_types.h>
|
|
||||||
#include <base/thread.h>
|
|
||||||
|
|
||||||
|
|
||||||
static inline void thread_yield() { }
|
|
||||||
|
|
||||||
|
|
||||||
static bool thread_check_stopped_and_restart(Genode::Thread_base *)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static inline void thread_switch_to(Genode::Thread_base *)
|
|
||||||
{ }
|
|
||||||
|
|
||||||
|
|
||||||
static inline void thread_stop_myself() { while (true); }
|
|
|
@ -1,57 +0,0 @@
|
||||||
/*
|
|
||||||
* \brief Dummy pager framework
|
|
||||||
* \author Norman Feske
|
|
||||||
* \date 2009-10-02
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (C) 2009-2013 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <base/pager.h>
|
|
||||||
|
|
||||||
using namespace Genode;
|
|
||||||
|
|
||||||
|
|
||||||
/**********************
|
|
||||||
** Pager activation **
|
|
||||||
**********************/
|
|
||||||
|
|
||||||
void Pager_activation_base::entry()
|
|
||||||
{
|
|
||||||
while (1);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**********************
|
|
||||||
** 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();
|
|
||||||
|
|
||||||
Native_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<Pager_object>(cap);
|
|
||||||
}
|
|
|
@ -1,92 +0,0 @@
|
||||||
/*
|
|
||||||
* \brief Support code for the thread API
|
|
||||||
* \author Norman Feske
|
|
||||||
* \date 2010-01-13
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (C) 2010-2013 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 <rm_session/rm_session.h>
|
|
||||||
#include <ram_session/ram_session.h>
|
|
||||||
#include <base/printf.h>
|
|
||||||
#include <base/thread.h>
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Region-manager session for allocating thread contexts
|
|
||||||
*/
|
|
||||||
class Context_area_rm_session : public Genode::Rm_session
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Attach backing store to thread-context area
|
|
||||||
*/
|
|
||||||
Local_addr attach(Genode::Dataspace_capability ds_cap,
|
|
||||||
Genode::size_t size, Genode::off_t offset,
|
|
||||||
bool use_local_addr, Local_addr local_addr, bool)
|
|
||||||
{
|
|
||||||
PWRN("not implemented");
|
|
||||||
return local_addr;
|
|
||||||
}
|
|
||||||
|
|
||||||
void detach(Local_addr local_addr) {
|
|
||||||
PWRN("context area detach from 0x%p - not implemented", (void *)local_addr); }
|
|
||||||
|
|
||||||
Genode::Pager_capability add_client(Genode::Thread_capability) {
|
|
||||||
return Genode::Pager_capability(); }
|
|
||||||
|
|
||||||
void remove_client(Genode::Pager_capability) { }
|
|
||||||
|
|
||||||
void fault_handler(Genode::Signal_context_capability) { }
|
|
||||||
|
|
||||||
State state() { return State(); }
|
|
||||||
|
|
||||||
Genode::Dataspace_capability dataspace() {
|
|
||||||
return Genode::Dataspace_capability(); }
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
class Context_area_ram_session : public Genode::Ram_session
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
Genode::Ram_dataspace_capability alloc(Genode::size_t size, bool) {
|
|
||||||
return Genode::Ram_dataspace_capability(); }
|
|
||||||
|
|
||||||
void free(Genode::Ram_dataspace_capability) { }
|
|
||||||
|
|
||||||
int ref_account(Genode::Ram_session_capability) { return 0; }
|
|
||||||
|
|
||||||
int transfer_quota(Genode::Ram_session_capability, Genode::size_t) { return 0; }
|
|
||||||
|
|
||||||
Genode::size_t quota() { return 0; }
|
|
||||||
|
|
||||||
Genode::size_t used() { return 0; }
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return single instance of the context-area RM and RAM session
|
|
||||||
*/
|
|
||||||
namespace Genode {
|
|
||||||
|
|
||||||
Rm_session *env_context_area_rm_session()
|
|
||||||
{
|
|
||||||
static Context_area_rm_session inst;
|
|
||||||
return &inst;
|
|
||||||
}
|
|
||||||
|
|
||||||
Ram_session *env_context_area_ram_session()
|
|
||||||
{
|
|
||||||
static Context_area_ram_session inst;
|
|
||||||
return &inst;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,30 +0,0 @@
|
||||||
/*
|
|
||||||
* \brief Core-local RM session
|
|
||||||
* \author Norman Feske
|
|
||||||
* \date 2009-10-02
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (C) 2009-2013 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/printf.h>
|
|
||||||
|
|
||||||
/* core includes */
|
|
||||||
#include <core_rm_session.h>
|
|
||||||
|
|
||||||
using namespace Genode;
|
|
||||||
|
|
||||||
|
|
||||||
Rm_session::Local_addr
|
|
||||||
Core_rm_session::attach(Dataspace_capability ds_cap, size_t size,
|
|
||||||
off_t offset, bool use_local_addr,
|
|
||||||
Rm_session::Local_addr local_addr, bool)
|
|
||||||
{
|
|
||||||
PWRN("not implemented");
|
|
||||||
return 0;
|
|
||||||
}
|
|
|
@ -1,28 +0,0 @@
|
||||||
/*
|
|
||||||
* \brief Platform-specific parts of cores CPU-session interface
|
|
||||||
* \author Martin Stein
|
|
||||||
* \date 2012-04-17
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (C) 2009-2013 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/printf.h>
|
|
||||||
|
|
||||||
/* Core includes */
|
|
||||||
#include <cpu_session_component.h>
|
|
||||||
|
|
||||||
using namespace Genode;
|
|
||||||
|
|
||||||
|
|
||||||
Ram_dataspace_capability Cpu_session_component::utcb(Thread_capability thread_cap)
|
|
||||||
{
|
|
||||||
PERR("%s: Not implemented", __PRETTY_FUNCTION__);
|
|
||||||
return Ram_dataspace_capability();
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,50 +0,0 @@
|
||||||
/*
|
|
||||||
* \brief Core-local region manager session
|
|
||||||
* \author Norman Feske
|
|
||||||
* \date 2009-10-02
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (C) 2009-2013 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _CORE__INCLUDE__CORE_RM_SESSION_H_
|
|
||||||
#define _CORE__INCLUDE__CORE_RM_SESSION_H_
|
|
||||||
|
|
||||||
/* Genode includes */
|
|
||||||
#include <rm_session/rm_session.h>
|
|
||||||
|
|
||||||
/* core includes */
|
|
||||||
#include <dataspace_component.h>
|
|
||||||
|
|
||||||
namespace Genode {
|
|
||||||
|
|
||||||
class Core_rm_session : public Rm_session
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
Core_rm_session(Rpc_entrypoint *ds_ep) { }
|
|
||||||
|
|
||||||
Local_addr attach(Dataspace_capability ds_cap, size_t size=0,
|
|
||||||
off_t offset=0, bool use_local_addr = false,
|
|
||||||
Local_addr local_addr = 0, bool = false);
|
|
||||||
|
|
||||||
void detach(Local_addr local_addr) { }
|
|
||||||
|
|
||||||
Pager_capability add_client(Thread_capability thread) {
|
|
||||||
return Pager_capability(); }
|
|
||||||
|
|
||||||
void remove_client(Pager_capability) { }
|
|
||||||
|
|
||||||
void fault_handler(Signal_context_capability handler) { }
|
|
||||||
|
|
||||||
State state() { return State(); }
|
|
||||||
|
|
||||||
Dataspace_capability dataspace() { return Dataspace_capability(); }
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* _CORE__INCLUDE__CORE_RM_SESSION_H_ */
|
|
|
@ -1,50 +0,0 @@
|
||||||
/*
|
|
||||||
* \brief Platform interface
|
|
||||||
* \author Norman Feske
|
|
||||||
* \date 2009-10-02
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (C) 2009-2013 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _CORE__INCLUDE__PLATFORM_H_
|
|
||||||
#define _CORE__INCLUDE__PLATFORM_H_
|
|
||||||
|
|
||||||
/* core includes */
|
|
||||||
#include <platform_generic.h>
|
|
||||||
|
|
||||||
namespace Genode {
|
|
||||||
|
|
||||||
class Platform : public Platform_generic
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
Platform();
|
|
||||||
|
|
||||||
|
|
||||||
/********************************
|
|
||||||
** Generic platform interface **
|
|
||||||
********************************/
|
|
||||||
|
|
||||||
Range_allocator *ram_alloc() { return 0; }
|
|
||||||
Range_allocator *io_mem_alloc() { return 0; }
|
|
||||||
Range_allocator *io_port_alloc() { return 0; }
|
|
||||||
Range_allocator *irq_alloc() { return 0; }
|
|
||||||
Range_allocator *region_alloc() { return 0; }
|
|
||||||
Range_allocator *core_mem_alloc() { return 0; }
|
|
||||||
addr_t vm_start() const { return 0; }
|
|
||||||
size_t vm_size() const { return 0; }
|
|
||||||
Rom_fs *rom_fs() { return 0; }
|
|
||||||
|
|
||||||
void wait_for_exit();
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* _CORE__INCLUDE__PLATFORM_H_ */
|
|
|
@ -1,60 +0,0 @@
|
||||||
/*
|
|
||||||
* \brief Protection-domain facility
|
|
||||||
* \author Norman Feske
|
|
||||||
* \date 2009-10-02
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (C) 2009-2013 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _CORE__INCLUDE__PLATFORM_PD_H_
|
|
||||||
#define _CORE__INCLUDE__PLATFORM_PD_H_
|
|
||||||
|
|
||||||
#include <platform_thread.h>
|
|
||||||
|
|
||||||
namespace Genode {
|
|
||||||
|
|
||||||
class Platform_thread;
|
|
||||||
class Platform_pd
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructors
|
|
||||||
*/
|
|
||||||
Platform_pd(bool core);
|
|
||||||
Platform_pd(Allocator * md_alloc, size_t ram_quota,
|
|
||||||
char const *, signed pd_id = -1, bool create = true);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Destructor
|
|
||||||
*/
|
|
||||||
~Platform_pd();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Bind thread to protection domain
|
|
||||||
*
|
|
||||||
* \return 0 on success or
|
|
||||||
* -1 if thread ID allocation failed.
|
|
||||||
*/
|
|
||||||
int bind_thread(Platform_thread *thread);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Unbind thread from protection domain
|
|
||||||
*
|
|
||||||
* Free the thread's slot and update thread object.
|
|
||||||
*/
|
|
||||||
void unbind_thread(Platform_thread *thread);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Assign parent interface to protection domain
|
|
||||||
*/
|
|
||||||
int assign_parent(Native_capability parent) { return 0; }
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* _CORE__INCLUDE__PLATFORM_PD_H_ */
|
|
|
@ -1,119 +0,0 @@
|
||||||
/*
|
|
||||||
* \brief Thread facility
|
|
||||||
* \author Norman Feske
|
|
||||||
* \date 2009-10-02
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (C) 2009-2013 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _CORE__INCLUDE__PLATFORM_THREAD_H_
|
|
||||||
#define _CORE__INCLUDE__PLATFORM_THREAD_H_
|
|
||||||
|
|
||||||
/* Genode includes */
|
|
||||||
#include <base/pager.h>
|
|
||||||
#include <base/thread_state.h>
|
|
||||||
#include <base/native_types.h>
|
|
||||||
|
|
||||||
/* core includes */
|
|
||||||
#include <address_space.h>
|
|
||||||
|
|
||||||
namespace Genode {
|
|
||||||
|
|
||||||
class Platform_pd;
|
|
||||||
class Platform_thread
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
enum { THREAD_INVALID = -1 }; /* invalid thread number */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
Platform_thread(const char *name = 0, unsigned priority = 0,
|
|
||||||
addr_t utcb = 0, int thread_id = THREAD_INVALID);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Destructor
|
|
||||||
*/
|
|
||||||
~Platform_thread();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Start thread
|
|
||||||
*
|
|
||||||
* \param ip instruction pointer to start at
|
|
||||||
* \param sp stack pointer to use
|
|
||||||
* \param cpu_no target cpu
|
|
||||||
*
|
|
||||||
* \retval 0 successful
|
|
||||||
* \retval -1 thread could not be started
|
|
||||||
*/
|
|
||||||
int start(void *ip, void *sp, unsigned int cpu_no = 0);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Pause this thread
|
|
||||||
*/
|
|
||||||
void pause();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Resume this thread
|
|
||||||
*/
|
|
||||||
void resume();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Cancel currently blocking operation
|
|
||||||
*/
|
|
||||||
void cancel_blocking();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Override thread state with 's'
|
|
||||||
*
|
|
||||||
* \throw Cpu_session::State_access_failed
|
|
||||||
*/
|
|
||||||
void state(Thread_state s);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Read thread state
|
|
||||||
*
|
|
||||||
* \throw Cpu_session::State_access_failed
|
|
||||||
*/
|
|
||||||
Thread_state state();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return the address space to which the thread is bound
|
|
||||||
*/
|
|
||||||
Weak_ptr<Address_space> address_space();
|
|
||||||
|
|
||||||
|
|
||||||
/************************
|
|
||||||
** Accessor functions **
|
|
||||||
************************/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set/get pager
|
|
||||||
*/
|
|
||||||
void pager(Pager_object *pager) { }
|
|
||||||
Pager_object *pager() const { return 0; }
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return identification of thread when faulting
|
|
||||||
*/
|
|
||||||
unsigned long pager_object_badge() const;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set the executing CPU for this thread
|
|
||||||
*/
|
|
||||||
void affinity(unsigned cpu);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get thread name
|
|
||||||
*/
|
|
||||||
const char *name() const { return "noname"; }
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* _CORE__INCLUDE__PLATFORM_THREAD_H_ */
|
|
|
@ -1,60 +0,0 @@
|
||||||
/*
|
|
||||||
* \brief Core-internal utilities
|
|
||||||
* \author Norman Feske
|
|
||||||
* \date 2009-10-02
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (C) 2009-2013 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _CORE__INCLUDE__UTIL_H_
|
|
||||||
#define _CORE__INCLUDE__UTIL_H_
|
|
||||||
|
|
||||||
/* Genode includes */
|
|
||||||
#include <rm_session/rm_session.h>
|
|
||||||
#include <base/printf.h>
|
|
||||||
|
|
||||||
namespace Genode {
|
|
||||||
|
|
||||||
constexpr size_t get_page_size_log2() { return 12; }
|
|
||||||
constexpr size_t get_page_size() { return 1 << get_page_size_log2(); }
|
|
||||||
constexpr addr_t get_page_mask() { return ~(get_page_size() - 1); }
|
|
||||||
inline addr_t trunc_page(addr_t addr) { return addr & get_page_mask(); }
|
|
||||||
inline addr_t round_page(addr_t addr) { return trunc_page(addr + get_page_size() - 1); }
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Select source used for map operations
|
|
||||||
*/
|
|
||||||
inline addr_t map_src_addr(addr_t core_local, addr_t phys) { return phys; }
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return highest supported flexpage size for the given mapping size
|
|
||||||
*
|
|
||||||
* This function is called by the page-fault handler to determine the
|
|
||||||
* mapping granularity to be used for a page-fault answer. If a kernel
|
|
||||||
* supports flexible page sizes, this function can just return the
|
|
||||||
* argument. If a kernel only supports a certain set of map sizes such
|
|
||||||
* as 4K and 4M, this function should select one of those smaller or
|
|
||||||
* equal to the argument.
|
|
||||||
*/
|
|
||||||
inline size_t constrain_map_size_log2(size_t size_log2)
|
|
||||||
{
|
|
||||||
return get_page_size_log2();
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void print_page_fault(const char *msg, addr_t pf_addr, addr_t pf_ip,
|
|
||||||
Rm_session::Fault_type pf_type,
|
|
||||||
unsigned long faulter_badge)
|
|
||||||
{
|
|
||||||
printf("%s (%s pf_addr=%p pf_ip=%p from %02lx)", msg,
|
|
||||||
pf_type == Rm_session::WRITE_FAULT ? "WRITE" : "READ",
|
|
||||||
(void *)pf_addr, (void *)pf_ip,
|
|
||||||
faulter_badge);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* _CORE__INCLUDE__UTIL_H_ */
|
|
|
@ -1,27 +0,0 @@
|
||||||
/*
|
|
||||||
* \brief Implementation of the IO_MEM session interface
|
|
||||||
* \author Norman Feske
|
|
||||||
* \date 2009-03-29
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (C) 2009-2013 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* core includes */
|
|
||||||
#include <io_mem_session_component.h>
|
|
||||||
|
|
||||||
|
|
||||||
using namespace Genode;
|
|
||||||
|
|
||||||
|
|
||||||
void Io_mem_session_component::_unmap_local(addr_t base, size_t size)
|
|
||||||
{ }
|
|
||||||
|
|
||||||
|
|
||||||
addr_t Io_mem_session_component::_map_local(addr_t base, size_t size)
|
|
||||||
{ return 0; }
|
|
|
@ -1,54 +0,0 @@
|
||||||
/*
|
|
||||||
* \brief Implementation of IRQ session component
|
|
||||||
* \author Norman Feske
|
|
||||||
* \date 2009-10-02
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (C) 2009-2013 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/printf.h>
|
|
||||||
|
|
||||||
/* core includes */
|
|
||||||
#include <irq_root.h>
|
|
||||||
|
|
||||||
|
|
||||||
using namespace Genode;
|
|
||||||
|
|
||||||
|
|
||||||
bool Irq_session_component::Irq_control_component::associate_to_irq(unsigned irq)
|
|
||||||
{
|
|
||||||
PWRN("not implemented");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Irq_session_component::wait_for_irq()
|
|
||||||
{
|
|
||||||
PWRN("not implemented");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Irq_session_component::Irq_session_component(Cap_session *cap_session,
|
|
||||||
Range_allocator *irq_alloc,
|
|
||||||
const char *args)
|
|
||||||
:
|
|
||||||
_irq_alloc(irq_alloc),
|
|
||||||
_ep(cap_session, STACK_SIZE, "irqctrl"),
|
|
||||||
_irq_attached(false),
|
|
||||||
_control_client(Capability<Irq_session_component::Irq_control>())
|
|
||||||
{
|
|
||||||
PWRN("not implemented");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Irq_session_component::~Irq_session_component()
|
|
||||||
{
|
|
||||||
PERR("not yet implemented");
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,41 +0,0 @@
|
||||||
/*
|
|
||||||
* \brief Platform interface implementation
|
|
||||||
* \author Norman Feske
|
|
||||||
* \date 2009-10-02
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (C) 2009-2013 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/printf.h>
|
|
||||||
#include <base/sleep.h>
|
|
||||||
|
|
||||||
/* core includes */
|
|
||||||
#include <core_parent.h>
|
|
||||||
#include <platform.h>
|
|
||||||
|
|
||||||
using namespace Genode;
|
|
||||||
|
|
||||||
|
|
||||||
Platform::Platform()
|
|
||||||
{
|
|
||||||
PWRN("not implemented");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/********************************
|
|
||||||
** Generic platform interface **
|
|
||||||
********************************/
|
|
||||||
|
|
||||||
void Platform::wait_for_exit()
|
|
||||||
{
|
|
||||||
sleep_forever();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Core_parent::exit(int exit_value) { }
|
|
|
@ -1,56 +0,0 @@
|
||||||
/*
|
|
||||||
* \brief Protection-domain facility
|
|
||||||
* \author Norman Feske
|
|
||||||
* \date 2009-10-02
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (C) 2009-2013 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/printf.h>
|
|
||||||
|
|
||||||
/* core includes */
|
|
||||||
#include <platform_pd.h>
|
|
||||||
|
|
||||||
using namespace Genode;
|
|
||||||
|
|
||||||
|
|
||||||
/***************************
|
|
||||||
** Public object members **
|
|
||||||
***************************/
|
|
||||||
|
|
||||||
int Platform_pd::bind_thread(Platform_thread *thread)
|
|
||||||
{
|
|
||||||
PWRN("not implemented");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Platform_pd::unbind_thread(Platform_thread *thread)
|
|
||||||
{
|
|
||||||
PWRN("not implemented");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Platform_pd::Platform_pd(bool core)
|
|
||||||
{
|
|
||||||
PWRN("not yet implemented");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Platform_pd::Platform_pd(Allocator * md_alloc, size_t ram_quota,
|
|
||||||
char const *, signed pd_id, bool create)
|
|
||||||
{
|
|
||||||
PWRN("not yet implemented");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Platform_pd::~Platform_pd()
|
|
||||||
{
|
|
||||||
PWRN("not yet implemented");
|
|
||||||
}
|
|
|
@ -1,93 +0,0 @@
|
||||||
/*
|
|
||||||
* \brief Thread facility
|
|
||||||
* \author Norman Feske
|
|
||||||
* \date 2009-10-02
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (C) 2009-2013 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/printf.h>
|
|
||||||
#include <cpu_session/cpu_session.h>
|
|
||||||
|
|
||||||
/* core includes */
|
|
||||||
#include <platform_thread.h>
|
|
||||||
|
|
||||||
using namespace Genode;
|
|
||||||
|
|
||||||
|
|
||||||
void Platform_thread::affinity(unsigned int cpu_no)
|
|
||||||
{
|
|
||||||
PERR("not yet implemented");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int Platform_thread::start(void *ip, void *sp, unsigned int cpu_no)
|
|
||||||
{
|
|
||||||
PWRN("not implemented");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Platform_thread::pause()
|
|
||||||
{
|
|
||||||
PWRN("not implemented");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Platform_thread::resume()
|
|
||||||
{
|
|
||||||
PWRN("not implemented");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Platform_thread::state(Thread_state s)
|
|
||||||
{
|
|
||||||
PDBG("Not implemented");
|
|
||||||
throw Cpu_session::State_access_failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Thread_state Platform_thread::state()
|
|
||||||
{
|
|
||||||
PDBG("Not implemented");
|
|
||||||
throw Cpu_session::State_access_failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Platform_thread::cancel_blocking()
|
|
||||||
{
|
|
||||||
PWRN("not implemented");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
unsigned long Platform_thread::pager_object_badge() const
|
|
||||||
{
|
|
||||||
PWRN("not implemented");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Weak_ptr<Address_space> Platform_thread::address_space()
|
|
||||||
{
|
|
||||||
PWRN("not implemented");
|
|
||||||
return Weak_ptr<Address_space>();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Platform_thread::Platform_thread(const char *name, unsigned, addr_t,
|
|
||||||
int thread_id)
|
|
||||||
{
|
|
||||||
PWRN("not implemented");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Platform_thread::~Platform_thread()
|
|
||||||
{
|
|
||||||
PWRN("not implemented");
|
|
||||||
}
|
|
|
@ -1,29 +0,0 @@
|
||||||
/*
|
|
||||||
* \brief Export RAM dataspace as shared memory object (dummy)
|
|
||||||
* \author Norman Feske
|
|
||||||
* \date 2009-10-02
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (C) 2009-2013 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/printf.h>
|
|
||||||
|
|
||||||
/* core includes */
|
|
||||||
#include <ram_session_component.h>
|
|
||||||
|
|
||||||
|
|
||||||
using namespace Genode;
|
|
||||||
|
|
||||||
void Ram_session_component::_export_ram_ds(Dataspace_component *ds) { }
|
|
||||||
void Ram_session_component::_revoke_ram_ds(Dataspace_component *ds) { }
|
|
||||||
|
|
||||||
void Ram_session_component::_clear_ds (Dataspace_component *ds)
|
|
||||||
{
|
|
||||||
PWRN("not implemented");
|
|
||||||
}
|
|
|
@ -1,26 +0,0 @@
|
||||||
/*
|
|
||||||
* \brief RM-session implementation
|
|
||||||
* \author Norman Feske
|
|
||||||
* \date 2009-10-02
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (C) 2009-2013 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/printf.h>
|
|
||||||
|
|
||||||
/* core includes */
|
|
||||||
#include <rm_session_component.h>
|
|
||||||
|
|
||||||
using namespace Genode;
|
|
||||||
|
|
||||||
|
|
||||||
void Rm_client::unmap(addr_t core_local_base, addr_t virt_base, size_t size)
|
|
||||||
{
|
|
||||||
PWRN("not implemented");
|
|
||||||
}
|
|
|
@ -1,48 +0,0 @@
|
||||||
TARGET = core
|
|
||||||
LIBS = base-common
|
|
||||||
|
|
||||||
GEN_CORE_DIR = $(BASE_DIR)/src/core
|
|
||||||
|
|
||||||
SRC_CC = \
|
|
||||||
main.cc \
|
|
||||||
ram_session_component.cc \
|
|
||||||
ram_session_support.cc \
|
|
||||||
rom_session_component.cc \
|
|
||||||
cpu_session_component.cc \
|
|
||||||
cpu_session_support.cc \
|
|
||||||
pd_session_component.cc \
|
|
||||||
io_mem_session_component.cc \
|
|
||||||
io_mem_session_support.cc \
|
|
||||||
thread_host.cc \
|
|
||||||
platform_thread.cc \
|
|
||||||
platform_pd.cc \
|
|
||||||
platform.cc \
|
|
||||||
platform_services.cc \
|
|
||||||
dataspace_component.cc \
|
|
||||||
rm_session_component.cc \
|
|
||||||
rm_session_support.cc \
|
|
||||||
irq_session_component.cc \
|
|
||||||
signal_session_component.cc \
|
|
||||||
signal_source_component.cc \
|
|
||||||
core_rm_session.cc \
|
|
||||||
context_area.cc \
|
|
||||||
printf_stdio.cc
|
|
||||||
|
|
||||||
INC_DIR = $(REP_DIR)/src/core/include \
|
|
||||||
$(GEN_CORE_DIR)/include
|
|
||||||
|
|
||||||
vpath main.cc $(GEN_CORE_DIR)
|
|
||||||
vpath ram_session_component.cc $(GEN_CORE_DIR)
|
|
||||||
vpath rom_session_component.cc $(GEN_CORE_DIR)
|
|
||||||
vpath cpu_session_component.cc $(GEN_CORE_DIR)
|
|
||||||
vpath pd_session_component.cc $(GEN_CORE_DIR)
|
|
||||||
vpath rm_session_component.cc $(GEN_CORE_DIR)
|
|
||||||
vpath io_mem_session_component.cc $(GEN_CORE_DIR)
|
|
||||||
vpath io_mem_session_support.cc $(GEN_CORE_DIR)
|
|
||||||
vpath signal_session_component.cc $(GEN_CORE_DIR)
|
|
||||||
vpath signal_source_component.cc $(GEN_CORE_DIR)
|
|
||||||
vpath dataspace_component.cc $(GEN_CORE_DIR)
|
|
||||||
vpath platform_services.cc $(GEN_CORE_DIR)
|
|
||||||
vpath printf_stdio.cc $(REP_DIR)/src/lib/printf_stdio
|
|
||||||
vpath %.cc $(REP_DIR)/src/core
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
include $(PRG_DIR)/target.inc
|
|
|
@ -1,23 +0,0 @@
|
||||||
/*
|
|
||||||
* \brief Implementation of Thread API interface for core
|
|
||||||
* \author Norman Feske
|
|
||||||
* \date 2006-05-03
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (C) 2006-2013 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>
|
|
||||||
|
|
||||||
using namespace Genode;
|
|
||||||
|
|
||||||
void Thread_base::_init_platform_thread(size_t, Type) { }
|
|
||||||
void Thread_base::_deinit_platform_thread() { }
|
|
||||||
void Thread_base::start() { }
|
|
||||||
void Thread_base::cancel_blocking() { }
|
|
|
@ -1,35 +0,0 @@
|
||||||
/*
|
|
||||||
* \brief Genode::printf back-end for stdio
|
|
||||||
* \author Norman Feske
|
|
||||||
* \date 2009-10-06
|
|
||||||
*
|
|
||||||
* This library can be used by unit test executed on the host platform to
|
|
||||||
* direct output from the Genode framework to stdout.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (C) 2009-2013 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <base/printf.h>
|
|
||||||
|
|
||||||
|
|
||||||
void Genode::printf(const char *format, ...)
|
|
||||||
{
|
|
||||||
va_list list;
|
|
||||||
va_start(list, format);
|
|
||||||
|
|
||||||
::vprintf(format, list);
|
|
||||||
|
|
||||||
va_end(list);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Genode::vprintf(const char *format, va_list list)
|
|
||||||
{
|
|
||||||
::vprintf(format, list);
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user