Introduce platform-specific services for core

By now all services in core where created, and registered in the generic
main routine. Although there exists already a x86-specific service (I/O ports)
there was no possibility to announce core-services for certain platforms only.
This commit introduces a hook function in the 'Platform' class, that enables
registration of platform-specific services. Moreover, the io-port service
is offered on x86 platforms only now.
This commit is contained in:
Stefan Kalkowski
2012-10-02 13:11:58 +02:00
parent 96d45c1159
commit dc3d784e6d
29 changed files with 246 additions and 460 deletions

View File

@ -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()
{ }

View File

@ -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