nova: extend pd_session by assign_pci function

This commit is contained in:
Alexander Boettcher
2013-02-11 11:44:04 +01:00
committed by Norman Feske
parent c114014c1c
commit c36f6a04a7
6 changed files with 151 additions and 2 deletions

View File

@ -0,0 +1,50 @@
/*
* \brief Core-specific instance of the PD session interface
* \author Christian Helmuth
* \date 2006-07-17
*/
/*
* 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.
*/
#ifndef _CORE__INCLUDE__PD_SESSION_COMPONENT_H_
#define _CORE__INCLUDE__PD_SESSION_COMPONENT_H_
/* Genode includes */
#include <base/rpc_server.h>
#include <pd_session/pd_session.h>
/* core includes */
#include <platform_pd.h>
namespace Genode {
class Pd_session_component : public Rpc_object<Pd_session>
{
private:
Platform_pd _pd;
Parent_capability _parent;
Rpc_entrypoint *_thread_ep;
public:
Pd_session_component(Rpc_entrypoint *thread_ep, const char *args)
: _thread_ep(thread_ep) { }
/**************************/
/** PD session interface **/
/**************************/
int bind_thread(Thread_capability);
int assign_parent(Parent_capability);
bool assign_pci(addr_t);
};
}
#endif /* _CORE__INCLUDE__PD_SESSION_COMPONENT_H_ */

View File

@ -0,0 +1,24 @@
/*
* \brief Extension of core implementation of the PD session interface
* \author Alexander Boettcher
* \date 2013-01-11
*/
/*
* Copyright (C) 2013-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 */
#include <pd_session_component.h>
using namespace Genode;
bool Pd_session_component::assign_pci(addr_t pci_config_memory)
{
uint8_t res = Nova::assign_pci(_pd.pd_sel(), pci_config_memory, 0);
return res == Nova::NOVA_OK;
}

View File

@ -32,6 +32,7 @@ SRC_CC = main.cc \
echo.cc \
dump_alloc.cc \
cpu_session_extension.cc \
pd_session_extension.cc \
core_printf.cc \
pager.cc