2016-03-11 16:32:43 +00:00
|
|
|
/*
|
|
|
|
* \brief Kernel-specific thread meta data
|
|
|
|
* \author Norman Feske
|
|
|
|
* \date 2016-03-11
|
|
|
|
*
|
|
|
|
* On most platforms, the 'Genode::Native_thread' type is private to the
|
|
|
|
* base framework. However, on NOVA, we make the type publicly available to
|
|
|
|
* expose the low-level thread-specific capability selectors to user-level
|
|
|
|
* virtual-machine monitors (Seoul or VirtualBox).
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2017-02-20 12:23:52 +00:00
|
|
|
* Copyright (C) 2016-2017 Genode Labs GmbH
|
2016-03-11 16:32:43 +00:00
|
|
|
*
|
|
|
|
* This file is part of the Genode OS framework, which is distributed
|
2017-02-20 12:23:52 +00:00
|
|
|
* under the terms of the GNU Affero General Public License version 3.
|
2016-03-11 16:32:43 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _INCLUDE__NOVA__NATIVE_THREAD_H_
|
|
|
|
#define _INCLUDE__NOVA__NATIVE_THREAD_H_
|
|
|
|
|
|
|
|
#include <base/stdint.h>
|
2016-03-18 21:53:25 +00:00
|
|
|
#include <nova/receive_window.h>
|
2016-03-11 16:32:43 +00:00
|
|
|
|
|
|
|
namespace Genode { struct Native_thread; }
|
|
|
|
|
|
|
|
struct Genode::Native_thread
|
|
|
|
{
|
|
|
|
enum { INVALID_INDEX = ~0UL };
|
|
|
|
|
|
|
|
addr_t ec_sel; /* selector for execution context */
|
|
|
|
addr_t exc_pt_sel; /* base of event portal window */
|
2016-05-11 16:21:47 +00:00
|
|
|
bool vcpu; /* true if thread is a virtual CPU */
|
2016-05-17 14:13:56 +00:00
|
|
|
addr_t initial_ip; /* initial IP of local thread */
|
2016-03-11 16:32:43 +00:00
|
|
|
|
2016-03-18 21:53:25 +00:00
|
|
|
/* receive window for capability selectors received at the server side */
|
2016-06-15 13:04:54 +00:00
|
|
|
Receive_window server_rcv_window;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Designated selector to populate with the result of an IPC call
|
|
|
|
*
|
|
|
|
* By default, the client-side receive window for delegated selectors
|
|
|
|
* is automatically allocated within the component's selector space.
|
|
|
|
* However, in special cases such as during the initialization of a
|
|
|
|
* user-level VMM (ports/include/vmm/vcpu_dispatcher.h), the targeted
|
|
|
|
* selector is defined manually. The 'client_rcv_sel' provides the
|
|
|
|
* hook for such a manual allocation. If it contains a valid selector
|
|
|
|
* value, the value is used as the basis of the receive window of an
|
|
|
|
* 'ipc_call'.
|
|
|
|
*/
|
|
|
|
addr_t client_rcv_sel = INVALID_INDEX;
|
|
|
|
|
|
|
|
void reset_client_rcv_sel() { client_rcv_sel = INVALID_INDEX; }
|
2016-03-18 21:53:25 +00:00
|
|
|
|
2016-04-20 19:12:57 +00:00
|
|
|
Native_capability pager_cap;
|
|
|
|
|
2016-03-11 16:32:43 +00:00
|
|
|
Native_thread() : ec_sel(INVALID_INDEX),
|
2016-05-17 14:13:56 +00:00
|
|
|
exc_pt_sel(INVALID_INDEX),
|
|
|
|
vcpu(false),
|
|
|
|
initial_ip(0) { }
|
2016-03-11 16:32:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* _INCLUDE__NOVA__NATIVE_THREAD_H_ */
|