mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-19 23:53:55 +00:00
nova: extend pd_session by assign_pci function
This commit is contained in:
committed by
Norman Feske
parent
c114014c1c
commit
c36f6a04a7
50
base-nova/src/core/include/pd_session_component.h
Normal file
50
base-nova/src/core/include/pd_session_component.h
Normal 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_ */
|
24
base-nova/src/core/pd_session_extension.cc
Normal file
24
base-nova/src/core/pd_session_extension.cc
Normal 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;
|
||||
}
|
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user