From 146292dba9f6188ba75e356dedfa24f849f06b5f Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Thu, 9 Apr 2015 17:50:01 +0200 Subject: [PATCH] base-host: remove platform template completely Fix #1476 --- repos/base-host/README | 7 - repos/base-host/etc/specs.conf | 13 -- repos/base-host/etc/tools.conf | 4 - repos/base-host/include/base/ipc_msgbuf.h | 39 ----- repos/base-host/include/base/ipc_pager.h | 141 ------------------ repos/base-host/include/base/native_types.h | 54 ------- repos/base-host/lib/mk/base-common.mk | 31 ---- repos/base-host/lib/mk/cxx.mk | 4 - repos/base-host/lib/mk/platform.mk | 0 repos/base-host/src/base/env/parent.cc | 24 --- repos/base-host/src/base/ipc/ipc.cc | 77 ---------- repos/base-host/src/base/lock/lock_helper.h | 35 ----- repos/base-host/src/base/pager/pager.cc | 57 ------- repos/base-host/src/core/context_area.cc | 92 ------------ repos/base-host/src/core/core_rm_session.cc | 30 ---- .../base-host/src/core/cpu_session_support.cc | 28 ---- .../src/core/include/core_rm_session.h | 50 ------- repos/base-host/src/core/include/platform.h | 50 ------- .../base-host/src/core/include/platform_pd.h | 60 -------- .../src/core/include/platform_thread.h | 119 --------------- repos/base-host/src/core/include/util.h | 60 -------- .../src/core/io_mem_session_support.cc | 27 ---- .../src/core/irq_session_component.cc | 54 ------- repos/base-host/src/core/platform.cc | 41 ----- repos/base-host/src/core/platform_pd.cc | 56 ------- repos/base-host/src/core/platform_thread.cc | 93 ------------ .../base-host/src/core/ram_session_support.cc | 29 ---- .../base-host/src/core/rm_session_support.cc | 26 ---- repos/base-host/src/core/target.inc | 48 ------ repos/base-host/src/core/target.mk | 1 - repos/base-host/src/core/thread_host.cc | 23 --- .../src/lib/printf_stdio/printf_stdio.cc | 35 ----- 32 files changed, 1408 deletions(-) delete mode 100644 repos/base-host/README delete mode 100644 repos/base-host/etc/specs.conf delete mode 100644 repos/base-host/etc/tools.conf delete mode 100644 repos/base-host/include/base/ipc_msgbuf.h delete mode 100644 repos/base-host/include/base/ipc_pager.h delete mode 100644 repos/base-host/include/base/native_types.h delete mode 100644 repos/base-host/lib/mk/base-common.mk delete mode 100644 repos/base-host/lib/mk/cxx.mk delete mode 100644 repos/base-host/lib/mk/platform.mk delete mode 100644 repos/base-host/src/base/env/parent.cc delete mode 100644 repos/base-host/src/base/ipc/ipc.cc delete mode 100644 repos/base-host/src/base/lock/lock_helper.h delete mode 100644 repos/base-host/src/base/pager/pager.cc delete mode 100644 repos/base-host/src/core/context_area.cc delete mode 100644 repos/base-host/src/core/core_rm_session.cc delete mode 100644 repos/base-host/src/core/cpu_session_support.cc delete mode 100644 repos/base-host/src/core/include/core_rm_session.h delete mode 100644 repos/base-host/src/core/include/platform.h delete mode 100644 repos/base-host/src/core/include/platform_pd.h delete mode 100644 repos/base-host/src/core/include/platform_thread.h delete mode 100644 repos/base-host/src/core/include/util.h delete mode 100644 repos/base-host/src/core/io_mem_session_support.cc delete mode 100644 repos/base-host/src/core/irq_session_component.cc delete mode 100644 repos/base-host/src/core/platform.cc delete mode 100644 repos/base-host/src/core/platform_pd.cc delete mode 100644 repos/base-host/src/core/platform_thread.cc delete mode 100644 repos/base-host/src/core/ram_session_support.cc delete mode 100644 repos/base-host/src/core/rm_session_support.cc delete mode 100644 repos/base-host/src/core/target.inc delete mode 100644 repos/base-host/src/core/target.mk delete mode 100644 repos/base-host/src/core/thread_host.cc delete mode 100644 repos/base-host/src/lib/printf_stdio/printf_stdio.cc diff --git a/repos/base-host/README b/repos/base-host/README deleted file mode 100644 index 3e7487c66..000000000 --- a/repos/base-host/README +++ /dev/null @@ -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. diff --git a/repos/base-host/etc/specs.conf b/repos/base-host/etc/specs.conf deleted file mode 100644 index 834b0f8f4..000000000 --- a/repos/base-host/etc/specs.conf +++ /dev/null @@ -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 diff --git a/repos/base-host/etc/tools.conf b/repos/base-host/etc/tools.conf deleted file mode 100644 index b051c01e2..000000000 --- a/repos/base-host/etc/tools.conf +++ /dev/null @@ -1,4 +0,0 @@ -# -# Use the default host compiler instead of the Genode tool chain -# -CROSS_DEV_PREFIX = diff --git a/repos/base-host/include/base/ipc_msgbuf.h b/repos/base-host/include/base/ipc_msgbuf.h deleted file mode 100644 index fa3aad577..000000000 --- a/repos/base-host/include/base/ipc_msgbuf.h +++ /dev/null @@ -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 - class Msgbuf : public Msgbuf_base { }; -} - -#endif /* _INCLUDE__BASE__IPC_MSGBUF_H_ */ diff --git a/repos/base-host/include/base/ipc_pager.h b/repos/base-host/include/base/ipc_pager.h deleted file mode 100644 index cd2e95624..000000000 --- a/repos/base-host/include/base/ipc_pager.h +++ /dev/null @@ -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 -#include -#include -#include - -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_ */ diff --git a/repos/base-host/include/base/native_types.h b/repos/base-host/include/base/native_types.h deleted file mode 100644 index d1e50c7dd..000000000 --- a/repos/base-host/include/base/native_types.h +++ /dev/null @@ -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 -#include - -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* src); - }; - - typedef int Native_thread; - typedef Native_thread Native_thread_id; - typedef struct { } Native_utcb; - typedef int Native_connection_state; - typedef Native_capability_tpl 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_ */ diff --git a/repos/base-host/lib/mk/base-common.mk b/repos/base-host/lib/mk/base-common.mk deleted file mode 100644 index bb79fbc89..000000000 --- a/repos/base-host/lib/mk/base-common.mk +++ /dev/null @@ -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 - diff --git a/repos/base-host/lib/mk/cxx.mk b/repos/base-host/lib/mk/cxx.mk deleted file mode 100644 index 172827d0c..000000000 --- a/repos/base-host/lib/mk/cxx.mk +++ /dev/null @@ -1,4 +0,0 @@ -SRC_CC += new_delete.cc - -vpath %.cc $(BASE_DIR)/src/base/cxx - diff --git a/repos/base-host/lib/mk/platform.mk b/repos/base-host/lib/mk/platform.mk deleted file mode 100644 index e69de29bb..000000000 diff --git a/repos/base-host/src/base/env/parent.cc b/repos/base-host/src/base/env/parent.cc deleted file mode 100644 index 6d8f8f3f6..000000000 --- a/repos/base-host/src/base/env/parent.cc +++ /dev/null @@ -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 - -namespace Genode { - - /** - * Return parent capability - * - * This function is normally provided by the 'startup' library. - */ - Native_capability parent_cap() { return Native_capability(); } -} diff --git a/repos/base-host/src/base/ipc/ipc.cc b/repos/base-host/src/base/ipc/ipc.cc deleted file mode 100644 index c958cd7cf..000000000 --- a/repos/base-host/src/base/ipc/ipc.cc +++ /dev/null @@ -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 - -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) -{ } diff --git a/repos/base-host/src/base/lock/lock_helper.h b/repos/base-host/src/base/lock/lock_helper.h deleted file mode 100644 index f9bb27018..000000000 --- a/repos/base-host/src/base/lock/lock_helper.h +++ /dev/null @@ -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 -#include - - -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); } diff --git a/repos/base-host/src/base/pager/pager.cc b/repos/base-host/src/base/pager/pager.cc deleted file mode 100644 index 565754331..000000000 --- a/repos/base-host/src/base/pager/pager.cc +++ /dev/null @@ -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 - -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(cap); -} diff --git a/repos/base-host/src/core/context_area.cc b/repos/base-host/src/core/context_area.cc deleted file mode 100644 index cb69b2bd5..000000000 --- a/repos/base-host/src/core/context_area.cc +++ /dev/null @@ -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 -#include -#include -#include - - -/** - * 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; - } -} - diff --git a/repos/base-host/src/core/core_rm_session.cc b/repos/base-host/src/core/core_rm_session.cc deleted file mode 100644 index 3e40d071f..000000000 --- a/repos/base-host/src/core/core_rm_session.cc +++ /dev/null @@ -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 - -/* core includes */ -#include - -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; -} diff --git a/repos/base-host/src/core/cpu_session_support.cc b/repos/base-host/src/core/cpu_session_support.cc deleted file mode 100644 index fbbb7d629..000000000 --- a/repos/base-host/src/core/cpu_session_support.cc +++ /dev/null @@ -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 - -/* Core includes */ -#include - -using namespace Genode; - - -Ram_dataspace_capability Cpu_session_component::utcb(Thread_capability thread_cap) -{ - PERR("%s: Not implemented", __PRETTY_FUNCTION__); - return Ram_dataspace_capability(); -} - diff --git a/repos/base-host/src/core/include/core_rm_session.h b/repos/base-host/src/core/include/core_rm_session.h deleted file mode 100644 index c26b5874f..000000000 --- a/repos/base-host/src/core/include/core_rm_session.h +++ /dev/null @@ -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 - -/* core includes */ -#include - -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_ */ diff --git a/repos/base-host/src/core/include/platform.h b/repos/base-host/src/core/include/platform.h deleted file mode 100644 index 8925bae46..000000000 --- a/repos/base-host/src/core/include/platform.h +++ /dev/null @@ -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 - -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_ */ diff --git a/repos/base-host/src/core/include/platform_pd.h b/repos/base-host/src/core/include/platform_pd.h deleted file mode 100644 index 1af130410..000000000 --- a/repos/base-host/src/core/include/platform_pd.h +++ /dev/null @@ -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 - -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_ */ diff --git a/repos/base-host/src/core/include/platform_thread.h b/repos/base-host/src/core/include/platform_thread.h deleted file mode 100644 index 921face7a..000000000 --- a/repos/base-host/src/core/include/platform_thread.h +++ /dev/null @@ -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 -#include -#include - -/* core includes */ -#include - -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(); - - - /************************ - ** 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_ */ diff --git a/repos/base-host/src/core/include/util.h b/repos/base-host/src/core/include/util.h deleted file mode 100644 index 2bc82addf..000000000 --- a/repos/base-host/src/core/include/util.h +++ /dev/null @@ -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 -#include - -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_ */ diff --git a/repos/base-host/src/core/io_mem_session_support.cc b/repos/base-host/src/core/io_mem_session_support.cc deleted file mode 100644 index f46faad92..000000000 --- a/repos/base-host/src/core/io_mem_session_support.cc +++ /dev/null @@ -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 - - -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; } diff --git a/repos/base-host/src/core/irq_session_component.cc b/repos/base-host/src/core/irq_session_component.cc deleted file mode 100644 index 15a2a36a6..000000000 --- a/repos/base-host/src/core/irq_session_component.cc +++ /dev/null @@ -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 - -/* core includes */ -#include - - -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()) -{ - PWRN("not implemented"); -} - - -Irq_session_component::~Irq_session_component() -{ - PERR("not yet implemented"); -} - diff --git a/repos/base-host/src/core/platform.cc b/repos/base-host/src/core/platform.cc deleted file mode 100644 index db1a32d91..000000000 --- a/repos/base-host/src/core/platform.cc +++ /dev/null @@ -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 -#include - -/* core includes */ -#include -#include - -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) { } diff --git a/repos/base-host/src/core/platform_pd.cc b/repos/base-host/src/core/platform_pd.cc deleted file mode 100644 index 6e325a585..000000000 --- a/repos/base-host/src/core/platform_pd.cc +++ /dev/null @@ -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 - -/* core includes */ -#include - -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"); -} diff --git a/repos/base-host/src/core/platform_thread.cc b/repos/base-host/src/core/platform_thread.cc deleted file mode 100644 index e97874823..000000000 --- a/repos/base-host/src/core/platform_thread.cc +++ /dev/null @@ -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 -#include - -/* core includes */ -#include - -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 Platform_thread::address_space() -{ - PWRN("not implemented"); - return Weak_ptr(); -} - - -Platform_thread::Platform_thread(const char *name, unsigned, addr_t, - int thread_id) -{ - PWRN("not implemented"); -} - - -Platform_thread::~Platform_thread() -{ - PWRN("not implemented"); -} diff --git a/repos/base-host/src/core/ram_session_support.cc b/repos/base-host/src/core/ram_session_support.cc deleted file mode 100644 index 2df092621..000000000 --- a/repos/base-host/src/core/ram_session_support.cc +++ /dev/null @@ -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 - -/* core includes */ -#include - - -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"); -} diff --git a/repos/base-host/src/core/rm_session_support.cc b/repos/base-host/src/core/rm_session_support.cc deleted file mode 100644 index 7e5d334b6..000000000 --- a/repos/base-host/src/core/rm_session_support.cc +++ /dev/null @@ -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 - -/* core includes */ -#include - -using namespace Genode; - - -void Rm_client::unmap(addr_t core_local_base, addr_t virt_base, size_t size) -{ - PWRN("not implemented"); -} diff --git a/repos/base-host/src/core/target.inc b/repos/base-host/src/core/target.inc deleted file mode 100644 index 29039ccd3..000000000 --- a/repos/base-host/src/core/target.inc +++ /dev/null @@ -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 - diff --git a/repos/base-host/src/core/target.mk b/repos/base-host/src/core/target.mk deleted file mode 100644 index 310689bf0..000000000 --- a/repos/base-host/src/core/target.mk +++ /dev/null @@ -1 +0,0 @@ -include $(PRG_DIR)/target.inc diff --git a/repos/base-host/src/core/thread_host.cc b/repos/base-host/src/core/thread_host.cc deleted file mode 100644 index b4ce5f7c6..000000000 --- a/repos/base-host/src/core/thread_host.cc +++ /dev/null @@ -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 -#include - -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() { } diff --git a/repos/base-host/src/lib/printf_stdio/printf_stdio.cc b/repos/base-host/src/lib/printf_stdio/printf_stdio.cc deleted file mode 100644 index 0d0434be3..000000000 --- a/repos/base-host/src/lib/printf_stdio/printf_stdio.cc +++ /dev/null @@ -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 -#include - - -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); -}