mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-21 22:47:50 +00:00
0c299c5e08
This patch unifies the CPU session interface across all platforms. The former differences are moved to respective "native-CPU" interfaces. NOVA is not covered by the patch and still relies on a custom version of the core-internal 'cpu_session_component.h'. However, this will soon be removed once the ongoing rework of pause/single-step on NOVA is completed. Fixes #1922
40 lines
1.0 KiB
C++
40 lines
1.0 KiB
C++
/*
|
|
* \brief Client-side Fiasco.OC specific CPU session interface
|
|
* \author Stefan Kalkowski
|
|
* \author Norman Feske
|
|
* \date 2011-04-14
|
|
*/
|
|
|
|
/*
|
|
* Copyright (C) 2011-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 _INCLUDE__FOC_NATIVE_CPU__CLIENT_H_
|
|
#define _INCLUDE__FOC_NATIVE_CPU__CLIENT_H_
|
|
|
|
#include <foc_native_cpu/foc_native_cpu.h>
|
|
#include <base/rpc_client.h>
|
|
|
|
namespace Genode { struct Foc_native_cpu_client; }
|
|
|
|
|
|
struct Genode::Foc_native_cpu_client : Rpc_client<Foc_native_cpu>
|
|
{
|
|
explicit Foc_native_cpu_client(Capability<Native_cpu> cap)
|
|
: Rpc_client<Foc_native_cpu>(static_cap_cast<Foc_native_cpu>(cap)) { }
|
|
|
|
void enable_vcpu(Thread_capability cap, addr_t vcpu_state) {
|
|
call<Rpc_enable_vcpu>(cap, vcpu_state); }
|
|
|
|
Native_capability native_cap(Thread_capability cap) {
|
|
return call<Rpc_native_cap>(cap); }
|
|
|
|
Native_capability alloc_irq() {
|
|
return call<Rpc_alloc_irq>(); }
|
|
};
|
|
|
|
#endif /* _INCLUDE__FOC_NATIVE_CPU__CLIENT_H_ */
|