mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-20 16:10:29 +00:00
core: introduce 'Core' namespace
The namespace draws a clear line between the base library and the core component. It is declared at the new core-local header <types.h>, which is expected to be included by all code of the core component. It is thereby a natural place for kernel-agnostic general types like commonly used C++ utilities. Fixes #4777
This commit is contained in:
committed by
Christian Helmuth
parent
487aad6db1
commit
2e6dd010ae
@ -11,13 +11,15 @@
|
||||
* under the terms of the GNU Affero General Public License version 3.
|
||||
*/
|
||||
|
||||
/* base includes */
|
||||
/* Genode includes */
|
||||
#include <base/capability.h>
|
||||
#include <base/log.h>
|
||||
|
||||
/* base-internal includes */
|
||||
#include <base/internal/capability_space_tpl.h>
|
||||
|
||||
/* core includes */
|
||||
#include <types.h>
|
||||
|
||||
|
||||
/**
|
||||
* Definition of capability meta data
|
||||
@ -33,7 +35,7 @@ struct Genode::Native_capability::Data : Capability_data
|
||||
};
|
||||
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -12,11 +12,17 @@
|
||||
* under the terms of the GNU Affero General Public License version 3.
|
||||
*/
|
||||
|
||||
/* Genode includes */
|
||||
#include <util/string.h>
|
||||
|
||||
/* core includes */
|
||||
#include <core_log.h>
|
||||
|
||||
static Genode::Core_log_range range { 0, 0 };
|
||||
|
||||
static Core::Core_log_range range { 0, 0 };
|
||||
static unsigned range_pos { 0 };
|
||||
|
||||
|
||||
static void out_mem(char const c)
|
||||
{
|
||||
struct Log_memory
|
||||
@ -25,7 +31,7 @@ static void out_mem(char const c)
|
||||
char data[1];
|
||||
|
||||
unsigned out(char const c, unsigned cur_pos,
|
||||
Genode::Core_log_range const &range)
|
||||
Core::Core_log_range const &range)
|
||||
{
|
||||
pos.value = cur_pos;
|
||||
data[cur_pos++] = c;
|
||||
@ -40,10 +46,10 @@ static void out_mem(char const c)
|
||||
}
|
||||
|
||||
|
||||
void Genode::init_core_log(Core_log_range const &r) { range = r; }
|
||||
void Core::init_core_log(Core_log_range const &r) { range = r; }
|
||||
|
||||
|
||||
void Genode::Core_log::output(char const * str)
|
||||
void Core::Core_log::output(char const * str)
|
||||
{
|
||||
for (unsigned i = 0; i < Genode::strlen(str); i++) {
|
||||
out(str[i]);
|
||||
|
@ -13,13 +13,12 @@
|
||||
*/
|
||||
|
||||
/* Genode includes */
|
||||
#include <base/log.h>
|
||||
#include <base/thread.h>
|
||||
|
||||
/* local includes */
|
||||
#include <core_mem_alloc.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
void * Mapped_avl_allocator::map_addr(void * addr)
|
||||
@ -83,8 +82,9 @@ void Mapped_mem_allocator::free(void *addr, size_t)
|
||||
if (!b) return;
|
||||
|
||||
if (!_unmap_local((addr_t)addr, (addr_t)b->map_addr, b->size())) {
|
||||
Genode::error("error on unmap virt=", addr, " phys=",
|
||||
Hex_range<addr_t>((addr_t)b->map_addr, b->size()));
|
||||
error("error on unmap virt=", addr, " phys=",
|
||||
Hex_range<addr_t>((addr_t)b->map_addr, b->size()));
|
||||
|
||||
/* leak physical and virtual region because of unknown usage state */
|
||||
return;
|
||||
}
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include <platform.h>
|
||||
#include <core_region_map.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
Region_map::Local_addr
|
||||
|
@ -14,11 +14,11 @@
|
||||
/* Genode includes */
|
||||
#include <base/rpc_server.h>
|
||||
|
||||
/* core-local includes */
|
||||
/* core includes */
|
||||
#include <platform_generic.h>
|
||||
#include <rpc_cap_factory.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
static Rpc_cap_factory &rpc_cap_factory()
|
||||
|
@ -14,7 +14,6 @@
|
||||
*/
|
||||
|
||||
/* Genode includes */
|
||||
#include <base/log.h>
|
||||
#include <util/arg_string.h>
|
||||
|
||||
/* core includes */
|
||||
@ -23,7 +22,7 @@
|
||||
#include <pd_session_component.h>
|
||||
#include <platform_generic.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
Thread_capability Cpu_session_component::create_thread(Capability<Pd_session> pd_cap,
|
||||
@ -378,7 +377,7 @@ size_t Cpu_session_component::_weight_to_quota(size_t const weight) const
|
||||
** Trace::Source_registry **
|
||||
****************************/
|
||||
|
||||
unsigned Trace::Source::_alloc_unique_id()
|
||||
unsigned Core::Trace::Source::_alloc_unique_id()
|
||||
{
|
||||
static Mutex lock;
|
||||
static unsigned cnt;
|
||||
|
@ -11,13 +11,10 @@
|
||||
* under the terms of the GNU Affero General Public License version 3.
|
||||
*/
|
||||
|
||||
/* Genode includes */
|
||||
#include <base/log.h>
|
||||
|
||||
/* core includes */
|
||||
#include <cpu_session_component.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
Dataspace_capability Cpu_thread_component::utcb()
|
||||
|
@ -14,7 +14,7 @@
|
||||
/* core includes */
|
||||
#include <cpu_thread_component.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
void Cpu_thread_component::_update_exception_sigh()
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include <dataspace_component.h>
|
||||
#include <region_map_component.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
void Dataspace_component::attached_to(Rm_region ®ion)
|
||||
|
@ -13,7 +13,6 @@
|
||||
*/
|
||||
|
||||
/* Genode includes */
|
||||
#include <base/log.h>
|
||||
#include <base/buffered_output.h>
|
||||
|
||||
/* base-internal includes */
|
||||
@ -28,7 +27,7 @@ Genode::Log &Genode::Log::log()
|
||||
{
|
||||
struct Buffer
|
||||
{
|
||||
struct Write_fn : Core_log
|
||||
struct Write_fn : Core::Core_log
|
||||
{
|
||||
void operator () (char const *s) { output(s); }
|
||||
} function { };
|
||||
|
@ -14,15 +14,17 @@
|
||||
#ifndef _CORE__INCLUDE__ACCOUNT_H_
|
||||
#define _CORE__INCLUDE__ACCOUNT_H_
|
||||
|
||||
#include <util/reconstructible.h>
|
||||
#include <base/registry.h>
|
||||
#include <base/quota_guard.h>
|
||||
|
||||
namespace Genode { template <typename> class Account; }
|
||||
/* core includes */
|
||||
#include <types.h>
|
||||
|
||||
namespace Core { template <typename> class Account; }
|
||||
|
||||
|
||||
template <typename UNIT>
|
||||
class Genode::Account
|
||||
class Core::Account
|
||||
{
|
||||
private:
|
||||
|
||||
|
@ -14,14 +14,17 @@
|
||||
#ifndef _CORE__INCLUDE__ADDRESS_SPACE_H_
|
||||
#define _CORE__INCLUDE__ADDRESS_SPACE_H_
|
||||
|
||||
#include <base/stdint.h>
|
||||
/* Genode includes */
|
||||
#include <base/weak_ptr.h>
|
||||
|
||||
namespace Genode { struct Address_space; }
|
||||
/* core includes */
|
||||
#include <types.h>
|
||||
|
||||
namespace Core { struct Address_space; }
|
||||
|
||||
|
||||
struct Genode::Address_space : private Weak_object<Address_space>,
|
||||
public Interface
|
||||
struct Core::Address_space : private Weak_object<Address_space>,
|
||||
public Interface
|
||||
{
|
||||
friend class Locked_ptr<Address_space>;
|
||||
|
||||
|
@ -14,19 +14,22 @@
|
||||
#ifndef _CORE__INCLUDE__BOOT_MODULES_H_
|
||||
#define _CORE__INCLUDE__BOOT_MODULES_H_
|
||||
|
||||
namespace Genode { struct Boot_modules_header; }
|
||||
/* core includes */
|
||||
#include <types.h>
|
||||
|
||||
namespace Core { struct Boot_modules_header; }
|
||||
|
||||
|
||||
struct Genode::Boot_modules_header
|
||||
struct Core::Boot_modules_header
|
||||
{
|
||||
long name; /* physical address of null-terminated string */
|
||||
long base; /* physical address of module data */
|
||||
long size; /* size of module data in bytes */
|
||||
};
|
||||
|
||||
extern Genode::Boot_modules_header _boot_modules_headers_begin;
|
||||
extern Genode::Boot_modules_header _boot_modules_headers_end;
|
||||
extern int _boot_modules_binaries_begin;
|
||||
extern int _boot_modules_binaries_end;
|
||||
extern Core::Boot_modules_header _boot_modules_headers_begin;
|
||||
extern Core::Boot_modules_header _boot_modules_headers_end;
|
||||
extern int _boot_modules_binaries_begin;
|
||||
extern int _boot_modules_binaries_end;
|
||||
|
||||
#endif /* _CORE__INCLUDE__BOOT_MODULES_H_ */
|
||||
|
@ -15,12 +15,16 @@
|
||||
#ifndef _CORE__INCLUDE__CORE_CONSTRAINED_CORE_RAM_H_
|
||||
#define _CORE__INCLUDE__CORE_CONSTRAINED_CORE_RAM_H_
|
||||
|
||||
/* Genode includes */
|
||||
#include <base/allocator.h>
|
||||
|
||||
namespace Genode { class Constrained_core_ram; }
|
||||
/* core includes */
|
||||
#include <types.h>
|
||||
|
||||
namespace Core { class Constrained_core_ram; }
|
||||
|
||||
|
||||
class Genode::Constrained_core_ram : public Allocator
|
||||
class Core::Constrained_core_ram : public Allocator
|
||||
{
|
||||
private:
|
||||
|
||||
@ -28,7 +32,7 @@ class Genode::Constrained_core_ram : public Allocator
|
||||
Cap_quota_guard &_cap_guard;
|
||||
Range_allocator &_core_mem;
|
||||
|
||||
uint64_t core_mem_allocated { 0 };
|
||||
Genode::uint64_t core_mem_allocated { 0 };
|
||||
|
||||
public:
|
||||
|
||||
|
@ -17,10 +17,15 @@
|
||||
/* base-internal includes */
|
||||
#include <base/internal/rpc_obj_key.h>
|
||||
|
||||
namespace Genode { class Cap_sel; class Pd_session; }
|
||||
/* core includes */
|
||||
#include <types.h>
|
||||
|
||||
namespace Genode {
|
||||
|
||||
namespace Genode { namespace Capability_space {
|
||||
class Pd_session;
|
||||
class Cap_sel;
|
||||
|
||||
namespace Capability_space {
|
||||
|
||||
/**
|
||||
* Create new RPC object capability for the specified entrypoint
|
||||
@ -29,7 +34,7 @@ namespace Genode { namespace Capability_space {
|
||||
Pd_session const *,
|
||||
Rpc_obj_key);
|
||||
|
||||
Native_capability create_notification_cap(Genode::Cap_sel ¬ify_cap);
|
||||
Native_capability create_notification_cap(Cap_sel ¬ify_cap);
|
||||
} }
|
||||
|
||||
#endif /* _CORE__INCLUDE__CORE_CAPABILITY_SPACE_H_ */
|
||||
|
@ -29,14 +29,14 @@
|
||||
#include <synced_ram_allocator.h>
|
||||
#include <assertion.h>
|
||||
|
||||
namespace Genode {
|
||||
namespace Core {
|
||||
|
||||
class Core_env;
|
||||
extern Core_env &core_env();
|
||||
}
|
||||
|
||||
|
||||
class Genode::Core_env : public Env_deprecated, Noncopyable
|
||||
class Core::Core_env : public Env_deprecated, Noncopyable
|
||||
{
|
||||
private:
|
||||
|
||||
|
@ -15,9 +15,10 @@
|
||||
#ifndef _CORE_LOG_H_
|
||||
#define _CORE_LOG_H_
|
||||
|
||||
#include <util/string.h>
|
||||
/* core includes */
|
||||
#include <types.h>
|
||||
|
||||
namespace Genode {
|
||||
namespace Core {
|
||||
|
||||
struct Core_log;
|
||||
|
||||
@ -30,7 +31,7 @@ namespace Genode {
|
||||
}
|
||||
|
||||
|
||||
struct Genode::Core_log
|
||||
struct Core::Core_log
|
||||
{
|
||||
void out(char const c);
|
||||
|
||||
|
@ -15,12 +15,16 @@
|
||||
#ifndef _CORE__INCLUDE__CORE_MEM_ALLOC_H_
|
||||
#define _CORE__INCLUDE__CORE_MEM_ALLOC_H_
|
||||
|
||||
/* Genode includes */
|
||||
#include <base/allocator_avl.h>
|
||||
#include <base/mutex.h>
|
||||
|
||||
/* core includes */
|
||||
#include <synced_range_allocator.h>
|
||||
#include <util.h>
|
||||
|
||||
namespace Genode {
|
||||
namespace Core {
|
||||
|
||||
class Core_mem_translator;
|
||||
class Core_mem_allocator;
|
||||
|
||||
@ -39,7 +43,7 @@ namespace Genode {
|
||||
* Interface of an allocator that allows to return physical addresses
|
||||
* of its used virtual address ranges, and vice versa.
|
||||
*/
|
||||
class Genode::Core_mem_translator : public Genode::Range_allocator
|
||||
class Core::Core_mem_translator : public Range_allocator
|
||||
{
|
||||
public:
|
||||
|
||||
@ -62,14 +66,13 @@ class Genode::Core_mem_translator : public Genode::Range_allocator
|
||||
/**
|
||||
* Metadata for allocator blocks that stores a related address
|
||||
*/
|
||||
struct Genode::Metadata { void * map_addr; };
|
||||
struct Core::Metadata { void * map_addr; };
|
||||
|
||||
|
||||
/**
|
||||
* Page-size granular allocator that links ranges to related ones.
|
||||
*/
|
||||
class Genode::Mapped_avl_allocator
|
||||
: public Genode::Allocator_avl_tpl<Genode::Metadata, Genode::get_page_size()>
|
||||
class Core::Mapped_avl_allocator : public Allocator_avl_tpl<Metadata, get_page_size()>
|
||||
{
|
||||
friend class Mapped_mem_allocator;
|
||||
|
||||
@ -99,7 +102,7 @@ class Genode::Mapped_avl_allocator
|
||||
* meta-data allocator for the other allocators and as back end for core's
|
||||
* synchronized memory allocator.
|
||||
*/
|
||||
class Genode::Mapped_mem_allocator : public Genode::Core_mem_translator
|
||||
class Core::Mapped_mem_allocator : public Core_mem_translator
|
||||
{
|
||||
private:
|
||||
|
||||
@ -196,7 +199,7 @@ class Genode::Mapped_mem_allocator : public Genode::Core_mem_translator
|
||||
* The class itself implements a ready-to-use memory allocator for
|
||||
* core that allows to allocate memory at page granularity only.
|
||||
*/
|
||||
class Genode::Core_mem_allocator : public Genode::Core_mem_translator
|
||||
class Core::Core_mem_allocator : public Core_mem_translator
|
||||
{
|
||||
protected:
|
||||
|
||||
|
@ -21,10 +21,10 @@
|
||||
/* core includes */
|
||||
#include <dataspace_component.h>
|
||||
|
||||
namespace Genode { class Core_region_map; }
|
||||
namespace Core { class Core_region_map; }
|
||||
|
||||
|
||||
class Genode::Core_region_map : public Region_map
|
||||
class Core::Core_region_map : public Region_map
|
||||
{
|
||||
private:
|
||||
|
||||
|
@ -16,11 +16,14 @@
|
||||
|
||||
#include <base/service.h>
|
||||
|
||||
namespace Genode { template <typename> struct Core_service; }
|
||||
/* core includes */
|
||||
#include <types.h>
|
||||
|
||||
namespace Core { template <typename> struct Core_service; }
|
||||
|
||||
|
||||
template <typename SESSION>
|
||||
struct Genode::Core_service : Local_service<SESSION>
|
||||
struct Core::Core_service : Local_service<SESSION>
|
||||
{
|
||||
Registry<Service>::Element _element;
|
||||
|
||||
|
@ -20,10 +20,10 @@
|
||||
/* Core includes */
|
||||
#include <cpu_session_component.h>
|
||||
|
||||
namespace Genode { class Cpu_root; }
|
||||
namespace Core { class Cpu_root; }
|
||||
|
||||
|
||||
class Genode::Cpu_root : public Root_component<Cpu_session_component>
|
||||
class Core::Cpu_root : public Root_component<Cpu_session_component>
|
||||
{
|
||||
private:
|
||||
|
||||
|
@ -32,11 +32,11 @@
|
||||
#include <trace/source_registry.h>
|
||||
#include <native_cpu_component.h>
|
||||
|
||||
namespace Genode { class Cpu_session_component; }
|
||||
namespace Core { class Cpu_session_component; }
|
||||
|
||||
|
||||
class Genode::Cpu_session_component : public Session_object<Cpu_session>,
|
||||
private List<Cpu_session_component>::Element
|
||||
class Core::Cpu_session_component : public Session_object<Cpu_session>,
|
||||
private List<Cpu_session_component>::Element
|
||||
{
|
||||
private:
|
||||
|
||||
|
@ -18,10 +18,13 @@
|
||||
#include <base/tslab.h>
|
||||
#include <base/heap.h>
|
||||
|
||||
/* core includes */
|
||||
#include <types.h>
|
||||
|
||||
/* base-internal includes */
|
||||
#include <base/internal/page_size.h>
|
||||
|
||||
namespace Genode {
|
||||
namespace Core {
|
||||
|
||||
class Cpu_thread_component;
|
||||
|
||||
|
@ -28,12 +28,12 @@
|
||||
#include <trace/control_area.h>
|
||||
#include <trace/source_registry.h>
|
||||
|
||||
namespace Genode { class Cpu_thread_component; }
|
||||
namespace Core { class Cpu_thread_component; }
|
||||
|
||||
|
||||
class Genode::Cpu_thread_component : public Rpc_object<Cpu_thread>,
|
||||
private List<Cpu_thread_component>::Element,
|
||||
public Trace::Source::Info_accessor
|
||||
class Core::Cpu_thread_component : public Rpc_object<Cpu_thread>,
|
||||
private List<Cpu_thread_component>::Element,
|
||||
public Trace::Source::Info_accessor
|
||||
{
|
||||
public:
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
/* core includes */
|
||||
#include <util.h>
|
||||
|
||||
namespace Genode {
|
||||
namespace Core {
|
||||
|
||||
class Rm_region;
|
||||
class Dataspace_component;
|
||||
@ -35,7 +35,7 @@ namespace Genode {
|
||||
}
|
||||
|
||||
|
||||
class Genode::Dataspace_component : public Rpc_object<Dataspace>
|
||||
class Core::Dataspace_component : public Rpc_object<Dataspace>
|
||||
{
|
||||
private:
|
||||
|
||||
@ -134,7 +134,7 @@ class Genode::Dataspace_component : public Rpc_object<Dataspace>
|
||||
*/
|
||||
addr_t map_src_addr() const
|
||||
{
|
||||
return Genode::map_src_addr(_core_local_addr, _phys_addr);
|
||||
return Core::map_src_addr(_core_local_addr, _phys_addr);
|
||||
}
|
||||
|
||||
void assign_core_local_addr(void *addr) { _core_local_addr = (addr_t)addr; }
|
||||
|
@ -16,12 +16,13 @@
|
||||
|
||||
#include <root/component.h>
|
||||
|
||||
#include "io_mem_session_component.h"
|
||||
/* core includes */
|
||||
#include <io_mem_session_component.h>
|
||||
|
||||
namespace Genode { class Io_mem_root; }
|
||||
namespace Core { class Io_mem_root; }
|
||||
|
||||
|
||||
class Genode::Io_mem_root : public Root_component<Io_mem_session_component>
|
||||
class Core::Io_mem_root : public Root_component<Io_mem_session_component>
|
||||
{
|
||||
|
||||
private:
|
||||
|
@ -22,10 +22,10 @@
|
||||
/* core includes */
|
||||
#include <dataspace_component.h>
|
||||
|
||||
namespace Genode { class Io_mem_session_component; }
|
||||
namespace Core { class Io_mem_session_component; }
|
||||
|
||||
|
||||
class Genode::Io_mem_session_component : public Rpc_object<Io_mem_session>
|
||||
class Core::Io_mem_session_component : public Rpc_object<Io_mem_session>
|
||||
{
|
||||
private:
|
||||
|
||||
|
@ -16,15 +16,16 @@
|
||||
|
||||
#include <root/component.h>
|
||||
|
||||
#include "io_port_session_component.h"
|
||||
/* core includes */
|
||||
#include <io_port_session_component.h>
|
||||
|
||||
namespace Genode {
|
||||
namespace Core {
|
||||
class Io_port_handler;
|
||||
class Io_port_root;
|
||||
}
|
||||
|
||||
|
||||
class Genode::Io_port_handler
|
||||
class Core::Io_port_handler
|
||||
{
|
||||
private:
|
||||
|
||||
@ -41,8 +42,8 @@ class Genode::Io_port_handler
|
||||
};
|
||||
|
||||
|
||||
class Genode::Io_port_root : private Io_port_handler,
|
||||
public Root_component<Io_port_session_component>
|
||||
class Core::Io_port_root : private Io_port_handler,
|
||||
public Root_component<Io_port_session_component>
|
||||
{
|
||||
|
||||
private:
|
||||
|
@ -24,10 +24,10 @@
|
||||
/* core includes */
|
||||
#include <dataspace_component.h>
|
||||
|
||||
namespace Genode { class Io_port_session_component; }
|
||||
namespace Core { class Io_port_session_component; }
|
||||
|
||||
|
||||
class Genode::Io_port_session_component : public Rpc_object<Io_port_session>
|
||||
class Core::Io_port_session_component : public Rpc_object<Io_port_session>
|
||||
{
|
||||
private:
|
||||
|
||||
|
@ -14,14 +14,16 @@
|
||||
#ifndef _CORE__INCLUDE__IRQ_ARGS_H_
|
||||
#define _CORE__INCLUDE__IRQ_ARGS_H_
|
||||
|
||||
#include <base/log.h>
|
||||
#include <util/arg_string.h>
|
||||
#include <irq_session/irq_session.h>
|
||||
|
||||
namespace Genode { class Irq_args; }
|
||||
/* core includes */
|
||||
#include <types.h>
|
||||
|
||||
namespace Core { class Irq_args; }
|
||||
|
||||
|
||||
class Genode::Irq_args
|
||||
class Core::Irq_args
|
||||
{
|
||||
private:
|
||||
|
||||
|
@ -16,10 +16,13 @@
|
||||
|
||||
#include <base/thread.h>
|
||||
|
||||
namespace Genode { class Irq_object; }
|
||||
/* core includes */
|
||||
#include <types.h>
|
||||
|
||||
namespace Core { class Irq_object; }
|
||||
|
||||
|
||||
class Genode::Irq_object : public Thread
|
||||
class Core::Irq_object : public Thread
|
||||
{
|
||||
private:
|
||||
|
||||
|
@ -16,12 +16,14 @@
|
||||
#define _CORE__INCLUDE__IRQ_ROOT_H_
|
||||
|
||||
#include <root/component.h>
|
||||
|
||||
/* core includes */
|
||||
#include <irq_session_component.h>
|
||||
|
||||
namespace Genode { class Irq_root; }
|
||||
namespace Core { class Irq_root; }
|
||||
|
||||
|
||||
class Genode::Irq_root : public Root_component<Irq_session_component>
|
||||
class Core::Irq_root : public Root_component<Irq_session_component>
|
||||
{
|
||||
|
||||
private:
|
||||
|
@ -20,13 +20,14 @@
|
||||
#include <irq_session/irq_session.h>
|
||||
#include <irq_session/capability.h>
|
||||
|
||||
/* core includes */
|
||||
#include <irq_object.h>
|
||||
|
||||
namespace Genode { class Irq_session_component; }
|
||||
namespace Core { class Irq_session_component; }
|
||||
|
||||
|
||||
class Genode::Irq_session_component : public Rpc_object<Irq_session>,
|
||||
private List<Irq_session_component>::Element
|
||||
class Core::Irq_session_component : public Rpc_object<Irq_session>,
|
||||
private List<Irq_session_component>::Element
|
||||
{
|
||||
private:
|
||||
|
||||
|
@ -17,12 +17,13 @@
|
||||
#include <root/component.h>
|
||||
#include <util/arg_string.h>
|
||||
|
||||
#include "log_session_component.h"
|
||||
/* core includes */
|
||||
#include <log_session_component.h>
|
||||
|
||||
namespace Genode { class Log_root; }
|
||||
namespace Core { class Log_root; }
|
||||
|
||||
|
||||
class Genode::Log_root : public Root_component<Log_session_component>
|
||||
class Core::Log_root : public Root_component<Log_session_component>
|
||||
{
|
||||
protected:
|
||||
|
||||
|
@ -14,16 +14,17 @@
|
||||
#ifndef _CORE__INCLUDE__LOG_SESSION_COMPONENT_H_
|
||||
#define _CORE__INCLUDE__LOG_SESSION_COMPONENT_H_
|
||||
|
||||
#include <util/string.h>
|
||||
#include <base/log.h>
|
||||
#include <base/rpc_server.h>
|
||||
#include <base/session_label.h>
|
||||
#include <log_session/log_session.h>
|
||||
|
||||
namespace Genode { class Log_session_component; }
|
||||
/* core includes */
|
||||
#include <types.h>
|
||||
|
||||
namespace Core { class Log_session_component; }
|
||||
|
||||
|
||||
class Genode::Log_session_component : public Rpc_object<Log_session>
|
||||
class Core::Log_session_component : public Rpc_object<Log_session>
|
||||
{
|
||||
private:
|
||||
|
||||
@ -58,7 +59,7 @@ class Genode::Log_session_component : public Rpc_object<Log_session>
|
||||
}
|
||||
|
||||
char const * const string = string_buf.string();
|
||||
size_t const len = strlen(string);
|
||||
size_t const len = Genode::strlen(string);
|
||||
|
||||
unsigned from_i = 0;
|
||||
for (unsigned i = 0; i < len; i++) {
|
||||
|
@ -14,12 +14,13 @@
|
||||
#ifndef _CORE__INCLUDE__MAPPING_H_
|
||||
#define _CORE__INCLUDE__MAPPING_H_
|
||||
|
||||
#include <base/stdint.h>
|
||||
/* core includes */
|
||||
#include <types.h>
|
||||
|
||||
namespace Genode { struct Mapping; }
|
||||
namespace Core { struct Mapping; }
|
||||
|
||||
|
||||
struct Genode::Mapping
|
||||
struct Core::Mapping
|
||||
{
|
||||
addr_t dst_addr;
|
||||
addr_t src_addr;
|
||||
|
@ -19,17 +19,17 @@
|
||||
/* Genode includes */
|
||||
#include <cpu_session/cpu_session.h>
|
||||
|
||||
/* core-local includes */
|
||||
/* core includes */
|
||||
#include <rpc_cap_factory.h>
|
||||
|
||||
namespace Genode {
|
||||
namespace Core {
|
||||
|
||||
class Cpu_session_component;
|
||||
class Native_cpu_component;
|
||||
}
|
||||
|
||||
|
||||
struct Genode::Native_cpu_component
|
||||
struct Core::Native_cpu_component
|
||||
{
|
||||
Native_cpu_component(Cpu_session_component &, char const *) { }
|
||||
|
||||
|
@ -19,17 +19,17 @@
|
||||
/* Genode includes */
|
||||
#include <pd_session/pd_session.h>
|
||||
|
||||
/* core-local includes */
|
||||
/* core includes */
|
||||
#include <rpc_cap_factory.h>
|
||||
|
||||
namespace Genode {
|
||||
namespace Core {
|
||||
|
||||
class Pd_session_component;
|
||||
class Native_pd_component;
|
||||
}
|
||||
|
||||
|
||||
struct Genode::Native_pd_component
|
||||
struct Core::Native_pd_component
|
||||
{
|
||||
Native_pd_component(Pd_session_component &, char const *) { }
|
||||
|
||||
|
@ -24,11 +24,11 @@
|
||||
#include <cpu_session/cpu_session.h>
|
||||
#include <ipc_pager.h>
|
||||
|
||||
/* core-local includes */
|
||||
/* core includes */
|
||||
#include <rpc_cap_factory.h>
|
||||
#include <pager_object_exception_state.h>
|
||||
|
||||
namespace Genode {
|
||||
namespace Core {
|
||||
|
||||
typedef Cpu_session::Thread_creation_failed Invalid_thread;
|
||||
|
||||
@ -46,11 +46,13 @@ namespace Genode {
|
||||
*/
|
||||
class Pager_entrypoint;
|
||||
|
||||
using Pager_capability = Capability<Pager_object>;
|
||||
|
||||
enum { PAGER_EP_STACK_SIZE = sizeof(addr_t) * 2048 };
|
||||
}
|
||||
|
||||
|
||||
class Genode::Pager_object : public Object_pool<Pager_object>::Entry
|
||||
class Core::Pager_object : public Object_pool<Pager_object>::Entry
|
||||
{
|
||||
protected:
|
||||
|
||||
@ -162,8 +164,8 @@ class Genode::Pager_object : public Object_pool<Pager_object>::Entry
|
||||
};
|
||||
|
||||
|
||||
class Genode::Pager_entrypoint : public Object_pool<Pager_object>,
|
||||
public Thread
|
||||
class Core::Pager_entrypoint : public Object_pool<Pager_object>,
|
||||
public Thread
|
||||
{
|
||||
private:
|
||||
|
||||
|
@ -16,6 +16,9 @@
|
||||
|
||||
#include <base/thread_state.h>
|
||||
|
||||
namespace Genode { typedef Thread_state Pager_object_exception_state; }
|
||||
/* core includes */
|
||||
#include <types.h>
|
||||
|
||||
namespace Core { typedef Thread_state Pager_object_exception_state; }
|
||||
|
||||
#endif /* _CORE__INCLUDE__PAGER_OBJECT_EXCEPTION_STATE_H_ */
|
||||
|
@ -20,10 +20,10 @@
|
||||
/* Core */
|
||||
#include <pd_session_component.h>
|
||||
|
||||
namespace Genode { class Pd_root; }
|
||||
namespace Core { class Pd_root; }
|
||||
|
||||
|
||||
class Genode::Pd_root : public Genode::Root_component<Genode::Pd_session_component>
|
||||
class Core::Pd_root : public Root_component<Pd_session_component>
|
||||
{
|
||||
private:
|
||||
|
||||
@ -58,7 +58,8 @@ class Genode::Pd_root : public Genode::Root_component<Genode::Pd_session_compone
|
||||
|
||||
static Ram_dataspace_factory::Virt_range _virt_range_from_args(char const *args)
|
||||
{
|
||||
addr_t const constrained = Arg_string::find_arg(args, "virt_space").ulong_value(Genode::Pd_connection::Virt_space::CONSTRAIN);
|
||||
addr_t const constrained = Arg_string::find_arg(args, "virt_space")
|
||||
.ulong_value(Pd_connection::Virt_space::CONSTRAIN);
|
||||
|
||||
if (!constrained)
|
||||
return Ram_dataspace_factory::Virt_range { 0x1000, 0UL - 0x2000 };
|
||||
|
@ -17,7 +17,6 @@
|
||||
#define _CORE__INCLUDE__PD_SESSION_COMPONENT_H_
|
||||
|
||||
/* Genode includes */
|
||||
#include <util/reconstructible.h>
|
||||
#include <base/session_object.h>
|
||||
#include <base/registry.h>
|
||||
#include <base/heap.h>
|
||||
@ -38,10 +37,10 @@
|
||||
#include <platform_generic.h>
|
||||
#include <account.h>
|
||||
|
||||
namespace Genode { class Pd_session_component; }
|
||||
namespace Core { class Pd_session_component; }
|
||||
|
||||
|
||||
class Genode::Pd_session_component : public Session_object<Pd_session>
|
||||
class Core::Pd_session_component : public Session_object<Pd_session>
|
||||
{
|
||||
public:
|
||||
|
||||
@ -206,7 +205,7 @@ class Genode::Pd_session_component : public Session_object<Pd_session>
|
||||
{
|
||||
_consume_cap(SIG_SOURCE_CAP);
|
||||
try { return _signal_broker.alloc_signal_source(); }
|
||||
catch (Genode::Allocator::Out_of_memory) {
|
||||
catch (Allocator::Out_of_memory) {
|
||||
_released_cap_silent();
|
||||
throw Out_of_ram();
|
||||
}
|
||||
|
@ -22,7 +22,7 @@
|
||||
/* core includes */
|
||||
#include <rom_fs.h>
|
||||
|
||||
namespace Genode {
|
||||
namespace Core {
|
||||
|
||||
class Platform_generic;
|
||||
|
||||
@ -42,7 +42,7 @@ namespace Genode {
|
||||
}
|
||||
|
||||
|
||||
class Genode::Platform_generic
|
||||
class Core::Platform_generic
|
||||
{
|
||||
public:
|
||||
|
||||
|
@ -14,15 +14,18 @@
|
||||
#ifndef _CORE__INCLUDE__PLATFORM_SERVICES_H_
|
||||
#define _CORE__INCLUDE__PLATFORM_SERVICES_H_
|
||||
|
||||
/* core includes */
|
||||
#include <core_service.h>
|
||||
#include <trace/source_registry.h>
|
||||
|
||||
namespace Genode {
|
||||
|
||||
class Rpc_entrypoint;
|
||||
class Sliced_heap;
|
||||
}
|
||||
|
||||
|
||||
namespace Core {
|
||||
|
||||
/**
|
||||
* Register platform-specific services at entrypoint, and service
|
||||
* registry
|
||||
|
@ -24,11 +24,11 @@
|
||||
/* core includes */
|
||||
#include <dataspace_component.h>
|
||||
|
||||
namespace Genode { class Ram_dataspace_factory; }
|
||||
namespace Core { class Ram_dataspace_factory; }
|
||||
|
||||
|
||||
class Genode::Ram_dataspace_factory : public Ram_allocator,
|
||||
public Dataspace_owner
|
||||
class Core::Ram_dataspace_factory : public Ram_allocator,
|
||||
public Dataspace_owner
|
||||
{
|
||||
public:
|
||||
|
||||
|
@ -16,7 +16,6 @@
|
||||
#define _CORE__INCLUDE__REGION_MAP_COMPONENT_H_
|
||||
|
||||
/* Genode includes */
|
||||
#include <base/stdint.h>
|
||||
#include <base/mutex.h>
|
||||
#include <base/capability.h>
|
||||
#include <pager.h>
|
||||
@ -39,7 +38,7 @@
|
||||
/* base-internal includes */
|
||||
#include <base/internal/stack_area.h>
|
||||
|
||||
namespace Genode {
|
||||
namespace Core {
|
||||
class Cpu_thread_component;
|
||||
class Dataspace_component;
|
||||
class Region_map_component;
|
||||
@ -51,7 +50,7 @@ namespace Genode {
|
||||
}
|
||||
|
||||
|
||||
class Genode::Region_map_detach : Genode::Interface
|
||||
class Core::Region_map_detach : Interface
|
||||
{
|
||||
public:
|
||||
|
||||
@ -69,7 +68,7 @@ class Genode::Region_map_detach : Genode::Interface
|
||||
* organized in a linked list. The head of the list is a member of the
|
||||
* 'Dataspace_component'.
|
||||
*/
|
||||
class Genode::Rm_region : public List<Rm_region>::Element
|
||||
class Core::Rm_region : public List<Rm_region>::Element
|
||||
{
|
||||
public:
|
||||
|
||||
@ -120,7 +119,7 @@ class Genode::Rm_region : public List<Rm_region>::Element
|
||||
* be able to handle faults by arbitrary clients (not only its own
|
||||
* clients), it maintains the list head of faulters.
|
||||
*/
|
||||
class Genode::Rm_faulter : Fifo<Rm_faulter>::Element, Interface
|
||||
class Core::Rm_faulter : Fifo<Rm_faulter>::Element, Interface
|
||||
{
|
||||
private:
|
||||
|
||||
@ -180,8 +179,8 @@ class Genode::Rm_faulter : Fifo<Rm_faulter>::Element, Interface
|
||||
* A region map can be used as address space for any number of threads. This
|
||||
* class represents the thread's role as member of this address space.
|
||||
*/
|
||||
class Genode::Rm_client : public Pager_object, public Rm_faulter,
|
||||
private List<Rm_client>::Element
|
||||
class Core::Rm_client : public Pager_object, public Rm_faulter,
|
||||
private List<Rm_client>::Element
|
||||
{
|
||||
private:
|
||||
|
||||
@ -219,10 +218,10 @@ class Genode::Rm_client : public Pager_object, public Rm_faulter,
|
||||
};
|
||||
|
||||
|
||||
class Genode::Region_map_component : private Weak_object<Region_map_component>,
|
||||
public Rpc_object<Region_map>,
|
||||
private List<Region_map_component>::Element,
|
||||
public Region_map_detach
|
||||
class Core::Region_map_component : private Weak_object<Region_map_component>,
|
||||
public Rpc_object<Region_map>,
|
||||
private List<Region_map_component>::Element,
|
||||
public Region_map_detach
|
||||
{
|
||||
private:
|
||||
|
||||
|
@ -17,14 +17,14 @@
|
||||
/* Genode includes */
|
||||
#include <root/component.h>
|
||||
|
||||
/* core-local includes */
|
||||
/* core includes */
|
||||
#include <rm_session_component.h>
|
||||
#include <rpc_cap_factory.h>
|
||||
|
||||
namespace Genode { class Rm_root; }
|
||||
namespace Core { class Rm_root; }
|
||||
|
||||
|
||||
class Genode::Rm_root : public Root_component<Rm_session_component>
|
||||
class Core::Rm_root : public Root_component<Rm_session_component>
|
||||
{
|
||||
private:
|
||||
|
||||
|
@ -22,10 +22,10 @@
|
||||
/* core includes */
|
||||
#include <region_map_component.h>
|
||||
|
||||
namespace Genode { class Rm_session_component; }
|
||||
namespace Core { class Rm_session_component; }
|
||||
|
||||
|
||||
class Genode::Rm_session_component : public Session_object<Rm_session>
|
||||
class Core::Rm_session_component : public Session_object<Rm_session>
|
||||
{
|
||||
private:
|
||||
|
||||
|
@ -15,16 +15,18 @@
|
||||
#ifndef _CORE__INCLUDE__ROM_FS_H_
|
||||
#define _CORE__INCLUDE__ROM_FS_H_
|
||||
|
||||
#include <base/output.h>
|
||||
#include <util/avl_string.h>
|
||||
|
||||
namespace Genode {
|
||||
/* core includes */
|
||||
#include <types.h>
|
||||
|
||||
namespace Core {
|
||||
struct Rom_module;
|
||||
struct Rom_fs;
|
||||
}
|
||||
|
||||
|
||||
struct Genode::Rom_module : Genode::Avl_string_base
|
||||
struct Core::Rom_module : Avl_string_base
|
||||
{
|
||||
addr_t const addr = 0;
|
||||
size_t const size = 0;
|
||||
@ -36,12 +38,12 @@ struct Genode::Rom_module : Genode::Avl_string_base
|
||||
|
||||
bool valid() const { return size ? true : false; }
|
||||
|
||||
void print(Genode::Output & out) const {
|
||||
void print(Output & out) const {
|
||||
Genode::print(out, Hex_range<addr_t>(addr, size), " ", name()); }
|
||||
};
|
||||
|
||||
|
||||
struct Genode::Rom_fs : Genode::Avl_tree<Genode::Avl_string_base>
|
||||
struct Core::Rom_fs : Avl_tree<Avl_string_base>
|
||||
{
|
||||
Rom_module const * find(char const * const name) const
|
||||
{
|
||||
@ -49,7 +51,7 @@ struct Genode::Rom_fs : Genode::Avl_tree<Genode::Avl_string_base>
|
||||
: nullptr;
|
||||
}
|
||||
|
||||
void print(Genode::Output & out) const
|
||||
void print(Output & out) const
|
||||
{
|
||||
if (!first()) Genode::print(out, "No modules in Rom_fs\n");
|
||||
|
||||
|
@ -15,12 +15,14 @@
|
||||
#define _CORE__INCLUDE__ROM_ROOT_H_
|
||||
|
||||
#include <root/component.h>
|
||||
#include "rom_session_component.h"
|
||||
|
||||
namespace Genode { class Rom_root; }
|
||||
/* Genode includes */
|
||||
#include <rom_session_component.h>
|
||||
|
||||
namespace Core { class Rom_root; }
|
||||
|
||||
|
||||
class Genode::Rom_root : public Root_component<Rom_session_component>
|
||||
class Core::Rom_root : public Root_component<Rom_session_component>
|
||||
{
|
||||
private:
|
||||
|
||||
|
@ -14,16 +14,18 @@
|
||||
#ifndef _CORE__INCLUDE__ROM_SESSION_COMPONENT_H_
|
||||
#define _CORE__INCLUDE__ROM_SESSION_COMPONENT_H_
|
||||
|
||||
#include <rom_fs.h>
|
||||
#include <base/rpc_server.h>
|
||||
#include <dataspace_component.h>
|
||||
#include <rom_session/rom_session.h>
|
||||
#include <base/session_label.h>
|
||||
|
||||
namespace Genode { class Rom_session_component; }
|
||||
/* core includes */
|
||||
#include <rom_fs.h>
|
||||
|
||||
namespace Core { class Rom_session_component; }
|
||||
|
||||
|
||||
class Genode::Rom_session_component : public Rpc_object<Rom_session>
|
||||
class Core::Rom_session_component : public Rpc_object<Rom_session>
|
||||
{
|
||||
private:
|
||||
|
||||
|
@ -18,10 +18,13 @@
|
||||
#include <base/capability.h>
|
||||
#include <base/mutex.h>
|
||||
|
||||
namespace Genode { class Rpc_cap_factory; }
|
||||
/* core includes */
|
||||
#include <types.h>
|
||||
|
||||
namespace Core { class Rpc_cap_factory; }
|
||||
|
||||
|
||||
class Genode::Rpc_cap_factory
|
||||
class Core::Rpc_cap_factory
|
||||
{
|
||||
private:
|
||||
|
||||
|
@ -14,15 +14,16 @@
|
||||
#ifndef _CORE__INCLUDE__SIGNAL_BROKER_H_
|
||||
#define _CORE__INCLUDE__SIGNAL_BROKER_H_
|
||||
|
||||
/* core includes */
|
||||
#include <signal_source_component.h>
|
||||
#include <signal_source/capability.h>
|
||||
#include <signal_context_slab.h>
|
||||
#include <signal_delivery_proxy.h>
|
||||
|
||||
namespace Genode { class Signal_broker; }
|
||||
namespace Core { class Signal_broker; }
|
||||
|
||||
|
||||
class Genode::Signal_broker
|
||||
class Core::Signal_broker
|
||||
{
|
||||
private:
|
||||
|
||||
|
@ -17,10 +17,11 @@
|
||||
/* Genode includes */
|
||||
#include <base/slab.h>
|
||||
|
||||
/* core-local includes */
|
||||
/* core includes */
|
||||
#include <types.h>
|
||||
#include <signal_source_component.h>
|
||||
|
||||
namespace Genode { struct Signal_context_slab; }
|
||||
namespace Core { struct Signal_context_slab; }
|
||||
|
||||
|
||||
/**
|
||||
@ -32,7 +33,7 @@ namespace Genode { struct Signal_context_slab; }
|
||||
* uses the PD session itself as backing store (which would be in the middle of
|
||||
* construction).
|
||||
*/
|
||||
struct Genode::Signal_context_slab : Slab
|
||||
struct Core::Signal_context_slab : Slab
|
||||
{
|
||||
static constexpr size_t SBS = 960*sizeof(long);
|
||||
uint8_t _initial_sb[SBS];
|
||||
|
@ -14,21 +14,24 @@
|
||||
#ifndef _CORE__INCLUDE__SIGNAL_DELIVERY_PROXY_H_
|
||||
#define _CORE__INCLUDE__SIGNAL_DELIVERY_PROXY_H_
|
||||
|
||||
namespace Genode {
|
||||
/* core includes */
|
||||
#include <types.h>
|
||||
|
||||
namespace Core {
|
||||
struct Signal_delivery_proxy;
|
||||
struct Signal_delivery_proxy_component;
|
||||
}
|
||||
|
||||
|
||||
struct Genode::Signal_delivery_proxy : Interface
|
||||
struct Core::Signal_delivery_proxy : Interface
|
||||
{
|
||||
GENODE_RPC(Rpc_deliver, void, _deliver_from_ep, Signal_context_capability, unsigned);
|
||||
GENODE_RPC(Rpc_release, void, _release_from_ep, Genode::addr_t);
|
||||
GENODE_RPC(Rpc_release, void, _release_from_ep, addr_t);
|
||||
GENODE_RPC_INTERFACE(Rpc_deliver, Rpc_release);
|
||||
};
|
||||
|
||||
|
||||
struct Genode::Signal_delivery_proxy_component
|
||||
struct Core::Signal_delivery_proxy_component
|
||||
:
|
||||
Rpc_object<Signal_delivery_proxy, Signal_delivery_proxy_component>
|
||||
{
|
||||
|
@ -21,7 +21,10 @@
|
||||
#include <util/fifo.h>
|
||||
#include <base/signal.h>
|
||||
|
||||
namespace Genode {
|
||||
/* core includes */
|
||||
#include <types.h>
|
||||
|
||||
namespace Core {
|
||||
|
||||
class Signal_context_component;
|
||||
class Signal_source_component;
|
||||
@ -32,8 +35,8 @@ namespace Genode {
|
||||
}
|
||||
|
||||
|
||||
class Genode::Signal_context_component : public Rpc_object<Signal_context>,
|
||||
private Signal_queue::Element
|
||||
class Core::Signal_context_component : public Rpc_object<Signal_context>,
|
||||
private Signal_queue::Element
|
||||
{
|
||||
private:
|
||||
|
||||
@ -75,7 +78,7 @@ class Genode::Signal_context_component : public Rpc_object<Signal_context>,
|
||||
};
|
||||
|
||||
|
||||
class Genode::Signal_source_component : public Signal_source_rpc_object
|
||||
class Core::Signal_source_component : public Signal_source_rpc_object
|
||||
{
|
||||
private:
|
||||
|
||||
@ -105,7 +108,7 @@ class Genode::Signal_source_component : public Signal_source_rpc_object
|
||||
};
|
||||
|
||||
|
||||
Genode::Signal_context_component::~Signal_context_component()
|
||||
Core::Signal_context_component::~Signal_context_component()
|
||||
{
|
||||
if (enqueued())
|
||||
_source.release(*this);
|
||||
|
@ -14,9 +14,14 @@
|
||||
#ifndef _CORE__INCLUDE__SIGNAL_TRANSMITTER_H_
|
||||
#define _CORE__INCLUDE__SIGNAL_TRANSMITTER_H_
|
||||
|
||||
namespace Genode {
|
||||
/* core includes */
|
||||
#include <types.h>
|
||||
|
||||
namespace Genode { class Rpc_entrypoint; }
|
||||
|
||||
|
||||
namespace Core {
|
||||
|
||||
class Rpc_entrypoint;
|
||||
|
||||
/*
|
||||
* Initialize the emission of signals originating from the component
|
||||
|
@ -18,10 +18,13 @@
|
||||
#include <base/ram_allocator.h>
|
||||
#include <base/mutex.h>
|
||||
|
||||
namespace Genode { class Synced_ram_allocator; }
|
||||
/* core includes */
|
||||
#include <types.h>
|
||||
|
||||
namespace Core { class Synced_ram_allocator; }
|
||||
|
||||
|
||||
class Genode::Synced_ram_allocator : public Ram_allocator
|
||||
class Core::Synced_ram_allocator : public Ram_allocator
|
||||
{
|
||||
private:
|
||||
|
||||
|
@ -18,7 +18,10 @@
|
||||
#include <base/allocator.h>
|
||||
#include <base/synced_interface.h>
|
||||
|
||||
namespace Genode {
|
||||
/* core includes */
|
||||
#include <types.h>
|
||||
|
||||
namespace Core {
|
||||
class Mapped_mem_allocator;
|
||||
template <typename> class Synced_range_allocator;
|
||||
}
|
||||
@ -33,7 +36,7 @@ namespace Genode {
|
||||
* \param ALLOC class implementing the 'Range_allocator' interface
|
||||
*/
|
||||
template <typename ALLOC>
|
||||
class Genode::Synced_range_allocator : public Range_allocator
|
||||
class Core::Synced_range_allocator : public Range_allocator
|
||||
{
|
||||
private:
|
||||
|
||||
|
@ -18,17 +18,20 @@
|
||||
#include <base/mutex.h>
|
||||
#include <util/list.h>
|
||||
|
||||
namespace Genode { namespace Trace {
|
||||
/* core includes */
|
||||
#include <types.h>
|
||||
|
||||
namespace Core { namespace Trace {
|
||||
class Policy_owner;
|
||||
class Policy;
|
||||
class Policy_registry;
|
||||
} }
|
||||
|
||||
|
||||
class Genode::Trace::Policy_owner : Interface { };
|
||||
class Core::Trace::Policy_owner : Interface { };
|
||||
|
||||
|
||||
class Genode::Trace::Policy : public Genode::List<Genode::Trace::Policy>::Element
|
||||
class Core::Trace::Policy : public List<Policy>::Element
|
||||
{
|
||||
friend class Policy_registry;
|
||||
|
||||
@ -70,7 +73,7 @@ class Genode::Trace::Policy : public Genode::List<Genode::Trace::Policy>::Elemen
|
||||
/**
|
||||
* Global policy registry
|
||||
*/
|
||||
class Genode::Trace::Policy_registry
|
||||
class Core::Trace::Policy_registry
|
||||
{
|
||||
|
||||
private:
|
||||
|
@ -20,10 +20,10 @@
|
||||
/* core-internal includes */
|
||||
#include <trace/session_component.h>
|
||||
|
||||
namespace Genode { namespace Trace { class Root; } }
|
||||
namespace Core { namespace Trace { class Root; } }
|
||||
|
||||
|
||||
class Genode::Trace::Root : public Genode::Root_component<Session_component>
|
||||
class Core::Trace::Root : public Root_component<Session_component>
|
||||
{
|
||||
private:
|
||||
|
||||
|
@ -21,14 +21,14 @@
|
||||
#include <base/attached_ram_dataspace.h>
|
||||
#include <trace_session/trace_session.h>
|
||||
|
||||
/* core-local includes */
|
||||
/* core includes */
|
||||
#include <trace/subject_registry.h>
|
||||
#include <trace/policy_registry.h>
|
||||
|
||||
namespace Genode { namespace Trace { class Session_component; } }
|
||||
namespace Core { namespace Trace { class Session_component; } }
|
||||
|
||||
|
||||
class Genode::Trace::Session_component
|
||||
class Core::Trace::Session_component
|
||||
:
|
||||
public Session_object<Trace::Session,
|
||||
Trace::Session_component>,
|
||||
|
@ -14,8 +14,8 @@
|
||||
#ifndef _CORE__INCLUDE__TRACE__SOURCE_REGISTRY_H_
|
||||
#define _CORE__INCLUDE__TRACE__SOURCE_REGISTRY_H_
|
||||
|
||||
/* Genode includes */
|
||||
#include <util/list.h>
|
||||
#include <util/string.h>
|
||||
#include <base/mutex.h>
|
||||
#include <base/trace/types.h>
|
||||
#include <base/weak_ptr.h>
|
||||
@ -23,7 +23,13 @@
|
||||
/* base-internal include */
|
||||
#include <base/internal/trace_control.h>
|
||||
|
||||
namespace Genode { namespace Trace {
|
||||
/* core-internal includes */
|
||||
#include <types.h>
|
||||
|
||||
namespace Core { namespace Trace {
|
||||
|
||||
using namespace Genode::Trace;
|
||||
|
||||
class Source;
|
||||
class Source_owner;
|
||||
class Source_registry;
|
||||
@ -35,7 +41,7 @@ namespace Genode { namespace Trace {
|
||||
} }
|
||||
|
||||
|
||||
struct Genode::Trace::Source_owner { };
|
||||
struct Core::Trace::Source_owner { };
|
||||
|
||||
|
||||
/**
|
||||
@ -43,10 +49,9 @@ struct Genode::Trace::Source_owner { };
|
||||
*
|
||||
* There is one instance per thread.
|
||||
*/
|
||||
class Genode::Trace::Source
|
||||
class Core::Trace::Source
|
||||
:
|
||||
public Genode::Weak_object<Genode::Trace::Source>,
|
||||
public Genode::List<Genode::Trace::Source>::Element
|
||||
public Weak_object<Source>, public List<Source>::Element
|
||||
{
|
||||
public:
|
||||
|
||||
@ -148,7 +153,7 @@ class Genode::Trace::Source
|
||||
*
|
||||
* There is a single instance within core.
|
||||
*/
|
||||
class Genode::Trace::Source_registry
|
||||
class Core::Trace::Source_registry
|
||||
{
|
||||
private:
|
||||
|
||||
|
@ -21,20 +21,23 @@
|
||||
|
||||
/* Genode includes */
|
||||
#include <util/list.h>
|
||||
#include <util/string.h>
|
||||
#include <base/mutex.h>
|
||||
#include <base/trace/types.h>
|
||||
#include <base/env.h>
|
||||
#include <base/weak_ptr.h>
|
||||
#include <dataspace/client.h>
|
||||
|
||||
/* core includes */
|
||||
#include <trace/source_registry.h>
|
||||
|
||||
/* base-internal include */
|
||||
#include <base/internal/trace_control.h>
|
||||
|
||||
namespace Genode { namespace Trace {
|
||||
/* core includes */
|
||||
#include <types.h>
|
||||
#include <trace/source_registry.h>
|
||||
|
||||
namespace Core { namespace Trace {
|
||||
|
||||
using namespace Genode::Trace;
|
||||
|
||||
class Subject;
|
||||
class Subject_registry;
|
||||
} }
|
||||
@ -43,10 +46,10 @@ namespace Genode { namespace Trace {
|
||||
/**
|
||||
* Subject of tracing data
|
||||
*/
|
||||
class Genode::Trace::Subject
|
||||
class Core::Trace::Subject
|
||||
:
|
||||
public Genode::List<Genode::Trace::Subject>::Element,
|
||||
public Genode::Trace::Source_owner
|
||||
public List<Subject>::Element,
|
||||
public Source_owner
|
||||
{
|
||||
private:
|
||||
|
||||
@ -110,7 +113,7 @@ class Genode::Trace::Subject
|
||||
void *src = local_rm.attach(from_ds),
|
||||
*dst = local_rm.attach(_ds);
|
||||
|
||||
memcpy(dst, src, _size);
|
||||
Genode::memcpy(dst, src, _size);
|
||||
|
||||
local_rm.detach(src);
|
||||
local_rm.detach(dst);
|
||||
@ -314,7 +317,7 @@ class Genode::Trace::Subject
|
||||
*
|
||||
* There exists one instance for each TRACE session.
|
||||
*/
|
||||
class Genode::Trace::Subject_registry
|
||||
class Core::Trace::Subject_registry
|
||||
{
|
||||
private:
|
||||
|
||||
|
24
repos/base/src/core/include/types.h
Normal file
24
repos/base/src/core/include/types.h
Normal file
@ -0,0 +1,24 @@
|
||||
/*
|
||||
* \brief Core namespace declaration and basic types
|
||||
* \author Norman Feske
|
||||
* \date 2023-03-01
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2023 Genode Labs GmbH
|
||||
*
|
||||
* This file is part of the Genode OS framework, which is distributed
|
||||
* under the terms of the GNU Affero General Public License version 3.
|
||||
*/
|
||||
|
||||
#ifndef _CORE__INCLUDE__TYPES_H_
|
||||
#define _CORE__INCLUDE__TYPES_H_
|
||||
|
||||
#include <util/noncopyable.h>
|
||||
#include <util/reconstructible.h>
|
||||
#include <util/interface.h>
|
||||
#include <base/log.h>
|
||||
|
||||
namespace Core { using namespace Genode; }
|
||||
|
||||
#endif /* _CORE__INCLUDE__TYPES_H_ */
|
@ -21,10 +21,10 @@
|
||||
/* core includes */
|
||||
#include <vm_session_component.h>
|
||||
|
||||
namespace Genode { class Vm_root; }
|
||||
namespace Core { class Vm_root; }
|
||||
|
||||
|
||||
class Genode::Vm_root : public Root_component<Vm_session_component>
|
||||
class Core::Vm_root : public Root_component<Vm_session_component>
|
||||
{
|
||||
private:
|
||||
|
||||
|
@ -11,15 +11,16 @@
|
||||
* under the terms of the GNU Affero General Public License version 3.
|
||||
*/
|
||||
|
||||
#include <util/string.h>
|
||||
/* Genode includes */
|
||||
#include <util/arg_string.h>
|
||||
#include <root/root.h>
|
||||
|
||||
/* core includes */
|
||||
#include <util.h>
|
||||
#include <dataspace_component.h>
|
||||
#include <io_mem_session_component.h>
|
||||
#include <base/allocator_avl.h>
|
||||
#include "util.h"
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
Io_mem_session_component::Dataspace_attr
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2006-2017 Genode Labs GmbH
|
||||
* Copyright (C) 2006-2023 Genode Labs GmbH
|
||||
*
|
||||
* This file is part of the Genode OS framework, which is distributed
|
||||
* under the terms of the GNU Affero General Public License version 3.
|
||||
@ -16,7 +16,6 @@
|
||||
#include <base/sleep.h>
|
||||
#include <base/service.h>
|
||||
#include <base/child.h>
|
||||
#include <base/log.h>
|
||||
#include <rm_session/connection.h>
|
||||
#include <pd_session/connection.h>
|
||||
#include <rom_session/connection.h>
|
||||
@ -40,14 +39,14 @@
|
||||
#include <trace/root.h>
|
||||
#include <platform_services.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
/***************************************
|
||||
** Core environment/platform support **
|
||||
***************************************/
|
||||
|
||||
Core_env &Genode::core_env()
|
||||
Core_env &Core::core_env()
|
||||
{
|
||||
/*
|
||||
* Make sure to initialize the platform before constructing the core
|
||||
@ -79,14 +78,14 @@ Env_deprecated *Genode::env_deprecated() {
|
||||
return &core_env(); }
|
||||
|
||||
|
||||
Platform &Genode::platform_specific()
|
||||
Platform &Core::platform_specific()
|
||||
{
|
||||
static Platform _platform;
|
||||
return _platform;
|
||||
}
|
||||
|
||||
|
||||
Platform_generic &Genode::platform() { return platform_specific(); }
|
||||
Platform_generic &Core::platform() { return platform_specific(); }
|
||||
|
||||
|
||||
Thread_capability Genode::main_thread_cap() { return Thread_capability(); }
|
||||
@ -203,9 +202,9 @@ void Genode::destroy_signal_thread() { }
|
||||
** Trace support **
|
||||
*******************/
|
||||
|
||||
Trace::Source_registry &Trace::sources()
|
||||
Core::Trace::Source_registry &Core::Trace::sources()
|
||||
{
|
||||
static Trace::Source_registry inst;
|
||||
static Source_registry inst;
|
||||
return inst;
|
||||
}
|
||||
|
||||
@ -229,7 +228,7 @@ int main()
|
||||
|
||||
log("Genode ", Genode::version_string);
|
||||
|
||||
static Trace::Policy_registry trace_policies;
|
||||
static Core::Trace::Policy_registry trace_policies;
|
||||
|
||||
static Rpc_entrypoint &ep = core_env().entrypoint();
|
||||
static Ram_allocator &core_ram_alloc = core_env().ram_allocator();
|
||||
@ -252,10 +251,13 @@ int main()
|
||||
|
||||
static Pager_entrypoint pager_ep(rpc_cap_factory);
|
||||
|
||||
using Trace_root = Core::Trace::Root;
|
||||
using Trace_session_component = Core::Trace::Session_component;
|
||||
|
||||
static Rom_root rom_root (ep, ep, platform().rom_fs(), sliced_heap);
|
||||
static Rm_root rm_root (ep, sliced_heap, core_ram_alloc, local_rm, pager_ep);
|
||||
static Cpu_root cpu_root (core_ram_alloc, local_rm, ep, ep, pager_ep,
|
||||
sliced_heap, Trace::sources());
|
||||
sliced_heap, Core::Trace::sources());
|
||||
static Pd_root pd_root (ep, core_env().signal_ep(), pager_ep,
|
||||
platform().ram_alloc(),
|
||||
local_rm, sliced_heap,
|
||||
@ -265,8 +267,8 @@ int main()
|
||||
platform().ram_alloc(), sliced_heap);
|
||||
static Irq_root irq_root (*core_env().pd_session(),
|
||||
platform().irq_alloc(), sliced_heap);
|
||||
static Trace::Root trace_root (core_ram_alloc, local_rm, ep, sliced_heap,
|
||||
Trace::sources(), trace_policies);
|
||||
static Trace_root trace_root (core_ram_alloc, local_rm, ep, sliced_heap,
|
||||
Core::Trace::sources(), trace_policies);
|
||||
|
||||
static Core_service<Rom_session_component> rom_service (services, rom_root);
|
||||
static Core_service<Rm_session_component> rm_service (services, rm_root);
|
||||
@ -275,10 +277,10 @@ int main()
|
||||
static Core_service<Log_session_component> log_service (services, log_root);
|
||||
static Core_service<Io_mem_session_component> io_mem_service (services, io_mem_root);
|
||||
static Core_service<Irq_session_component> irq_service (services, irq_root);
|
||||
static Core_service<Trace::Session_component> trace_service (services, trace_root);
|
||||
static Core_service<Trace_session_component> trace_service (services, trace_root);
|
||||
|
||||
/* make platform-specific services known to service pool */
|
||||
platform_add_local_services(ep, sliced_heap, services, Trace::sources());
|
||||
platform_add_local_services(ep, sliced_heap, services, Core::Trace::sources());
|
||||
|
||||
size_t const avail_ram_quota = core_pd.avail_ram().value;
|
||||
size_t const avail_cap_quota = core_pd.avail_caps().value;
|
||||
@ -305,7 +307,7 @@ int main()
|
||||
Session::Resources{{Cpu_connection::RAM_QUOTA},
|
||||
{Cpu_session::CAP_QUOTA}},
|
||||
"core", Session::Diag{false},
|
||||
core_ram_alloc, local_rm, ep, pager_ep, Trace::sources(), "",
|
||||
core_ram_alloc, local_rm, ep, pager_ep, Core::Trace::sources(), "",
|
||||
Affinity::unrestricted(), Cpu_session::QUOTA_LIMIT);
|
||||
|
||||
Cpu_session_capability core_cpu_cap = core_cpu.cap();
|
||||
|
@ -12,10 +12,10 @@
|
||||
* under the terms of the GNU Affero General Public License version 3.
|
||||
*/
|
||||
|
||||
/* Core includes */
|
||||
/* core includes */
|
||||
#include <pager.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
void Pager_entrypoint::entry()
|
||||
|
@ -11,13 +11,10 @@
|
||||
* under the terms of the GNU Affero General Public License version 3.
|
||||
*/
|
||||
|
||||
/* Genode includes */
|
||||
#include <base/log.h>
|
||||
|
||||
/* core includes */
|
||||
#include <pager.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
void Pager_object::wake_up()
|
||||
|
@ -11,13 +11,10 @@
|
||||
* under the terms of the GNU Affero General Public License version 3.
|
||||
*/
|
||||
|
||||
/* Genode includes */
|
||||
#include <base/log.h>
|
||||
|
||||
/* core includes */
|
||||
#include <pd_session_component.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
Ram_allocator::Alloc_result
|
||||
|
@ -13,10 +13,10 @@
|
||||
* under the terms of the GNU Affero General Public License version 3.
|
||||
*/
|
||||
|
||||
/* core-local includes */
|
||||
/* core includes */
|
||||
#include <pd_session_component.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
bool Pd_session_component::assign_pci(addr_t, uint16_t) { return true; }
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include <boot_modules.h>
|
||||
#include <platform.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
void Platform::_init_rom_modules()
|
||||
|
@ -15,6 +15,6 @@
|
||||
#include <platform_services.h>
|
||||
|
||||
|
||||
void Genode::platform_add_local_services(Rpc_entrypoint &, Sliced_heap &,
|
||||
Registry<Service> &,
|
||||
Trace::Source_registry &) { }
|
||||
void Core::platform_add_local_services(Rpc_entrypoint &, Sliced_heap &,
|
||||
Registry<Service> &,
|
||||
Trace::Source_registry &) { }
|
||||
|
@ -11,13 +11,10 @@
|
||||
* under the terms of the GNU Affero General Public License version 3.
|
||||
*/
|
||||
|
||||
/* Genode includes */
|
||||
#include <base/log.h>
|
||||
|
||||
/* core includes */
|
||||
#include <ram_dataspace_factory.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
Ram_allocator::Alloc_result
|
||||
|
@ -14,7 +14,6 @@
|
||||
*/
|
||||
|
||||
/* Genode includes */
|
||||
#include <base/log.h>
|
||||
#include <util/arg_string.h>
|
||||
#include <util/misc_math.h>
|
||||
|
||||
@ -27,7 +26,7 @@
|
||||
static const bool verbose_page_faults = false;
|
||||
|
||||
|
||||
struct Genode::Region_map_component::Fault_area
|
||||
struct Core::Region_map_component::Fault_area
|
||||
{
|
||||
addr_t _fault_addr = 0;
|
||||
addr_t _base = 0;
|
||||
@ -145,7 +144,7 @@ struct Genode::Region_map_component::Fault_area
|
||||
};
|
||||
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
static void print_page_fault(char const *msg,
|
||||
addr_t pf_addr,
|
||||
@ -292,7 +291,7 @@ void Rm_faulter::dissolve_from_faulting_region_map(Region_map_component &caller)
|
||||
locked_ptr->discard_faulter(*this, DO_LOCK);
|
||||
}
|
||||
|
||||
_faulting_region_map = Genode::Weak_ptr<Genode::Region_map_component>();
|
||||
_faulting_region_map = Weak_ptr<Core::Region_map_component>();
|
||||
}
|
||||
|
||||
|
||||
@ -301,7 +300,7 @@ void Rm_faulter::continue_after_resolved_fault()
|
||||
Mutex::Guard lock_guard(_mutex);
|
||||
|
||||
_pager_object.wake_up();
|
||||
_faulting_region_map = Genode::Weak_ptr<Genode::Region_map_component>();
|
||||
_faulting_region_map = Weak_ptr<Core::Region_map_component>();
|
||||
_fault_state = Region_map::State();
|
||||
}
|
||||
|
||||
|
@ -11,11 +11,14 @@
|
||||
* under the terms of the GNU Affero General Public License version 3.
|
||||
*/
|
||||
|
||||
/* Genode includes */
|
||||
#include <util/arg_string.h>
|
||||
#include <rom_session_component.h>
|
||||
#include <root/root.h>
|
||||
|
||||
using namespace Genode;
|
||||
/* core includes */
|
||||
#include <rom_session_component.h>
|
||||
|
||||
using namespace Core;
|
||||
|
||||
|
||||
Rom_session_component::Rom_session_component(Rom_fs &rom_fs,
|
||||
|
@ -11,12 +11,12 @@
|
||||
* under the terms of the GNU Affero General Public License version 3.
|
||||
*/
|
||||
|
||||
/* core-local includes */
|
||||
/* core includes */
|
||||
#include <rpc_cap_factory.h>
|
||||
|
||||
long Genode::Rpc_cap_factory::_unique_id_cnt;
|
||||
long Core::Rpc_cap_factory::_unique_id_cnt;
|
||||
|
||||
Genode::Mutex &Genode::Rpc_cap_factory::_mutex()
|
||||
Genode::Mutex &Core::Rpc_cap_factory::_mutex()
|
||||
{
|
||||
static Mutex static_mutex;
|
||||
return static_mutex;
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include <core_capability_space.h>
|
||||
#include <base/internal/capability_space_tpl.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
static unsigned unique_id_cnt;
|
||||
@ -36,10 +36,10 @@ Native_capability Rpc_cap_factory::_alloc(Rpc_cap_factory &,
|
||||
Rpc_obj_key const rpc_obj_key(++unique_id_cnt);
|
||||
|
||||
/* combine thread ID of 'ep' with new unique ID */
|
||||
Capability_space::Ipc_cap_data cap_data =
|
||||
Capability_space::ipc_cap_data(ep);
|
||||
Genode::Capability_space::Ipc_cap_data cap_data =
|
||||
Genode::Capability_space::ipc_cap_data(ep);
|
||||
|
||||
return Capability_space::import(cap_data.dst, rpc_obj_key);
|
||||
return Genode::Capability_space::import(cap_data.dst, rpc_obj_key);
|
||||
}
|
||||
|
||||
|
||||
|
@ -21,10 +21,12 @@
|
||||
/* base-internal includes */
|
||||
#include <base/internal/globals.h>
|
||||
|
||||
/* core-local includes */
|
||||
/* core includes */
|
||||
#include <assertion.h>
|
||||
#include <types.h>
|
||||
|
||||
using namespace Core;
|
||||
|
||||
using namespace Genode;
|
||||
|
||||
Signal_receiver::Signal_receiver() { }
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
/* core includes */
|
||||
#include <signal_source_component.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
/*****************************
|
||||
|
@ -14,12 +14,13 @@
|
||||
* under the terms of the GNU Affero General Public License version 3.
|
||||
*/
|
||||
|
||||
/* core-local includes */
|
||||
/* core includes */
|
||||
#include <core_env.h>
|
||||
#include <signal_transmitter.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
void Genode::init_core_signal_transmitter(Rpc_entrypoint &) { }
|
||||
|
||||
void Core::init_core_signal_transmitter(Rpc_entrypoint &) { }
|
||||
|
||||
Rpc_entrypoint &Core_env::signal_ep() { return _entrypoint; }
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include <base/rpc_server.h>
|
||||
#include <base/trace/events.h>
|
||||
|
||||
/* core-local includes */
|
||||
/* core includes */
|
||||
#include <core_env.h>
|
||||
#include <signal_source_component.h>
|
||||
#include <signal_transmitter.h>
|
||||
@ -24,7 +24,7 @@
|
||||
/* base-internal includes */
|
||||
#include <base/internal/globals.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
static Constructible<Signal_delivery_proxy_component> delivery_proxy;
|
||||
@ -36,7 +36,7 @@ static Constructible<Signal_delivery_proxy_component> delivery_proxy;
|
||||
static Rpc_entrypoint *_ep;
|
||||
|
||||
|
||||
void Genode::init_core_signal_transmitter(Rpc_entrypoint &ep) { _ep = &ep; }
|
||||
void Core::init_core_signal_transmitter(Rpc_entrypoint &ep) { _ep = &ep; }
|
||||
|
||||
|
||||
void Genode::init_signal_transmitter(Env &)
|
||||
|
@ -19,13 +19,9 @@
|
||||
/* core includes */
|
||||
#include <io_port_session_component.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
/******************************
|
||||
** Constructor / destructor **
|
||||
******************************/
|
||||
|
||||
Io_port_session_component::Io_port_session_component(Range_allocator &io_port_alloc,
|
||||
const char *args)
|
||||
: _io_port_alloc(io_port_alloc)
|
||||
|
@ -14,7 +14,7 @@
|
||||
/* core includes */
|
||||
#include <io_port_session_component.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
/**************
|
||||
|
@ -24,10 +24,10 @@
|
||||
/*
|
||||
* Add x86 specific ioport service
|
||||
*/
|
||||
void Genode::platform_add_local_services(Rpc_entrypoint &,
|
||||
Sliced_heap &sliced_heap,
|
||||
Registry<Service> &local_services,
|
||||
Trace::Source_registry &)
|
||||
void Core::platform_add_local_services(Rpc_entrypoint &,
|
||||
Sliced_heap &sliced_heap,
|
||||
Registry<Service> &local_services,
|
||||
Trace::Source_registry &)
|
||||
{
|
||||
static Io_port_root io_port_root(*core_env().pd_session(),
|
||||
platform().io_port_alloc(), sliced_heap);
|
||||
|
@ -15,7 +15,6 @@
|
||||
/* Genode includes */
|
||||
#include <region_map/region_map.h>
|
||||
#include <pd_session/pd_session.h>
|
||||
#include <base/log.h>
|
||||
#include <base/synced_allocator.h>
|
||||
#include <base/thread.h>
|
||||
|
||||
@ -37,7 +36,7 @@ namespace Genode {
|
||||
}
|
||||
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
/**
|
||||
@ -56,7 +55,7 @@ class Stack_area_region_map : public Region_map
|
||||
{
|
||||
private:
|
||||
|
||||
using Ds_slab = Synced_allocator<Tslab<Dataspace_component,
|
||||
using Ds_slab = Synced_allocator<Tslab<Core::Dataspace_component,
|
||||
get_page_size()> >;
|
||||
|
||||
Ds_slab _ds_slab { platform().core_mem_alloc() };
|
||||
|
@ -11,14 +11,15 @@
|
||||
* under the terms of the GNU Affero General Public License version 3.
|
||||
*/
|
||||
|
||||
/* core-internal includes */
|
||||
#include <trace/session_component.h>
|
||||
/* Genode includes */
|
||||
#include <dataspace/capability.h>
|
||||
#include <base/rpc_client.h>
|
||||
|
||||
/* core-internal includes */
|
||||
#include <trace/session_component.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Genode::Trace;
|
||||
using namespace Core;
|
||||
using namespace Core::Trace;
|
||||
|
||||
|
||||
Dataspace_capability Session_component::dataspace()
|
||||
|
@ -16,16 +16,16 @@
|
||||
* under the terms of the GNU Affero General Public License version 3.
|
||||
*/
|
||||
|
||||
/* Base includes */
|
||||
/* Genode includes */
|
||||
#include <util/flex_iterator.h>
|
||||
|
||||
/* Core includes */
|
||||
/* core includes */
|
||||
#include <cpu_thread_component.h>
|
||||
#include <dataspace_component.h>
|
||||
#include <vm_session_component.h>
|
||||
|
||||
using Genode::addr_t;
|
||||
using Genode::Vm_session_component;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
void Vm_session_component::attach(Dataspace_capability const cap,
|
||||
addr_t const guest_phys,
|
||||
@ -172,11 +172,11 @@ void Vm_session_component::detach(Region_map::Local_addr addr)
|
||||
if (region)
|
||||
detach(region->base(), region->size());
|
||||
else
|
||||
Genode::error(__PRETTY_FUNCTION__, " unknown region");
|
||||
error(__PRETTY_FUNCTION__, " unknown region");
|
||||
}
|
||||
|
||||
|
||||
void Vm_session_component::unmap_region(addr_t base, size_t size)
|
||||
{
|
||||
Genode::error(__func__, " unimplemented ", base, " ", size);
|
||||
error(__func__, " unimplemented ", base, " ", size);
|
||||
}
|
||||
|
Reference in New Issue
Block a user