core: unify Pd_session_component across kernels

Issue #2407
This commit is contained in:
Norman Feske 2017-05-09 17:55:03 +02:00 committed by Christian Helmuth
parent 3fc2a798b2
commit a96919632e
12 changed files with 11 additions and 68 deletions

View File

@ -21,7 +21,6 @@ SRC_CC += stack_area.cc \
pager.cc \
pager_ep.cc \
pager_object.cc \
pd_session_component.cc \
rpc_cap_factory_l4.cc \
ram_dataspace_factory.cc \
pd_assign_pci.cc \
@ -57,7 +56,6 @@ vpath cap_session_component.cc $(GEN_CORE_DIR)
vpath cpu_session_component.cc $(GEN_CORE_DIR)
vpath cpu_session_support.cc $(GEN_CORE_DIR)
vpath cpu_thread_component.cc $(GEN_CORE_DIR)
vpath pd_session_component.cc $(GEN_CORE_DIR)
vpath capability_space.cc $(GEN_CORE_DIR)
vpath rpc_cap_factory_l4.cc $(GEN_CORE_DIR)
vpath ram_dataspace_factory.cc $(GEN_CORE_DIR)

View File

@ -19,7 +19,6 @@ SRC_CC += stack_area.cc \
main.cc \
pager.cc \
pager_object.cc \
pd_session_component.cc \
pd_assign_pci.cc \
pd_upgrade_ram_quota.cc \
native_cpu_component.cc \
@ -57,7 +56,6 @@ vpath default_log.cc $(GEN_CORE_DIR)
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 pd_session_component.cc $(GEN_CORE_DIR)
vpath pd_assign_pci.cc $(GEN_CORE_DIR)
vpath pd_upgrade_ram_quota.cc $(GEN_CORE_DIR)
vpath ram_session_component.cc $(GEN_CORE_DIR)

View File

@ -29,7 +29,6 @@ SRC_CC += io_mem_session_component.cc
SRC_CC += io_mem_session_support.cc
SRC_CC += irq_session_component.cc
SRC_CC += main.cc
SRC_CC += pd_session_component.cc
SRC_CC += pd_upgrade_ram_quota.cc
SRC_CC += pd_assign_pci.cc
SRC_CC += platform.cc

View File

@ -17,6 +17,7 @@
#define _CORE__INCLUDE__PLATFORM_PD_H_
#include <base/allocator.h>
#include <parent/parent.h>
namespace Genode {
struct Platform_pd;
@ -28,6 +29,8 @@ struct Genode::Platform_pd
Platform_pd(Allocator *, char const *) { }
bool bind_thread(Platform_thread *) { return true; }
void assign_parent(Capability<Parent>) { }
};
#endif /* _CORE__INCLUDE__PLATFORM_PD_H_ */

View File

@ -14,8 +14,8 @@ SRC_CC = main.cc \
cpu_session_component.cc \
cpu_session_support.cc \
cpu_thread_component.cc \
pd_session_component.cc \
pd_upgrade_ram_quota.cc \
pd_assign_pci.cc \
dataspace_component.cc \
native_pd_component.cc \
native_cpu_component.cc \
@ -53,6 +53,7 @@ vpath cpu_session_component.cc $(GEN_CORE_DIR)
vpath cpu_session_support.cc $(GEN_CORE_DIR)
vpath cpu_thread_component.cc $(GEN_CORE_DIR)
vpath pd_upgrade_ram_quota.cc $(GEN_CORE_DIR)
vpath pd_assign_pci.cc $(GEN_CORE_DIR)
vpath capability_space.cc $(GEN_CORE_DIR)
vpath rpc_cap_factory_l4.cc $(GEN_CORE_DIR)
vpath ram_dataspace_factory.cc $(GEN_CORE_DIR)

View File

@ -1,27 +0,0 @@
/*
* \brief Core implementation of the PD session interface
* \author Norman Feske
* \date 2012-08-15
*/
/*
* Copyright (C) 2012-2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
/* core-local includes */
#include <pd_session_component.h>
using namespace Genode;
void Pd_session_component::assign_parent(Capability<Parent> parent)
{
_parent = parent;
}
bool Pd_session_component::assign_pci(addr_t, uint16_t) { return true; }

View File

@ -22,7 +22,6 @@ SRC_CC += stack_area.cc \
irq_session_component.cc \
main.cc \
pager.cc \
pd_session_component.cc \
native_cpu_component.cc \
native_pd_component.cc \
pd_upgrade_ram_quota.cc \
@ -57,7 +56,6 @@ vpath rom_session_component.cc $(GEN_CORE_DIR)
vpath cpu_session_component.cc $(GEN_CORE_DIR)
vpath cpu_session_support.cc $(GEN_CORE_DIR)
vpath cpu_thread_component.cc $(GEN_CORE_DIR)
vpath pd_session_component.cc $(GEN_CORE_DIR)
vpath pd_upgrade_ram_quota.cc $(GEN_CORE_DIR)
vpath region_map_component.cc $(GEN_CORE_DIR)
vpath trace_session_component.cc $(GEN_CORE_DIR)

View File

@ -24,7 +24,6 @@ SRC_CC += stack_area.cc \
pager.cc \
pager_ep.cc \
pager_object.cc \
pd_session_component.cc \
pd_upgrade_ram_quota.cc \
pd_assign_pci.cc \
rpc_cap_factory_l4.cc \
@ -58,7 +57,6 @@ vpath cpu_thread_component.cc $(GEN_CORE_DIR)
vpath capability_space.cc $(GEN_CORE_DIR)
vpath rpc_cap_factory_l4.cc $(GEN_CORE_DIR)
vpath ram_dataspace_factory.cc $(GEN_CORE_DIR)
vpath pd_session_component.cc $(GEN_CORE_DIR)
vpath pd_upgrade_ram_quota.cc $(GEN_CORE_DIR)
vpath pd_assign_pci.cc $(GEN_CORE_DIR)
vpath region_map_component.cc $(GEN_CORE_DIR)

View File

@ -19,7 +19,6 @@ SRC_CC = stack_area.cc \
irq_session_component.cc \
kip.cc \
main.cc \
pd_session_component.cc \
rpc_cap_factory_l4.cc \
ram_dataspace_factory.cc \
pd_assign_pci.cc \
@ -53,7 +52,6 @@ vpath rom_session_component.cc $(GEN_CORE_DIR)
vpath cpu_session_component.cc $(GEN_CORE_DIR)
vpath cpu_session_support.cc $(GEN_CORE_DIR)
vpath cpu_thread_component.cc $(GEN_CORE_DIR)
vpath pd_session_component.cc $(GEN_CORE_DIR)
vpath pd_assign_pci.cc $(GEN_CORE_DIR)
vpath pd_upgrade_ram_quota.cc $(GEN_CORE_DIR)
vpath region_map_component.cc $(GEN_CORE_DIR)

View File

@ -8,7 +8,6 @@ SRC_CC += \
cpu_session_component.cc \
cpu_session_support.cc \
cpu_thread_component.cc \
pd_session_component.cc \
rpc_cap_factory.cc \
ram_dataspace_factory.cc \
pd_assign_pci.cc \
@ -52,7 +51,6 @@ vpath rom_session_component.cc $(GEN_CORE_DIR)
vpath cpu_session_component.cc $(GEN_CORE_DIR)
vpath cpu_session_support.cc $(GEN_CORE_DIR)
vpath cpu_thread_component.cc $(GEN_CORE_DIR)
vpath pd_session_component.cc $(GEN_CORE_DIR)
vpath pd_assign_pci.cc $(GEN_CORE_DIR)
vpath pd_upgrade_ram_quota.cc $(GEN_CORE_DIR)
vpath region_map_component.cc $(GEN_CORE_DIR)

View File

@ -165,7 +165,12 @@ class Genode::Pd_session_component : public Session_object<Pd_session>
** PD session interface **
**************************/
void assign_parent(Capability<Parent>) override;
void assign_parent(Capability<Parent> parent) override
{
_parent = parent;
_pd.assign_parent(parent);
}
bool assign_pci(addr_t, uint16_t) override;
Signal_source_capability alloc_signal_source() override

View File

@ -1,26 +0,0 @@
/*
* \brief Core implementation of the PD session interface
* \author Christian Helmuth
* \author Norman Feske
* \date 2006-07-17
*/
/*
* Copyright (C) 2006-2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
/* core-local includes */
#include <util.h>
#include <pd_session_component.h>
#include <cpu_session_component.h>
using namespace Genode;
void Pd_session_component::assign_parent(Parent_capability parent)
{
_pd.assign_parent(parent);
}