mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-26 00:41:08 +00:00
88b358c5ef
This patch establishes the sole use of generic headers across all kernels. The common 'native_capability.h' is based on the version of base-sel4. All traditional L4 kernels and Linux use the same implementation of the capability-lifetime management. On base-hw, NOVA, Fiasco.OC, and seL4, custom implementations (based on their original mechanisms) are used, with the potential to unify them further in the future. This change achieves binary compatibility of dynamically linked programs across all kernels. Furthermore, the patch introduces a Native_capability::print method, which allows the easy output of the kernel-specific capability representation using the base/log.h API. Issue #1993
43 lines
956 B
C++
43 lines
956 B
C++
/*
|
|
* \brief Utilities for direct capability-space manipulation
|
|
* \author Norman Feske
|
|
* \date 2016-07-08
|
|
*
|
|
* This interface is needed by L4Linux.
|
|
*/
|
|
|
|
/*
|
|
* Copyright (C) 2016 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__CAPABILITY_SPACE_H_
|
|
#define _INCLUDE__FOC__CAPABILITY_SPACE_H_
|
|
|
|
#include <base/capability.h>
|
|
#include <foc/native_capability.h>
|
|
|
|
namespace Genode { namespace Capability_space {
|
|
|
|
/**
|
|
* Allocate kernel capability selector without associating it with a
|
|
* Genode capability
|
|
*/
|
|
Fiasco::l4_cap_idx_t alloc_kcap();
|
|
|
|
/**
|
|
* Release kernel capability selector
|
|
*/
|
|
void free_kcap(Fiasco::l4_cap_idx_t);
|
|
|
|
/**
|
|
* Request kernel capability selector associated with Genode capability
|
|
*/
|
|
Fiasco::l4_cap_idx_t kcap(Native_capability);
|
|
|
|
} }
|
|
|
|
#endif /* _INCLUDE__FOC__CAPABILITY_SPACE_H_ */
|