diff --git a/base-codezero/src/core/io_port_session_component.cc b/base-codezero/src/core/io_port_session_component.cc deleted file mode 100644 index 25976517c..000000000 --- a/base-codezero/src/core/io_port_session_component.cc +++ /dev/null @@ -1,58 +0,0 @@ -/* - * \brief Implementation of the IO_PORT session interface - * \author Norman Feske - * \date 2009-10-02 - */ - -/* - * Copyright (C) 2009-2012 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() -{ } diff --git a/base-codezero/src/core/target.inc b/base-codezero/src/core/target.inc index 99879e784..17ca0139f 100644 --- a/base-codezero/src/core/target.inc +++ b/base-codezero/src/core/target.inc @@ -19,11 +19,11 @@ SRC_CC = \ thread_bootstrap.cc \ platform_thread.cc \ platform_pd.cc \ + platform_services.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 \ @@ -45,6 +45,7 @@ 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 platform_services.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) @@ -55,4 +56,3 @@ vpath %.cc $(REP_DIR)/src/core vpath thread_bootstrap.cc $(BASE_DIR)/src/base/thread vpath thread.cc $(BASE_DIR)/src/base/thread vpath utcb.cc $(REP_DIR)/src/base/env - diff --git a/base-fiasco/src/core/arm/target.mk b/base-fiasco/src/core/arm/target.mk index 1be0ccfdb..9683fbbd0 100644 --- a/base-fiasco/src/core/arm/target.mk +++ b/base-fiasco/src/core/arm/target.mk @@ -4,4 +4,5 @@ REQUIRES += arm SRC_CC += platform_arm.cc vpath io_port_session_component.cc $(GEN_CORE_DIR)/arm +vpath platform_services.cc $(GEN_CORE_DIR) diff --git a/base-fiasco/src/core/target.inc b/base-fiasco/src/core/target.inc index dd56cdfdf..f017a8017 100644 --- a/base-fiasco/src/core/target.inc +++ b/base-fiasco/src/core/target.inc @@ -19,6 +19,7 @@ SRC_CC = main.cc \ thread_bootstrap.cc \ platform_thread.cc \ platform_pd.cc \ + platform_services.cc \ platform.cc \ dataspace_component.cc \ rm_session_component.cc \ diff --git a/base-fiasco/src/core/x86/target.mk b/base-fiasco/src/core/x86/target.mk index 719b8306e..1638edf73 100644 --- a/base-fiasco/src/core/x86/target.mk +++ b/base-fiasco/src/core/x86/target.mk @@ -4,4 +4,5 @@ REQUIRES += x86 SRC_CC += platform_x86.cc vpath io_port_session_component.cc $(GEN_CORE_DIR)/x86 +vpath platform_services.cc $(GEN_CORE_DIR)/x86 diff --git a/base-foc/src/core/panda/target.mk b/base-foc/src/core/panda/target.mk index 194792be1..23cc6be31 100644 --- a/base-foc/src/core/panda/target.mk +++ b/base-foc/src/core/panda/target.mk @@ -6,6 +6,4 @@ REQUIRES += arm foc_panda SRC_CC += arm/platform_arm.cc INC_DIR += $(REP_DIR)/src/core/include/arm - -vpath io_port_session_component.cc $(GEN_CORE_DIR)/arm - +vpath platform_services.cc $(GEN_CORE_DIR) diff --git a/base-foc/src/core/pbxa9/target.mk b/base-foc/src/core/pbxa9/target.mk index 78d8e90f3..2ec8396d9 100644 --- a/base-foc/src/core/pbxa9/target.mk +++ b/base-foc/src/core/pbxa9/target.mk @@ -6,5 +6,5 @@ INC_DIR += $(REP_DIR)/src/core/include/arm LD_TEXT_ADDR = 0x70490000 -vpath io_port_session_component.cc $(GEN_CORE_DIR)/arm +vpath platform_services.cc $(GEN_CORE_DIR) diff --git a/base-foc/src/core/target.inc b/base-foc/src/core/target.inc index 14c1aca6f..245c62626 100644 --- a/base-foc/src/core/target.inc +++ b/base-foc/src/core/target.inc @@ -6,56 +6,56 @@ LD_TEXT_ADDR = 0x500000 GEN_CORE_DIR = $(BASE_DIR)/src/core -SRC_CC = main.cc \ - multiboot_info.cc \ - ram_session_component.cc \ - ram_session_support.cc \ - rom_session_component.cc \ +SRC_CC = cap_map.cc \ + cap_session_component.cc \ + context_area.cc \ cpu_session_component.cc \ - pd_session_component.cc \ + cpu_session_extension.cc \ + dataspace_component.cc \ + dump_alloc.cc \ io_mem_session_component.cc \ io_mem_session_support.cc \ - thread.cc \ - thread_bootstrap.cc \ - thread_start.cc \ - platform_thread.cc \ - platform_pd.cc \ + irq_session_component.cc \ + main.cc \ + multiboot_info.cc \ + pd_session_component.cc \ + pd_session_extension.cc \ platform.cc \ - dataspace_component.cc \ + platform_pd.cc \ + platform_services.cc \ + platform_thread.cc \ + ram_session_component.cc \ + ram_session_support.cc \ rm_session_component.cc \ rm_session_support.cc \ - io_port_session_component.cc \ - irq_session_component.cc \ + rom_session_component.cc \ signal_session_component.cc \ signal_source_component.cc \ - dump_alloc.cc \ - context_area.cc \ - cap_map.cc \ - cap_session_component.cc \ - cpu_session_extension.cc \ - pd_session_extension.cc \ - spin_lock.cc + spin_lock.cc \ + thread.cc \ + thread_bootstrap.cc \ + thread_start.cc INC_DIR += $(REP_DIR)/src/core/include \ $(GEN_CORE_DIR)/include \ $(REP_DIR)/src/base/lock \ $(BASE_DIR)/src/base/lock -vpath main.cc $(GEN_CORE_DIR) -vpath multiboot_info.cc $(GEN_CORE_DIR) -vpath ram_session_component.cc $(GEN_CORE_DIR) -vpath rom_session_component.cc $(GEN_CORE_DIR) +vpath context_area.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 signal_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 dataspace_component.cc $(GEN_CORE_DIR) vpath dump_alloc.cc $(GEN_CORE_DIR) -vpath context_area.cc $(GEN_CORE_DIR) -vpath thread.cc $(REP_DIR)/src/base/thread -vpath thread_bootstrap.cc $(REP_DIR)/src/base/thread +vpath io_mem_session_component.cc $(GEN_CORE_DIR) +vpath io_mem_session_support.cc $(GEN_CORE_DIR) +vpath main.cc $(GEN_CORE_DIR) +vpath multiboot_info.cc $(GEN_CORE_DIR) +vpath pd_session_component.cc $(GEN_CORE_DIR) +vpath ram_session_component.cc $(GEN_CORE_DIR) +vpath rm_session_component.cc $(GEN_CORE_DIR) +vpath rom_session_component.cc $(GEN_CORE_DIR) +vpath signal_session_component.cc $(GEN_CORE_DIR) vpath cap_map.cc $(REP_DIR)/src/base/env vpath spin_lock.cc $(REP_DIR)/src/base/env +vpath thread.cc $(REP_DIR)/src/base/thread +vpath thread_bootstrap.cc $(REP_DIR)/src/base/thread vpath %.cc $(REP_DIR)/src/core diff --git a/base-foc/src/core/vea9x4/target.mk b/base-foc/src/core/vea9x4/target.mk index 5ebecfc44..06e95dbf0 100644 --- a/base-foc/src/core/vea9x4/target.mk +++ b/base-foc/src/core/vea9x4/target.mk @@ -6,5 +6,5 @@ INC_DIR += $(REP_DIR)/src/core/include/arm LD_TEXT_ADDR = 0x60490000 -vpath io_port_session_component.cc $(GEN_CORE_DIR)/arm +vpath platform_services.cc $(GEN_CORE_DIR) diff --git a/base-foc/src/core/x86/target.mk b/base-foc/src/core/x86/target.mk index cca08a84b..674179f6d 100644 --- a/base-foc/src/core/x86/target.mk +++ b/base-foc/src/core/x86/target.mk @@ -1,8 +1,10 @@ include $(PRG_DIR)/../target.inc REQUIRES += x86 -SRC_CC += x86/platform_x86.cc +SRC_CC += io_port_session_component.cc \ + x86/platform_x86.cc INC_DIR += $(REP_DIR)/src/core/include/x86 vpath io_port_session_component.cc $(GEN_CORE_DIR)/x86 +vpath platform_services.cc $(GEN_CORE_DIR)/x86 diff --git a/base-host/src/core/io_port_session_component.cc b/base-host/src/core/io_port_session_component.cc deleted file mode 100644 index 25976517c..000000000 --- a/base-host/src/core/io_port_session_component.cc +++ /dev/null @@ -1,58 +0,0 @@ -/* - * \brief Implementation of the IO_PORT session interface - * \author Norman Feske - * \date 2009-10-02 - */ - -/* - * Copyright (C) 2009-2012 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() -{ } diff --git a/base-host/src/core/target.inc b/base-host/src/core/target.inc index a9a62a939..effb39922 100644 --- a/base-host/src/core/target.inc +++ b/base-host/src/core/target.inc @@ -20,6 +20,7 @@ SRC_CC = \ platform_thread.cc \ platform_pd.cc \ platform.cc \ + platform_services.cc \ dataspace_component.cc \ rm_session_component.cc \ rm_session_support.cc \ @@ -44,6 +45,7 @@ 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_serices.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 diff --git a/base-hw/src/core/io_port_session_component.cc b/base-hw/src/core/io_port_session_component.cc deleted file mode 100644 index 6a9841871..000000000 --- a/base-hw/src/core/io_port_session_component.cc +++ /dev/null @@ -1,85 +0,0 @@ -/* - * \brief Implementation of the IO_PORT session interface - * \author Martin Stein - * \date 2012-02-12 - */ - -/* - * Copyright (C) 2012 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; - - -unsigned char Io_port_session_component::inb(unsigned short address) -{ - kernel_log() << __PRETTY_FUNCTION__ << ": Not implemented\n"; - while (1) ; - return 0; -} - - -unsigned short Io_port_session_component::inw(unsigned short address) -{ - kernel_log() << __PRETTY_FUNCTION__ << ": Not implemented\n"; - while (1) ; - return 0; -} - - -unsigned Io_port_session_component::inl(unsigned short address) -{ - kernel_log() << __PRETTY_FUNCTION__ << ": Not implemented\n"; - while (1) ; - return 0; -} - - -void Io_port_session_component::outb(unsigned short address, - unsigned char value) -{ - kernel_log() << __PRETTY_FUNCTION__ << ": Not implemented\n"; - while (1) ; -} - - -void Io_port_session_component::outw(unsigned short address, - unsigned short value) -{ - kernel_log() << __PRETTY_FUNCTION__ << ": Not implemented\n"; - while (1) ; -} - - -void Io_port_session_component::outl(unsigned short address, unsigned value) -{ - kernel_log() << __PRETTY_FUNCTION__ << ": Not implemented\n"; - while (1) ; -} - - -Io_port_session_component:: -Io_port_session_component(Range_allocator * io_port_alloc, - const char * args) -: _io_port_alloc(io_port_alloc) -{ - kernel_log() << __PRETTY_FUNCTION__ << ": Not implemented\n"; - while (1) ; -} - - -Io_port_session_component::~Io_port_session_component() -{ - kernel_log() << __PRETTY_FUNCTION__ << ": Not implemented\n"; - while (1) ; -} - diff --git a/base-hw/src/core/target.mk b/base-hw/src/core/target.mk index c46076bed..3c113e1ce 100644 --- a/base-hw/src/core/target.mk +++ b/base-hw/src/core/target.mk @@ -22,27 +22,40 @@ INC_DIR += $(REP_DIR)/src/core/include $(REP_DIR)/include \ $(BASE_DIR)/include # add C++ sources -SRC_CC += main.cc _main.cc ram_session_component.cc \ - ram_session_support.cc rom_session_component.cc \ - pd_session_component.cc io_mem_session_component.cc \ - io_mem_session_support.cc thread.cc platform_pd.cc platform.cc \ - platform_thread.cc dataspace_component.cc rm_session_component.cc \ - io_port_session_component.cc \ - irq_session_component.cc signal_session_component.cc \ - dump_alloc.cc cpu_session_component.cc \ - cpu_session_support.cc console.cc +SRC_CC += _main.cc \ + console.cc \ + cpu_session_component.cc \ + cpu_session_support.cc \ + dataspace_component.cc \ + dump_alloc.cc \ + io_mem_session_component.cc \ + io_mem_session_support.cc \ + irq_session_component.cc \ + main.cc \ + pd_session_component.cc \ + platform.cc \ + platform_pd.cc \ + platform_thread.cc \ + platform_services.cc \ + ram_session_component.cc \ + ram_session_support.cc \ + rm_session_component.cc \ + rom_session_component.cc \ + signal_session_component.cc \ + thread.cc # declare file locations vpath _main.cc $(BASE_DIR)/src/platform -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 dataspace_component.cc $(GEN_CORE_DIR) vpath io_mem_session_component.cc $(GEN_CORE_DIR) vpath io_mem_session_support.cc $(GEN_CORE_DIR) -vpath dataspace_component.cc $(GEN_CORE_DIR) +vpath main.cc $(GEN_CORE_DIR) +vpath pd_session_component.cc $(GEN_CORE_DIR) +vpath platform_services.cc $(GEN_CORE_DIR) +vpath ram_session_component.cc $(GEN_CORE_DIR) +vpath rm_session_component.cc $(GEN_CORE_DIR) +vpath rom_session_component.cc $(GEN_CORE_DIR) vpath dump_alloc.cc $(GEN_CORE_DIR) vpath console.cc $(REP_DIR)/src/base vpath % $(REP_DIR)/src/core diff --git a/base-linux/src/core/io_port_session_component.cc b/base-linux/src/core/io_port_session_component.cc deleted file mode 100644 index 1ab6e6695..000000000 --- a/base-linux/src/core/io_port_session_component.cc +++ /dev/null @@ -1,59 +0,0 @@ -/* - * \brief Linux-specific IO_PORT service - * \author Christian Helmuth - * \date 2007-04-18 - */ - -/* - * Copyright (C) 2007-2012 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 - -#include "io_port_session_component.h" - -using namespace Genode; - - -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) { -} - - -Io_port_session_component::Io_port_session_component(Range_allocator *io_port_alloc, - const char *args) -: _io_port_alloc(io_port_alloc) -{ - PWRN("no IO_PORT support under Linux (args=\"%s\")", args); - _size = 0; - throw Root::Invalid_args(); -} - - -Io_port_session_component::~Io_port_session_component() -{ - PERR("Implement me, immediately!"); -} diff --git a/base-linux/src/core/target.mk b/base-linux/src/core/target.mk index 84e259b18..13a7feb0d 100644 --- a/base-linux/src/core/target.mk +++ b/base-linux/src/core/target.mk @@ -7,6 +7,7 @@ GEN_CORE_DIR = $(BASE_DIR)/src/core SRC_CC = main.cc \ platform.cc \ platform_thread.cc \ + platform_services.cc \ ram_session_component.cc \ ram_session_support.cc \ rom_session_component.cc \ @@ -14,7 +15,6 @@ SRC_CC = main.cc \ cpu_session_support.cc \ pd_session_component.cc \ io_mem_session_component.cc \ - io_port_session_component.cc \ signal_session_component.cc \ signal_source_component.cc \ thread.cc \ @@ -32,6 +32,7 @@ vpath main.cc $(GEN_CORE_DIR) vpath thread.cc $(BASE_DIR)/src/base/thread vpath ram_session_component.cc $(GEN_CORE_DIR) vpath cpu_session_component.cc $(GEN_CORE_DIR) +vpath platform_services.cc $(GEN_CORE_DIR) vpath signal_session_component.cc $(GEN_CORE_DIR) vpath signal_source_component.cc $(GEN_CORE_DIR) vpath debug.cc $(REP_DIR)/src/base/env diff --git a/base-mb/src/core/io_port_session_component.cc b/base-mb/src/core/io_port_session_component.cc deleted file mode 100755 index 24ed70407..000000000 --- a/base-mb/src/core/io_port_session_component.cc +++ /dev/null @@ -1,41 +0,0 @@ -/* - * \brief Implementation of the IO_PORT session interface - * \author Martin Stein - * \date 2010-09-09 - */ - -/* - * Copyright (C) 2010-2012 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) { return 0; } -unsigned short Io_port_session_component::inw(unsigned short) { return 0; } -unsigned Io_port_session_component::inl(unsigned short) { return 0; } - -void Io_port_session_component::outb(unsigned short, unsigned char) { } -void Io_port_session_component::outw(unsigned short, unsigned short) { } -void Io_port_session_component::outl(unsigned short, unsigned) { } - - -/****************************** - ** 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() { } diff --git a/base-mb/src/core/target.inc b/base-mb/src/core/target.inc index 407603b9a..3fe6e7244 100755 --- a/base-mb/src/core/target.inc +++ b/base-mb/src/core/target.inc @@ -4,49 +4,50 @@ SPEC_BASE_DIR = $(REP_DIR)/src/base SRC_CC = \ - main.cc \ - ram_session_component.cc \ - ram_session_support.cc \ - rom_session_component.cc \ + context_area.cc + core_rm_session.cc \ cpu_session_component.cc \ - pd_session_component.cc \ + dataspace_component.cc \ + dump_alloc.cc \ io_mem_session_component.cc \ io_mem_session_support.cc \ - thread.cc \ - thread_roottask.cc \ - thread_bootstrap.cc \ - platform_thread.cc \ + irq_session_component.cc \ + main.cc \ + pd_session_component.cc \ platform.cc \ - dataspace_component.cc \ + platform_services.cc \ + platform_thread.cc \ + ram_session_component.cc \ + ram_session_support.cc \ rm_session_component.cc \ rm_session_support.cc \ - io_port_session_component.cc \ - irq_session_component.cc \ + rom_session_component.cc \ signal_session_component.cc \ signal_source_component.cc \ - core_rm_session.cc \ - dump_alloc.cc \ - context_area.cc + thread.cc \ + thread_bootstrap.cc \ + thread_roottask.cc \ INC_DIR = $(SPEC_CORE_DIR)/include \ - $(GEN_CORE_DIR)/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 context_area.cc $(SPEC_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 $(SPEC_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 dump_alloc.cc $(GEN_CORE_DIR) -vpath context_area.cc $(SPEC_CORE_DIR) -vpath platform.cc $(GEN_CORE_DIR) -vpath platform_thread.cc $(GEN_CORE_DIR) -vpath thread_roottask.cc $(GEN_CORE_DIR) -vpath thread_bootstrap.cc $(SPEC_BASE_DIR)/thread -vpath thread.cc $(SPEC_BASE_DIR)/thread +vpath io_mem_session_component.cc $(GEN_CORE_DIR) +vpath io_mem_session_support.cc $(SPEC_CORE_DIR) vpath irq_session_component.cc $(SPEC_CORE_DIR) +vpath main.cc $(GEN_CORE_DIR) +vpath pd_session_component.cc $(GEN_CORE_DIR) +vpath platform.cc $(GEN_CORE_DIR) +vpath platform_services.cc $(GEN_CORE_DIR) +vpath platform_thread.cc $(GEN_CORE_DIR) +vpath ram_session_component.cc $(GEN_CORE_DIR) +vpath rm_session_component.cc $(GEN_CORE_DIR) +vpath rom_session_component.cc $(GEN_CORE_DIR) +vpath signal_session_component.cc $(GEN_CORE_DIR) +vpath signal_source_component.cc $(GEN_CORE_DIR) +vpath thread.cc $(SPEC_BASE_DIR)/thread +vpath thread_bootstrap.cc $(SPEC_BASE_DIR)/thread +vpath thread_roottask.cc $(GEN_CORE_DIR) diff --git a/base-nova/src/core/target.inc b/base-nova/src/core/target.inc index 242beb0e1..c8f17a0cf 100644 --- a/base-nova/src/core/target.inc +++ b/base-nova/src/core/target.inc @@ -19,6 +19,7 @@ SRC_CC = \ platform_thread.cc \ platform_pd.cc \ platform.cc \ + platform_services.cc \ core_mem_alloc.cc \ dataspace_component.cc \ rm_session_component.cc \ @@ -51,6 +52,7 @@ vpath io_mem_session_support.cc $(GEN_CORE_DIR) vpath dataspace_component.cc $(GEN_CORE_DIR) vpath core_mem_alloc.cc $(GEN_CORE_DIR) vpath dump_alloc.cc $(GEN_CORE_DIR) +vpath platform_services.cc $(GEN_CORE_DIR)/x86 vpath context_area.cc $(GEN_CORE_DIR) vpath %.cc $(REP_DIR)/src/core vpath thread.cc $(BASE_DIR)/src/base/thread diff --git a/base-okl4/src/core/target.inc b/base-okl4/src/core/target.inc index 9a89ee3a4..0fc23acd0 100644 --- a/base-okl4/src/core/target.inc +++ b/base-okl4/src/core/target.inc @@ -21,10 +21,10 @@ SRC_CC = main.cc \ platform_thread.cc \ platform_pd.cc \ platform.cc \ + platform_services.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 \ diff --git a/base-okl4/src/core/x86/platform_x86.cc b/base-okl4/src/core/x86/platform_x86.cc new file mode 100644 index 000000000..9d46772ef --- /dev/null +++ b/base-okl4/src/core/x86/platform_x86.cc @@ -0,0 +1,31 @@ +/* + * \brief x86-specific platform definitions + * \author Stefan Kalkowski + * \date 2012-10-02 + */ + +/* + * Copyright (C) 2012 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 +#include +#include + +using namespace Genode; + +void Platform::add_local_services(Rpc_entrypoint *e, Sliced_heap *sliced_heap, + Core_env *env, Service_registry *local_services) +{ + /* add x86 specific ioport service */ + static Io_port_root io_port_root(env->cap_session(), io_port_alloc(), sliced_heap); + static Local_service io_port_ls(Io_port_session::service_name(), &io_port_root); + local_services->insert(&io_port_ls); +} diff --git a/base-okl4/src/core/x86/target.mk b/base-okl4/src/core/x86/target.mk index 4bf5abc5c..d88cf8875 100644 --- a/base-okl4/src/core/x86/target.mk +++ b/base-okl4/src/core/x86/target.mk @@ -2,7 +2,9 @@ include $(PRG_DIR)/../target.inc REQUIRES += x86 -SRC_CC += platform_thread_x86.cc +SRC_CC += io_port_session_component.cc \ + platform_thread_x86.cc vpath io_port_session_component.cc $(GEN_CORE_DIR)/x86 -vpath platform_thread_x86.cc $(GEN_CORE_DIR)/x86 +vpath platform_services.cc $(GEN_CORE_DIR)/x86 +vpath platform_thread_x86.cc $(GEN_CORE_DIR)/x86 diff --git a/base-pistachio/src/core/target.inc b/base-pistachio/src/core/target.inc index ad5b6b5d9..43518d17b 100644 --- a/base-pistachio/src/core/target.inc +++ b/base-pistachio/src/core/target.inc @@ -21,10 +21,10 @@ SRC_CC = main.cc \ platform_thread.cc \ platform_pd.cc \ platform.cc \ + platform_services.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 \ diff --git a/base-pistachio/src/core/x86/target.mk b/base-pistachio/src/core/x86/target.mk index 719b8306e..9184e2adb 100644 --- a/base-pistachio/src/core/x86/target.mk +++ b/base-pistachio/src/core/x86/target.mk @@ -1,7 +1,9 @@ include $(PRG_DIR)/../target.inc REQUIRES += x86 -SRC_CC += platform_x86.cc +SRC_CC += io_port_session_component.cc \ + platform_x86.cc vpath io_port_session_component.cc $(GEN_CORE_DIR)/x86 +vpath platform_services.cc $(GEN_CORE_DIR)/x86 diff --git a/base/src/core/arm/io_port_session_component.cc b/base/src/core/arm/io_port_session_component.cc deleted file mode 100644 index 31de0bddb..000000000 --- a/base/src/core/arm/io_port_session_component.cc +++ /dev/null @@ -1,63 +0,0 @@ -/* - * \brief Dummy implementation of the IO_PORT session interface - * \author Norman Feske - * \date 2007-09-27 - * - * On ARM, port I/O does not exist. - */ - -/* - * Copyright (C) 2007-2012 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 - -#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() -{ } diff --git a/base/src/core/include/platform_services.h b/base/src/core/include/platform_services.h new file mode 100644 index 000000000..5fc0fd800 --- /dev/null +++ b/base/src/core/include/platform_services.h @@ -0,0 +1,37 @@ +/* + * \brief Platform-specific services + * \author Stefan Kalkowski + * \date 2012-10-26 + */ + +/* + * Copyright (C) 2012 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_SERVICES_H_ +#define _CORE__INCLUDE__PLATFORM_SERVICES_H_ + +namespace Genode { + + class Rpc_entrypoint; + class Sliced_heap; + class Service_registry; + + + /** + * Register platform-specific services at entrypoint, and service + * registry + * + * \param ep entrypoint used for session components of platform-services + * \param md metadata allocator for session components + * \param reg registry where to add platform-specific services + */ + void platform_add_local_services(Rpc_entrypoint *ep, + Sliced_heap *md, + Service_registry *reg); +} + +#endif /* _CORE__INCLUDE__PLATFORM_SERVICES_H_ */ diff --git a/base/src/core/main.cc b/base/src/core/main.cc index 625cb3843..bd9e9b6d5 100644 --- a/base/src/core/main.cc +++ b/base/src/core/main.cc @@ -30,9 +30,9 @@ #include #include #include -#include #include #include +#include using namespace Genode; @@ -173,7 +173,6 @@ int main() static Log_root log_root (e, &sliced_heap); static Io_mem_root io_mem_root (e, e, platform()->io_mem_alloc(), platform()->ram_alloc(), &sliced_heap); - static Io_port_root io_port_root (core_env()->cap_session(), platform()->io_port_alloc(), &sliced_heap); static Irq_root irq_root (core_env()->cap_session(), platform()->irq_alloc(), &sliced_heap); static Signal_root signal_root (&sliced_heap, core_env()->cap_session()); @@ -191,7 +190,6 @@ int main() Local_service(Pd_session::service_name(), &pd_root), Local_service(Log_session::service_name(), &log_root), Local_service(Io_mem_session::service_name(), &io_mem_root), - Local_service(Io_port_session::service_name(), &io_port_root), Local_service(Irq_session::service_name(), &irq_root), Local_service(Signal_session::service_name(), &signal_root) }; @@ -200,6 +198,9 @@ int main() for (unsigned i = 0; i < sizeof(ls) / sizeof(Local_service); i++) local_services.insert(&ls[i]); + /* make platform-specific services known to service pool */ + platform_add_local_services(e, &sliced_heap, &local_services); + PDBG("--- start init ---"); /* obtain ROM session with init binary */ diff --git a/base/src/core/platform_services.cc b/base/src/core/platform_services.cc new file mode 100644 index 000000000..f58347754 --- /dev/null +++ b/base/src/core/platform_services.cc @@ -0,0 +1,19 @@ +/* + * \brief Dummy implemntation of platform-specific services + * \author Stefan Kalkowski + * \date 2012-10-26 + */ + +/* + * Copyright (C) 2012 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 + + +void Genode::platform_add_local_services(Rpc_entrypoint*, Sliced_heap*, + Service_registry*) { } diff --git a/base/src/core/x86/platform_services.cc b/base/src/core/x86/platform_services.cc new file mode 100644 index 000000000..d2d927bbc --- /dev/null +++ b/base/src/core/x86/platform_services.cc @@ -0,0 +1,36 @@ +/* + * \brief Platform specific services for x86 + * \author Stefan Kalkowski + * \date 2012-10-26 + */ + +/* + * Copyright (C) 2012 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 +#include +#include +#include + + +/* + * Add x86 specific ioport service + */ +void Genode::platform_add_local_services(Rpc_entrypoint*, + Sliced_heap *sliced_heap, + Service_registry *local_services) +{ + static Io_port_root io_port_root(core_env()->cap_session(), + platform()->io_port_alloc(), sliced_heap); + static Local_service io_port_ls(Io_port_session::service_name(), + &io_port_root); + local_services->insert(&io_port_ls); +}