Imported Genode release 11.11

This commit is contained in:
Genode Labs
2011-12-22 16:19:25 +01:00
committed by Christian Helmuth
parent 6bcc9aef0e
commit da4e1feaa5
2462 changed files with 320115 additions and 3 deletions

7
base-host/README Normal file
View File

@@ -0,0 +1,7 @@
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.

13
base-host/etc/specs.conf Normal file
View File

@@ -0,0 +1,13 @@
#
# 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

4
base-host/etc/tools.conf Normal file
View File

@@ -0,0 +1,4 @@
#
# Use the default host compiler instead of the Genode tool chain
#
CROSS_DEV_PREFIX =

View File

@@ -0,0 +1,39 @@
/*
* \brief Dummy IPC message buffer
* \author Norman Feske
* \date 2009-10-02
*/
/*
* Copyright (C) 2009-2011 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_ */

View File

@@ -0,0 +1,139 @@
/*
* \brief Dummy pager support for Genode
* \author Norman Feske
* \date 2009-10-02
*/
/*
* Copyright (C) 2009-2011 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/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,
bool write_combined, 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_ */

View File

@@ -0,0 +1,45 @@
/*
* \brief Dummy definitions for native types used for compiling unit tests
* \author Norman Feske
* \date 2009-10-02
*/
/*
* Copyright (C) 2009-2011 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_
namespace Genode {
typedef volatile int Native_lock;
typedef int Native_thread;
typedef Native_thread Native_thread_id;
typedef struct { } Native_utcb;
class Native_capability
{
private:
long _local_name;
public:
Native_capability() : _local_name(0) { }
Native_capability(Native_thread_id, long local_name)
: _local_name(local_name) { }
bool valid() const { return _local_name != 0; }
int local_name() const { return _local_name; }
int dst() const { return 0; }
Native_thread_id tid() const { return 0; }
};
typedef int Native_connection_state;
}
#endif /* _INCLUDE__BASE__NATIVE_TYPES_H_ */

View File

@@ -0,0 +1 @@
LIBS = printf_stdio console

6
base-host/lib/mk/env.mk Normal file
View File

@@ -0,0 +1,6 @@
SRC_CC = env.cc parent.cc context_area.cc
LIBS = ipc heap lock log_console
vpath env.cc $(BASE_DIR)/src/base/env
vpath context_area.cc $(BASE_DIR)/src/base/env
vpath parent.cc $(REP_DIR)/src/base/env

3
base-host/lib/mk/ipc.mk Normal file
View File

@@ -0,0 +1,3 @@
SRC_CC = ipc.cc
vpath ipc.cc $(REP_DIR)/src/base/ipc

4
base-host/lib/mk/lock.mk Normal file
View File

@@ -0,0 +1,4 @@
SRC_CC = lock.cc
INC_DIR += $(REP_DIR)/src/base/lock
vpath lock.cc $(BASE_DIR)/src/base/lock

View File

@@ -0,0 +1,3 @@
SRC_CC = pager.cc
vpath pager.cc $(REP_DIR)/src/base/pager

View File

@@ -0,0 +1,3 @@
SRC_CC = printf_stdio.cc
vpath printf_stdio.cc $(REP_DIR)/src/lib/printf_stdio

24
base-host/src/base/env/parent.cc vendored Normal file
View File

@@ -0,0 +1,24 @@
/*
* \brief Access to pseudo parent capability
* \author Norman Feske
* \date 2009-10-02
*/
/*
* Copyright (C) 2009-2011 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(); }
}

View File

@@ -0,0 +1,77 @@
/*
* \brief Dummy implementation of the IPC API
* \author Norman Feske
* \date 2009-10-02
*/
/*
* Copyright (C) 2009-2011 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)
: 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)
{ }

View File

@@ -0,0 +1,52 @@
/*
* \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-2011 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>
static inline void thread_yield() { }
static bool thread_check_stopped_and_restart(Genode::Native_thread_id tid)
{
return true;
}
static inline Genode::Native_thread_id thread_get_my_native_id()
{
return -1;
}
static inline Genode::Native_thread_id thread_invalid_id()
{
return -1;
}
static inline bool thread_id_valid(Genode::Native_thread_id tid)
{
return false;
}
static inline void thread_switch_to(Genode::Native_thread_id tid)
{ }
static inline void thread_stop_myself() { while (true); }

View File

@@ -0,0 +1,57 @@
/*
* \brief Dummy pager framework
* \author Norman Feske
* \date 2009-10-02
*/
/*
* Copyright (C) 2009-2011 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(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().tid(), obj->badge());
/* add server object to object pool */
obj->cap(cap);
insert(obj);
/* return capability that uses the object id as badge */
return Pager_capability(cap);
}

View File

@@ -0,0 +1,90 @@
/*
* \brief Support code for the thread API
* \author Norman Feske
* \date 2010-01-13
*/
/*
* Copyright (C) 2010-2011 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)
{
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 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) {
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;
}
}

View File

@@ -0,0 +1,30 @@
/*
* \brief Core-local RM session
* \author Norman Feske
* \date 2009-10-02
*/
/*
* Copyright (C) 2009-2011 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)
{
PWRN("not implemented");
return 0;
}

View File

@@ -0,0 +1,48 @@
/*
* \brief Core-local region manager session
* \author Norman Feske
* \date 2009-10-02
*/
/*
* Copyright (C) 2009-2011 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);
void detach(Local_addr local_addr) { }
Pager_capability add_client(Thread_capability thread) {
return 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_ */

View File

@@ -0,0 +1,50 @@
/*
* \brief Platform interface
* \author Norman Feske
* \date 2009-10-02
*/
/*
* Copyright (C) 2009-2011 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; }
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_ */

View File

@@ -0,0 +1,59 @@
/*
* \brief Protection-domain facility
* \author Norman Feske
* \date 2009-10-02
*/
/*
* Copyright (C) 2009-2011 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(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_ */

View File

@@ -0,0 +1,106 @@
/*
* \brief Thread facility
* \author Norman Feske
* \date 2009-10-02
*/
/*
* Copyright (C) 2009-2011 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>
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,
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();
/**
* Request thread state
*
* \param state_dst destination state buffer
*
* \retval 0 successful
* \retval -1 thread state not accessible
*/
int state(Genode::Thread_state *state_dst);
/************************
** Accessor functions **
************************/
/**
* Set pager
*/
void pager(Pager_object *pager) { }
/**
* Return identification of thread when faulting
*/
unsigned long pager_object_badge() const;
/**
* Set the executing CPU for this thread.
*/
void set_cpu(unsigned int cpu_no);
/**
* Get thread name
*/
const char *name() const { return "noname"; }
};
}
#endif /* _CORE__INCLUDE__PLATFORM_THREAD_H_ */

View File

@@ -0,0 +1,60 @@
/*
* \brief Core-internal utilities
* \author Norman Feske
* \date 2009-10-02
*/
/*
* Copyright (C) 2009-2011 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 {
inline size_t get_page_size_log2() { return 12; }
inline size_t get_page_size() { return 1 << get_page_size_log2(); }
inline 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_ */

View File

@@ -0,0 +1,27 @@
/*
* \brief Implementation of the IO_MEM session interface
* \author Norman Feske
* \date 2009-03-29
*
*/
/*
* Copyright (C) 2009-2011 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; }

View File

@@ -0,0 +1,58 @@
/*
* \brief Implementation of the IO_PORT session interface
* \author Norman Feske
* \date 2009-10-02
*/
/*
* Copyright (C) 2009-2011 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 "io_port_session_component.h"
using namespace Genode;
/**************
** Port API **
**************/
unsigned char Io_port_session_component::inb(unsigned short address) {
return 0; }
unsigned short Io_port_session_component::inw(unsigned short address) {
return 0; }
unsigned Io_port_session_component::inl(unsigned short address) {
return 0; }
void Io_port_session_component::outb(unsigned short address, unsigned char value)
{ }
void Io_port_session_component::outw(unsigned short address, unsigned short value)
{ }
void Io_port_session_component::outl(unsigned short address, unsigned value)
{ }
/******************************
** Constructor / destructor **
******************************/
Io_port_session_component::Io_port_session_component(Range_allocator *io_port_alloc,
const char *args)
: _io_port_alloc(io_port_alloc)
{ }
Io_port_session_component::~Io_port_session_component()
{ }

View File

@@ -0,0 +1,54 @@
/*
* \brief Implementation of IRQ session component
* \author Norman Feske
* \date 2009-10-02
*/
/*
* Copyright (C) 2009-2011 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");
}

View File

@@ -0,0 +1,41 @@
/*
* \brief Platform interface implementation
* \author Norman Feske
* \date 2009-10-02
*/
/*
* Copyright (C) 2009-2011 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) { }

View File

@@ -0,0 +1,55 @@
/*
* \brief Protection-domain facility
* \author Norman Feske
* \date 2009-10-02
*/
/*
* Copyright (C) 2009-2011 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(signed pd_id, bool create)
{
PWRN("not yet implemented");
}
Platform_pd::~Platform_pd()
{
PWRN("not yet implemented");
}

View File

@@ -0,0 +1,77 @@
/*
* \brief Thread facility
* \author Norman Feske
* \date 2009-10-02
*/
/*
* Copyright (C) 2009-2011 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_thread.h>
using namespace Genode;
void Platform_thread::set_cpu(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");
}
int Platform_thread::state(Thread_state *state_dst)
{
PWRN("not implemented");
return -1;
}
void Platform_thread::cancel_blocking()
{
PWRN("not implemented");
}
unsigned long Platform_thread::pager_object_badge() const
{
PWRN("not implemented");
return -1;
}
Platform_thread::Platform_thread(const char *name, unsigned, int thread_id)
{
PWRN("not implemented");
}
Platform_thread::~Platform_thread()
{
PWRN("not implemented");
}

View File

@@ -0,0 +1,29 @@
/*
* \brief Export RAM dataspace as shared memory object (dummy)
* \author Norman Feske
* \date 2009-10-02
*/
/*
* Copyright (C) 2009-2011 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");
}

View File

@@ -0,0 +1,26 @@
/*
* \brief RM-session implementation
* \author Norman Feske
* \date 2009-10-02
*/
/*
* Copyright (C) 2009-2011 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");
}

View File

@@ -0,0 +1,49 @@
TARGET = core
LIBS = cxx ipc heap core_printf process pager lock \
raw_signal raw_server
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 \
pd_session_component.cc \
io_mem_session_component.cc \
io_mem_session_support.cc \
thread.cc \
thread_host.cc \
thread_bootstrap.cc \
platform_thread.cc \
platform_pd.cc \
platform.cc \
dataspace_component.cc \
rm_session_component.cc \
rm_session_support.cc \
io_port_session_component.cc \
irq_session_component.cc \
signal_session_component.cc \
signal_source_component.cc \
core_rm_session.cc \
context_area.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 %.cc $(REP_DIR)/src/core
vpath thread_bootstrap.cc $(BASE_DIR)/src/base/thread
vpath thread.cc $(BASE_DIR)/src/base/thread

View File

@@ -0,0 +1 @@
include $(PRG_DIR)/target.inc

View File

@@ -0,0 +1,23 @@
/*
* \brief Implementation of Thread API interface for core
* \author Norman Feske
* \date 2006-05-03
*/
/*
* Copyright (C) 2006-2011 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() { }
void Thread_base::_deinit_platform_thread() { }
void Thread_base::start() { }
void Thread_base::cancel_blocking() { }

View File

@@ -0,0 +1,35 @@
/*
* \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-2011 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);
}