mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-01 07:00:55 +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:
parent
487aad6db1
commit
2e6dd010ae
@ -17,7 +17,7 @@
|
||||
/* L4/Fiasco includes */
|
||||
#include <fiasco/syscall.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
void Core_log::out(char const c) { Fiasco::outchar(c); }
|
||||
|
@ -30,10 +30,10 @@
|
||||
/* L4/Fiasco includes */
|
||||
#include <fiasco/syscall.h>
|
||||
|
||||
namespace Genode { class Ipc_pager; }
|
||||
namespace Core { class Ipc_pager; }
|
||||
|
||||
|
||||
class Genode::Ipc_pager
|
||||
class Core::Ipc_pager
|
||||
{
|
||||
private:
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
/* L4/Fiasco includes */
|
||||
#include <fiasco/syscall.h>
|
||||
|
||||
namespace Genode {
|
||||
namespace Core {
|
||||
|
||||
/**
|
||||
* Map page locally within core
|
||||
|
@ -29,10 +29,10 @@
|
||||
#include <boot_modules.h>
|
||||
#include <assertion.h>
|
||||
|
||||
namespace Genode { class Platform; }
|
||||
namespace Core { class Platform; }
|
||||
|
||||
|
||||
class Genode::Platform : public Platform_generic
|
||||
class Core::Platform : public Platform_generic
|
||||
{
|
||||
private:
|
||||
|
||||
|
@ -27,14 +27,14 @@
|
||||
/* L4/Fiasco includes */
|
||||
#include <fiasco/syscall.h>
|
||||
|
||||
namespace Genode {
|
||||
namespace Core {
|
||||
|
||||
class Platform_thread;
|
||||
class Platform_pd;
|
||||
}
|
||||
|
||||
|
||||
class Genode::Platform_pd : public Address_space
|
||||
class Core::Platform_pd : public Address_space
|
||||
{
|
||||
private:
|
||||
|
||||
|
@ -27,14 +27,14 @@
|
||||
/* L4/Fiasco includes */
|
||||
#include <fiasco/syscall.h>
|
||||
|
||||
namespace Genode {
|
||||
namespace Core {
|
||||
|
||||
class Platform_pd;
|
||||
class Platform_thread;
|
||||
}
|
||||
|
||||
|
||||
class Genode::Platform_thread : Interface
|
||||
class Core::Platform_thread : Interface
|
||||
{
|
||||
private:
|
||||
|
||||
|
@ -18,10 +18,13 @@
|
||||
#include <base/allocator.h>
|
||||
#include <base/capability.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:
|
||||
|
||||
|
@ -28,7 +28,10 @@
|
||||
/* L4/Fiasco includes */
|
||||
#include <fiasco/syscall.h>
|
||||
|
||||
namespace Genode {
|
||||
/* core includes */
|
||||
#include <types.h>
|
||||
|
||||
namespace Core {
|
||||
|
||||
inline void log_event(const char *s)
|
||||
{
|
||||
|
@ -19,7 +19,7 @@
|
||||
/* L4/Fiasco includes */
|
||||
#include <fiasco/syscall.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
void Io_mem_session_component::_unmap_local(addr_t base, size_t)
|
||||
|
@ -12,7 +12,6 @@
|
||||
*/
|
||||
|
||||
/* Genode includes */
|
||||
#include <base/log.h>
|
||||
#include <util/arg_string.h>
|
||||
|
||||
/* core includes */
|
||||
@ -22,7 +21,7 @@
|
||||
/* L4/Fiasco includes */
|
||||
#include <fiasco/syscall.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
bool Irq_object::_associate()
|
||||
|
@ -11,9 +11,6 @@
|
||||
* under the terms of the GNU Affero General Public License version 3.
|
||||
*/
|
||||
|
||||
/* Genode includes */
|
||||
#include <base/log.h>
|
||||
|
||||
/* core includes */
|
||||
#include <ipc_pager.h>
|
||||
#include <pager.h>
|
||||
@ -25,7 +22,7 @@
|
||||
/* L4/Fiasco includes */
|
||||
#include <fiasco/syscall.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
using namespace Fiasco;
|
||||
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
/* L4/Fiasco includes */
|
||||
#include <fiasco/syscall.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
void Pager_object::wake_up()
|
||||
|
@ -12,7 +12,6 @@
|
||||
*/
|
||||
|
||||
/* Genode includes */
|
||||
#include <base/log.h>
|
||||
#include <base/allocator_avl.h>
|
||||
#include <base/sleep.h>
|
||||
#include <util/misc_math.h>
|
||||
@ -35,7 +34,7 @@
|
||||
/* L4/Fiasco includes */
|
||||
#include <fiasco/syscall.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
using namespace Fiasco;
|
||||
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include <fiasco/syscall.h>
|
||||
|
||||
using namespace Fiasco;
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
static bool _init = false;
|
||||
|
@ -15,8 +15,6 @@
|
||||
*/
|
||||
|
||||
/* Genode includes */
|
||||
#include <base/log.h>
|
||||
#include <util/string.h>
|
||||
#include <cpu_session/cpu_session.h>
|
||||
|
||||
/* core includes */
|
||||
@ -28,7 +26,7 @@
|
||||
/* L4/Fiasco includes */
|
||||
#include <fiasco/syscall.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
using namespace Fiasco;
|
||||
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
/* core includes */
|
||||
#include <ram_dataspace_factory.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
void Ram_dataspace_factory::_export_ram_ds(Dataspace_component &) { }
|
||||
|
@ -21,7 +21,7 @@
|
||||
/* L4/Fiasco includes */
|
||||
#include <fiasco/syscall.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
using namespace Fiasco;
|
||||
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <platform.h>
|
||||
#include <core_env.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
void Thread::_thread_start()
|
||||
|
@ -20,11 +20,9 @@
|
||||
/* L4/Fiasco includes */
|
||||
#include <fiasco/syscall.h>
|
||||
|
||||
namespace Genode {
|
||||
namespace Core { struct Platform_thread; }
|
||||
|
||||
struct Platform_thread;
|
||||
struct Native_thread;
|
||||
}
|
||||
namespace Genode { struct Native_thread; }
|
||||
|
||||
|
||||
struct Genode::Native_thread
|
||||
@ -38,7 +36,7 @@ struct Genode::Native_thread
|
||||
* thread object, which is going to be destroyed on destruction of the
|
||||
* 'Thread'.
|
||||
*/
|
||||
Platform_thread *pt;
|
||||
Core::Platform_thread *pt;
|
||||
};
|
||||
|
||||
#endif /* _INCLUDE__BASE__INTERNAL__NATIVE_THREAD_H_ */
|
||||
|
@ -17,7 +17,7 @@
|
||||
/* Fiasco.OC includes */
|
||||
#include <foc/syscall.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
void Core_log::out(char const c)
|
||||
|
@ -20,10 +20,13 @@
|
||||
#include <base/mutex.h>
|
||||
#include <synced_range_allocator.h>
|
||||
|
||||
namespace Genode { class Cap_id_allocator; }
|
||||
/* core includes */
|
||||
#include <types.h>
|
||||
|
||||
namespace Core { class Cap_id_allocator; }
|
||||
|
||||
|
||||
class Genode::Cap_id_allocator
|
||||
class Core::Cap_id_allocator
|
||||
{
|
||||
public:
|
||||
|
||||
|
@ -18,15 +18,18 @@
|
||||
#include <base/internal/native_thread.h>
|
||||
#include <base/internal/cap_map.h>
|
||||
|
||||
namespace Genode {
|
||||
/* core includes */
|
||||
#include <types.h>
|
||||
|
||||
namespace Core {
|
||||
|
||||
class Core_cap_index;
|
||||
class Platform_thread;
|
||||
class Pd_session_component;
|
||||
class Core_cap_index;
|
||||
}
|
||||
|
||||
|
||||
class Genode::Core_cap_index : public Native_capability::Data
|
||||
class Core::Core_cap_index : public Native_capability::Data
|
||||
{
|
||||
private:
|
||||
|
||||
|
@ -16,16 +16,15 @@
|
||||
|
||||
/* core includes */
|
||||
#include <cap_index.h>
|
||||
#include <util/noncopyable.h>
|
||||
|
||||
namespace Genode { class Cap_mapping; }
|
||||
namespace Core { class Cap_mapping; }
|
||||
|
||||
|
||||
/**
|
||||
* A Cap_mapping embodies a capability of core, and its mapped
|
||||
* copy in another protection domain.
|
||||
*/
|
||||
class Genode::Cap_mapping : Noncopyable
|
||||
class Core::Cap_mapping : Noncopyable
|
||||
{
|
||||
private:
|
||||
|
||||
|
@ -27,16 +27,16 @@
|
||||
/* base-internal includes */
|
||||
#include <base/internal/native_thread.h>
|
||||
|
||||
/* core-local includes */
|
||||
/* core includes */
|
||||
#include <mapping.h>
|
||||
|
||||
/* Fiasco.OC includes */
|
||||
#include <foc/syscall.h>
|
||||
|
||||
namespace Genode { class Ipc_pager; }
|
||||
namespace Core { class Ipc_pager; }
|
||||
|
||||
|
||||
class Genode::Ipc_pager : public Native_capability
|
||||
class Core::Ipc_pager : public Native_capability
|
||||
{
|
||||
public:
|
||||
|
||||
|
@ -20,10 +20,13 @@
|
||||
#include <irq_session/irq_session.h>
|
||||
#include <cap_index.h>
|
||||
|
||||
namespace Genode { class Irq_object; }
|
||||
/* core includes */
|
||||
#include <types.h>
|
||||
|
||||
namespace Core { class Irq_object; }
|
||||
|
||||
|
||||
class Genode::Irq_object
|
||||
class Core::Irq_object
|
||||
{
|
||||
private:
|
||||
|
||||
@ -56,8 +59,8 @@ class Genode::Irq_object
|
||||
uint64_t msi_address() const { return _msi_addr; }
|
||||
addr_t msi_value() const { return _msi_data; }
|
||||
|
||||
void sigh(Genode::Signal_context_capability cap) { _sig_cap = cap; }
|
||||
void notify() { Genode::Signal_transmitter(_sig_cap).submit(1); }
|
||||
void sigh(Signal_context_capability cap) { _sig_cap = cap; }
|
||||
void notify() { Signal_transmitter(_sig_cap).submit(1); }
|
||||
|
||||
bool associate(unsigned irq, bool msi, Irq_session::Trigger,
|
||||
Irq_session::Polarity);
|
||||
|
@ -22,7 +22,7 @@
|
||||
/* Fiasco.OC includes */
|
||||
#include <foc/syscall.h>
|
||||
|
||||
namespace Genode {
|
||||
namespace Core {
|
||||
|
||||
/**
|
||||
* Map pages locally within core
|
||||
|
@ -18,15 +18,18 @@
|
||||
#include <base/rpc_server.h>
|
||||
#include <foc_native_cpu/foc_native_cpu.h>
|
||||
|
||||
namespace Genode {
|
||||
/* core includes */
|
||||
#include <types.h>
|
||||
|
||||
namespace Core {
|
||||
|
||||
class Cpu_session_component;
|
||||
class Native_cpu_component;
|
||||
}
|
||||
|
||||
|
||||
class Genode::Native_cpu_component : public Rpc_object<Cpu_session::Native_cpu,
|
||||
Native_cpu_component>
|
||||
class Core::Native_cpu_component : public Rpc_object<Cpu_session::Native_cpu,
|
||||
Native_cpu_component>
|
||||
{
|
||||
private:
|
||||
|
||||
|
@ -17,10 +17,10 @@
|
||||
#include <base/mutex.h>
|
||||
#include <foc/thread_state.h>
|
||||
|
||||
namespace Genode { struct Pager_object_exception_state; }
|
||||
namespace Core { struct Pager_object_exception_state; }
|
||||
|
||||
|
||||
struct Genode::Pager_object_exception_state
|
||||
struct Core::Pager_object_exception_state
|
||||
{
|
||||
Mutex mutex { };
|
||||
unsigned exceptions; /* counts exceptions raised by the thread */
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include <base/synced_allocator.h>
|
||||
#include <base/allocator_avl.h>
|
||||
|
||||
/* Core includes */
|
||||
/* core includes */
|
||||
#include <pager.h>
|
||||
#include <cap_id_alloc.h>
|
||||
#include <platform_generic.h>
|
||||
@ -32,10 +32,10 @@
|
||||
namespace Foc { struct l4_kernel_info_t; }
|
||||
|
||||
|
||||
namespace Genode { class Platform; }
|
||||
namespace Core { class Platform; }
|
||||
|
||||
|
||||
class Genode::Platform : public Platform_generic
|
||||
class Core::Platform : public Platform_generic
|
||||
{
|
||||
private:
|
||||
|
||||
|
@ -36,14 +36,14 @@
|
||||
/* Fiasco.OC includes */
|
||||
#include <foc/syscall.h>
|
||||
|
||||
namespace Genode {
|
||||
namespace Core {
|
||||
|
||||
class Platform_thread;
|
||||
class Platform_pd;
|
||||
}
|
||||
|
||||
|
||||
class Genode::Platform_pd : public Address_space
|
||||
class Core::Platform_pd : public Address_space
|
||||
{
|
||||
private:
|
||||
|
||||
|
@ -26,14 +26,14 @@
|
||||
#include <cap_mapping.h>
|
||||
#include <assertion.h>
|
||||
|
||||
namespace Genode {
|
||||
namespace Core {
|
||||
|
||||
class Platform_pd;
|
||||
class Platform_thread;
|
||||
}
|
||||
|
||||
|
||||
class Genode::Platform_thread : Interface
|
||||
class Core::Platform_thread : Interface
|
||||
{
|
||||
private:
|
||||
|
||||
|
@ -23,10 +23,13 @@
|
||||
/* base-internal includes */
|
||||
#include <base/internal/page_size.h>
|
||||
|
||||
/* core includes */
|
||||
#include <types.h>
|
||||
|
||||
namespace Genode { class Rpc_cap_factory; }
|
||||
namespace Core { class Rpc_cap_factory; }
|
||||
|
||||
class Genode::Rpc_cap_factory
|
||||
|
||||
class Core::Rpc_cap_factory
|
||||
{
|
||||
private:
|
||||
|
||||
|
@ -18,8 +18,6 @@
|
||||
#define _CORE__INCLUDE__UTIL_H_
|
||||
|
||||
/* Genode includes */
|
||||
#include <base/stdint.h>
|
||||
#include <base/log.h>
|
||||
#include <rm_session/rm_session.h>
|
||||
#include <util/touch.h>
|
||||
|
||||
@ -29,7 +27,10 @@
|
||||
/* Fiasco.OC includes */
|
||||
#include <foc/syscall.h>
|
||||
|
||||
namespace Genode {
|
||||
/* core includes */
|
||||
#include <types.h>
|
||||
|
||||
namespace Core {
|
||||
|
||||
inline void panic(const char *s)
|
||||
{
|
||||
@ -44,8 +45,8 @@ namespace Genode {
|
||||
unsigned char const volatile *bptr;
|
||||
unsigned char const *eptr;
|
||||
|
||||
bptr = (unsigned char const volatile *)(((Genode::addr_t)addr) & L4_PAGEMASK);
|
||||
eptr = (unsigned char const *)(((Genode::addr_t)addr + size - 1) & L4_PAGEMASK);
|
||||
bptr = (unsigned char const volatile *)(((addr_t)addr) & L4_PAGEMASK);
|
||||
eptr = (unsigned char const *)(((addr_t)addr + size - 1) & L4_PAGEMASK);
|
||||
for ( ; bptr <= eptr; bptr += L4_PAGESIZE)
|
||||
touch_read(bptr);
|
||||
}
|
||||
@ -57,8 +58,8 @@ namespace Genode {
|
||||
unsigned char volatile *bptr;
|
||||
unsigned char const *eptr;
|
||||
|
||||
bptr = (unsigned char volatile *)(((Genode::addr_t)addr) & L4_PAGEMASK);
|
||||
eptr = (unsigned char const *)(((Genode::addr_t)addr + size - 1) & L4_PAGEMASK);
|
||||
bptr = (unsigned char volatile *)(((addr_t)addr) & L4_PAGEMASK);
|
||||
eptr = (unsigned char const *)(((addr_t)addr + size - 1) & L4_PAGEMASK);
|
||||
for (; bptr <= eptr; bptr += L4_PAGESIZE)
|
||||
touch_read_write(bptr);
|
||||
}
|
||||
|
@ -28,8 +28,8 @@
|
||||
#include <trace/source_registry.h>
|
||||
#include <foc_native_vcpu/foc_native_vcpu.h>
|
||||
|
||||
namespace Genode
|
||||
{
|
||||
namespace Core {
|
||||
|
||||
class Vm_session_component;
|
||||
struct Vcpu;
|
||||
|
||||
@ -39,7 +39,7 @@ namespace Genode
|
||||
}
|
||||
|
||||
|
||||
struct Genode::Vcpu : Rpc_object<Vm_session::Native_vcpu, Vcpu>
|
||||
struct Core::Vcpu : Rpc_object<Vm_session::Native_vcpu, Vcpu>
|
||||
{
|
||||
private:
|
||||
|
||||
@ -69,7 +69,7 @@ struct Genode::Vcpu : Rpc_object<Vm_session::Native_vcpu, Vcpu>
|
||||
};
|
||||
|
||||
|
||||
class Genode::Vm_session_component
|
||||
class Core::Vm_session_component
|
||||
:
|
||||
private Ram_quota_guard,
|
||||
private Cap_quota_guard,
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include <io_mem_session_component.h>
|
||||
#include <map_local.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
void Io_mem_session_component::_unmap_local(addr_t base, size_t)
|
||||
|
@ -12,7 +12,6 @@
|
||||
*/
|
||||
|
||||
/* Genode includes */
|
||||
#include <base/log.h>
|
||||
#include <base/thread.h>
|
||||
|
||||
/* core includes */
|
||||
@ -25,7 +24,7 @@
|
||||
/* Fiasco.OC includes */
|
||||
#include <foc/syscall.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
using namespace Foc;
|
||||
|
||||
|
||||
|
@ -14,7 +14,6 @@
|
||||
*/
|
||||
|
||||
/* Genode includes */
|
||||
#include <base/log.h>
|
||||
#include <util/arg_string.h>
|
||||
#include <util/bit_array.h>
|
||||
|
||||
@ -28,15 +27,15 @@
|
||||
/* Fiasco.OC includes */
|
||||
#include <foc/syscall.h>
|
||||
|
||||
namespace Genode { class Interrupt_handler; }
|
||||
namespace Core { class Interrupt_handler; }
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
/**
|
||||
* Dispatches interrupts from kernel
|
||||
*/
|
||||
class Genode::Interrupt_handler : public Thread
|
||||
class Core::Interrupt_handler : public Thread
|
||||
{
|
||||
private:
|
||||
|
||||
@ -239,7 +238,7 @@ void Irq_session_component::ack_irq()
|
||||
}
|
||||
|
||||
|
||||
void Irq_session_component::sigh(Genode::Signal_context_capability cap)
|
||||
void Irq_session_component::sigh(Signal_context_capability cap)
|
||||
{
|
||||
_irq_object.sigh(cap);
|
||||
}
|
||||
@ -251,7 +250,7 @@ Irq_session::Info Irq_session_component::info()
|
||||
return { .type = Info::Type::INVALID, .address = 0, .value = 0 };
|
||||
|
||||
return {
|
||||
.type = Genode::Irq_session::Info::Type::MSI,
|
||||
.type = Irq_session::Info::Type::MSI,
|
||||
.address = (addr_t)_irq_object.msi_address(),
|
||||
.value = _irq_object.msi_value()
|
||||
};
|
||||
|
@ -11,9 +11,6 @@
|
||||
* under the terms of the GNU Affero General Public License version 3.
|
||||
*/
|
||||
|
||||
/* Genode includes */
|
||||
#include <base/log.h>
|
||||
|
||||
/* core includes */
|
||||
#include <native_cpu_component.h>
|
||||
#include <cpu_session_component.h>
|
||||
@ -22,7 +19,7 @@
|
||||
/* Fiasco.OC includes */
|
||||
#include <foc/syscall.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
Native_capability Native_cpu_component::native_cap(Thread_capability cap)
|
||||
|
@ -13,10 +13,6 @@
|
||||
* under the terms of the GNU Affero General Public License version 3.
|
||||
*/
|
||||
|
||||
/* Genode includes */
|
||||
#include <base/env.h>
|
||||
#include <base/log.h>
|
||||
|
||||
/* core includes */
|
||||
#include <pager.h>
|
||||
|
||||
@ -26,7 +22,7 @@
|
||||
/* Fiasco.OC includes */
|
||||
#include <foc/syscall.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
void Pager_entrypoint::entry()
|
||||
|
@ -20,7 +20,7 @@
|
||||
/* Fiasco.OC includes */
|
||||
#include <foc/syscall.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
void Pager_object::wake_up()
|
||||
|
@ -13,7 +13,6 @@
|
||||
*/
|
||||
|
||||
/* Genode includes */
|
||||
#include <base/log.h>
|
||||
#include <base/allocator_avl.h>
|
||||
#include <base/sleep.h>
|
||||
#include <dataspace/capability.h>
|
||||
@ -38,7 +37,7 @@
|
||||
/* Fiasco.OC includes */
|
||||
#include <foc/syscall.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
/***********************************
|
||||
@ -288,7 +287,7 @@ void Platform::_setup_mem_alloc()
|
||||
* prevent sigma0 from handing out those page as anonymous memory.
|
||||
*/
|
||||
volatile const char *beg, *end;
|
||||
beg = (const char *)(((Genode::addr_t)&_prog_img_beg) & L4_PAGEMASK);
|
||||
beg = (const char *)(((addr_t)&_prog_img_beg) & L4_PAGEMASK);
|
||||
end = (const char *)&_prog_img_end;
|
||||
for ( ; beg < end; beg += L4_PAGESIZE) (void)(*beg);
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include <foc/syscall.h>
|
||||
|
||||
using namespace Foc;
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
static addr_t core_utcb_base()
|
||||
|
@ -13,8 +13,6 @@
|
||||
|
||||
/* Genode includes */
|
||||
#include <base/ipc.h>
|
||||
#include <base/log.h>
|
||||
#include <util/string.h>
|
||||
#include <foc/thread_state.h>
|
||||
|
||||
/* core includes */
|
||||
@ -25,7 +23,7 @@
|
||||
/* Fiasco.OC includes */
|
||||
#include <foc/syscall.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
using namespace Foc;
|
||||
|
||||
|
||||
|
@ -11,14 +11,14 @@
|
||||
* under the terms of the GNU Affero General Public License version 3.
|
||||
*/
|
||||
|
||||
/* core-local includes */
|
||||
/* core includes */
|
||||
#include <ram_dataspace_factory.h>
|
||||
#include <map_local.h>
|
||||
|
||||
/* Fiasco.OC includes */
|
||||
#include <foc/syscall.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
void Ram_dataspace_factory::_export_ram_ds(Dataspace_component &) { }
|
||||
|
@ -29,7 +29,7 @@
|
||||
/* Fiasco.OC includes */
|
||||
#include <foc/syscall.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
/***************************
|
||||
|
@ -13,7 +13,6 @@
|
||||
*/
|
||||
|
||||
/* Genode includes */
|
||||
#include <base/log.h>
|
||||
#include <base/native_capability.h>
|
||||
|
||||
/* core includes */
|
||||
@ -23,13 +22,9 @@
|
||||
/* Fiasco.OC includes */
|
||||
#include <foc/syscall.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
/*****************************
|
||||
** Signal-source component **
|
||||
*****************************/
|
||||
|
||||
void Signal_source_component::release(Signal_context_component &context)
|
||||
{
|
||||
if (context.enqueued())
|
||||
|
@ -19,7 +19,7 @@
|
||||
/* Fiasco.OC includes */
|
||||
#include <foc/syscall.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
enum Exceptions { EX_REGS = 0x500000 };
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
#include <platform.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
void Platform::_setup_io_port_alloc() { }
|
||||
|
@ -19,7 +19,7 @@
|
||||
/* Fiasco.OC includes */
|
||||
#include <foc/syscall.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
enum Exceptions { EX_REGS = 0x500000 };
|
||||
|
@ -17,7 +17,7 @@
|
||||
/* Fiasco.OC includes */
|
||||
#include <foc/syscall.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
enum Exceptions { EX_REGS = 0xff };
|
||||
|
@ -13,17 +13,17 @@
|
||||
*/
|
||||
|
||||
/* Genode includes */
|
||||
#include <base/log.h>
|
||||
#include <irq_session/irq_session.h>
|
||||
#include <util/xml_generator.h>
|
||||
|
||||
#include "platform.h"
|
||||
#include "util.h"
|
||||
/* core includes */
|
||||
#include <platform.h>
|
||||
#include <util.h>
|
||||
|
||||
/* Fiasco.OC includes */
|
||||
#include <foc/syscall.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
void Platform::_setup_io_port_alloc()
|
||||
|
@ -20,10 +20,10 @@
|
||||
/*
|
||||
* Add x86 specific services
|
||||
*/
|
||||
void Genode::platform_add_local_services(Rpc_entrypoint &ep,
|
||||
Sliced_heap &heap,
|
||||
Registry<Service> &services,
|
||||
Trace::Source_registry &trace_sources)
|
||||
void Core::platform_add_local_services(Rpc_entrypoint &ep,
|
||||
Sliced_heap &heap,
|
||||
Registry<Service> &services,
|
||||
Trace::Source_registry &trace_sources)
|
||||
{
|
||||
static Vm_root vm_root(ep, heap, core_env().ram_allocator(),
|
||||
core_env().local_rm(), trace_sources);
|
||||
|
@ -16,7 +16,7 @@
|
||||
/* core includes */
|
||||
#include <ipc_pager.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
void Ipc_pager::get_regs(Foc_thread_state &state) const
|
||||
|
@ -16,7 +16,7 @@
|
||||
/* core includes */
|
||||
#include <ipc_pager.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
void Ipc_pager::get_regs(Foc_thread_state &state) const
|
||||
|
@ -27,7 +27,7 @@
|
||||
/* Fiasco.OC includes */
|
||||
#include <foc/syscall.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
void Thread::_deinit_platform_thread()
|
||||
@ -65,9 +65,9 @@ void Thread::start()
|
||||
|
||||
pt.start((void *)_thread_start, stack_top());
|
||||
|
||||
struct Core_trace_source : public Trace::Source::Info_accessor,
|
||||
private Trace::Control,
|
||||
private Trace::Source
|
||||
struct Core_trace_source : public Core::Trace::Source::Info_accessor,
|
||||
private Core::Trace::Control,
|
||||
private Core::Trace::Source
|
||||
{
|
||||
Thread &thread;
|
||||
Platform_thread &platform_thread;
|
||||
@ -101,16 +101,16 @@ void Thread::start()
|
||||
thread._affinity };
|
||||
}
|
||||
|
||||
Core_trace_source(Trace::Source_registry ®istry, Thread &t,
|
||||
Core_trace_source(Core::Trace::Source_registry ®istry, Thread &t,
|
||||
Platform_thread &pt)
|
||||
:
|
||||
Trace::Control(),
|
||||
Trace::Source(*this, *this), thread(t), platform_thread(pt)
|
||||
Core::Trace::Control(),
|
||||
Core::Trace::Source(*this, *this), thread(t), platform_thread(pt)
|
||||
{
|
||||
registry.insert(this);
|
||||
}
|
||||
};
|
||||
|
||||
new (platform().core_mem_alloc()) Core_trace_source(Trace::sources(),
|
||||
new (platform().core_mem_alloc()) Core_trace_source(Core::Trace::sources(),
|
||||
*this, pt);
|
||||
}
|
||||
|
@ -23,7 +23,7 @@
|
||||
/* Fiasco.OC includes */
|
||||
#include <foc/syscall.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
struct Vcpu_creation_error : Exception { };
|
||||
@ -44,7 +44,7 @@ Vcpu::Vcpu(Rpc_entrypoint &ep,
|
||||
Foc::l4_msgtag_t msg = l4_factory_create_irq(Foc::L4_BASE_FACTORY_CAP,
|
||||
_recall.local.data()->kcap());
|
||||
if (l4_error(msg)) {
|
||||
Genode::error("vcpu irq creation failed", l4_error(msg));
|
||||
error("vcpu irq creation failed", l4_error(msg));
|
||||
throw Vcpu_creation_error();
|
||||
}
|
||||
|
||||
@ -108,7 +108,7 @@ Vm_session_component::Vm_session_component(Rpc_entrypoint &ep,
|
||||
l4_msgtag_t msg = l4_factory_create_vm(L4_BASE_FACTORY_CAP,
|
||||
_task_vcpu.local.data()->kcap());
|
||||
if (l4_error(msg)) {
|
||||
Genode::error("create_vm failed ", l4_error(msg));
|
||||
error("create_vm failed ", l4_error(msg));
|
||||
throw Service_denied();
|
||||
}
|
||||
|
||||
@ -194,7 +194,7 @@ void Vm_session_component::_attach_vm_memory(Dataspace_component &dsc,
|
||||
L4_MAP_ITEM_MAP));
|
||||
|
||||
if (l4_error(msg))
|
||||
Genode::error("task map failed ", l4_error(msg));
|
||||
error("task map failed ", l4_error(msg));
|
||||
|
||||
page = flex.page();
|
||||
}
|
||||
|
@ -157,9 +157,9 @@ void Platform::start_core(unsigned cpu_id)
|
||||
}
|
||||
|
||||
|
||||
static constexpr Genode::Boot_modules_header & header()
|
||||
static constexpr Core::Boot_modules_header &header()
|
||||
{
|
||||
return *((Genode::Boot_modules_header*) &_boot_modules_headers_begin);
|
||||
return *((Core::Boot_modules_header*) &_boot_modules_headers_begin);
|
||||
}
|
||||
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include <hw/spec/arm/imx_tzic.h>
|
||||
#include <hw/spec/arm/imx53_qsb_board.h>
|
||||
|
||||
/* base-hw Core includes */
|
||||
/* base-hw core includes */
|
||||
#include <spec/arm/imx_epit.h>
|
||||
#include <spec/arm/trustzone_board.h>
|
||||
#include <spec/cortex_a8/cpu.h>
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include <hw/spec/arm/gicv2.h>
|
||||
#include <hw/spec/arm/imx6q_sabrelite_board.h>
|
||||
|
||||
/* base-hw Core includes */
|
||||
/* base-hw core includes */
|
||||
#include <spec/arm/cortex_a9_global_timer.h>
|
||||
#include <spec/cortex_a9/cpu.h>
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
/* base-hw internal includes */
|
||||
#include <hw/spec/arm/imx7d_sabre_board.h>
|
||||
|
||||
/* base-hw Core includes */
|
||||
/* base-hw core includes */
|
||||
#include <spec/arm/virtualization/gicv2.h>
|
||||
#include <spec/arm/generic_timer.h>
|
||||
#include <spec/arm/cpu/vm_state_virtualization.h>
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include <hw/spec/arm/gicv2.h>
|
||||
#include <hw/spec/arm/nit6_solox_board.h>
|
||||
|
||||
/* base-hw Core includes */
|
||||
/* base-hw core includes */
|
||||
#include <spec/arm/cortex_a9_global_timer.h>
|
||||
#include <spec/cortex_a9/cpu.h>
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include <hw/spec/arm/gicv2.h>
|
||||
#include <hw/spec/arm/pbxa9_board.h>
|
||||
|
||||
/* base-hw Core includes */
|
||||
/* base-hw core includes */
|
||||
#include <spec/arm/cortex_a9_global_timer.h>
|
||||
#include <spec/cortex_a9/cpu.h>
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
*/
|
||||
namespace Board { using namespace Hw::Pc_board; };
|
||||
|
||||
/* base-hw Core includes */
|
||||
/* base-hw core includes */
|
||||
#include <spec/x86_64/pic.h>
|
||||
#include <spec/x86_64/pit.h>
|
||||
#include <spec/x86_64/cpu.h>
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include <hw/spec/arm/imx_tzic.h>
|
||||
#include <hw/spec/arm/usb_armory_board.h>
|
||||
|
||||
/* base-hw Core includes */
|
||||
/* base-hw core includes */
|
||||
#include <spec/arm/imx_epit.h>
|
||||
#include <spec/arm/trustzone_board.h>
|
||||
#include <spec/cortex_a8/cpu.h>
|
||||
|
@ -14,19 +14,13 @@
|
||||
#ifndef _SRC__CORE__SPEC__VIRT__QEMU_H_
|
||||
#define _SRC__CORE__SPEC__VIRT__QEMU_H_
|
||||
|
||||
/* base-hw internal includes */
|
||||
/* base-hw core includes */
|
||||
#include <hw/spec/arm/virt_qemu_board.h>
|
||||
|
||||
/* base-hw Core includes */
|
||||
#include <spec/arm/virtualization/gicv2.h>
|
||||
#include <spec/arm/generic_timer.h>
|
||||
|
||||
/* base-hw includes */
|
||||
#include <spec/arm/cpu/vm_state_virtualization.h>
|
||||
|
||||
/* base-hw Core includes */
|
||||
#include <spec/arm/virtualization/board.h>
|
||||
#include <spec/cortex_a15/cpu.h>
|
||||
#include <spec/arm/cpu/vm_state_virtualization.h>
|
||||
|
||||
namespace Kernel { class Cpu; }
|
||||
|
||||
|
@ -16,15 +16,9 @@
|
||||
|
||||
/* base-hw internal includes */
|
||||
#include <hw/spec/arm/virt_qemu_board.h>
|
||||
|
||||
/* base-hw Core includes */
|
||||
#include <spec/arm/generic_timer.h>
|
||||
#include <spec/arm/virtualization/gicv3.h>
|
||||
|
||||
/* base-hw includes */
|
||||
#include <spec/arm_64/cpu/vm_state_virtualization.h>
|
||||
|
||||
/* base-hw Core includes */
|
||||
#include <kernel/configuration.h>
|
||||
#include <kernel/irq.h>
|
||||
#include <spec/arm_v8/cpu.h>
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include <hw/spec/arm/gicv2.h>
|
||||
#include <hw/spec/arm/wand_quad_board.h>
|
||||
|
||||
/* base-hw Core includes */
|
||||
/* base-hw core includes */
|
||||
#include <spec/arm/cortex_a9_global_timer.h>
|
||||
#include <spec/cortex_a9/cpu.h>
|
||||
|
||||
|
@ -13,18 +13,18 @@
|
||||
*/
|
||||
|
||||
/* Genode includes */
|
||||
#include <base/log.h>
|
||||
#include <base/thread.h>
|
||||
|
||||
/* base-internal includes */
|
||||
#include <base/internal/output.h>
|
||||
#include <base/internal/raw_write_string.h>
|
||||
|
||||
/* core includes */
|
||||
#include <core_log.h>
|
||||
#include <kernel/cpu.h>
|
||||
#include <kernel/log.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
void Core_log::out(char const c) { Kernel::log(c); }
|
||||
|
@ -19,9 +19,8 @@
|
||||
#include <core_region_map.h>
|
||||
#include <map_local.h>
|
||||
#include <util.h>
|
||||
#include <base/heap.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
Region_map::Local_addr
|
||||
|
@ -21,7 +21,7 @@
|
||||
/* base-internal includes */
|
||||
#include <base/internal/native_utcb.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
Dataspace_capability Cpu_thread_component::utcb()
|
||||
|
@ -15,13 +15,12 @@
|
||||
#define _CORE__CPU_THREAD_ALLOCATOR_H_
|
||||
|
||||
/* Genode includes */
|
||||
#include <base/log.h>
|
||||
#include <base/allocator.h>
|
||||
|
||||
/* core includes */
|
||||
#include <assertion.h>
|
||||
|
||||
namespace Genode { class Cpu_thread_allocator; }
|
||||
namespace Core { class Cpu_thread_allocator; }
|
||||
|
||||
|
||||
/**
|
||||
@ -31,7 +30,7 @@ namespace Genode { class Cpu_thread_allocator; }
|
||||
* are tiny objects, but in 'base-hw' they contain the whole kernel
|
||||
* object in addition. Thus we use the given allocator directly.
|
||||
*/
|
||||
class Genode::Cpu_thread_allocator : public Allocator
|
||||
class Core::Cpu_thread_allocator : public Allocator
|
||||
{
|
||||
private:
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
/* core includes */
|
||||
#include <io_mem_session_component.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
void Io_mem_session_component::_unmap_local(addr_t, size_t) { }
|
||||
|
@ -23,7 +23,7 @@
|
||||
/* base-internal includes */
|
||||
#include <base/internal/capability_space.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
unsigned Irq_session_component::_find_irq_number(const char * const args)
|
||||
|
@ -19,15 +19,16 @@
|
||||
#include <util/list.h>
|
||||
#include <irq_session/capability.h>
|
||||
|
||||
/* core includes */
|
||||
#include <irq_args.h>
|
||||
#include <object.h>
|
||||
#include <kernel/irq.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:
|
||||
|
||||
|
@ -15,8 +15,6 @@
|
||||
#ifndef _CORE__KERNEL__CPU_H_
|
||||
#define _CORE__KERNEL__CPU_H_
|
||||
|
||||
#include <util/reconstructible.h>
|
||||
|
||||
/* core includes */
|
||||
#include <board.h>
|
||||
#include <kernel/cpu_context.h>
|
||||
@ -66,7 +64,7 @@ namespace Kernel {
|
||||
*/
|
||||
#pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
|
||||
|
||||
class Kernel::Cpu : public Genode::Cpu, private Irq::Pool, private Timeout
|
||||
class Kernel::Cpu : public Core::Cpu, private Irq::Pool, private Timeout
|
||||
{
|
||||
private:
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
* under the terms of the GNU Affero General Public License version 3.
|
||||
*/
|
||||
|
||||
#include <base/log.h>
|
||||
#include <types.h>
|
||||
#include <hw/assert.h>
|
||||
#include <kernel/cpu_scheduler.h>
|
||||
|
||||
|
@ -42,7 +42,7 @@ namespace Kernel {
|
||||
}
|
||||
|
||||
|
||||
namespace Genode {
|
||||
namespace Core {
|
||||
|
||||
/**
|
||||
* Core front-end of a user interrupt
|
||||
@ -182,11 +182,11 @@ class Kernel::User_irq : public Kernel::Irq
|
||||
* \param polarity low or high
|
||||
* \param sig capability of signal context
|
||||
*/
|
||||
static capid_t syscall_create(Genode::Kernel_object<User_irq> & irq,
|
||||
unsigned nr,
|
||||
Genode::Irq_session::Trigger trigger,
|
||||
Genode::Irq_session::Polarity polarity,
|
||||
capid_t sig)
|
||||
static capid_t syscall_create(Core::Kernel_object<User_irq> &irq,
|
||||
unsigned nr,
|
||||
Genode::Irq_session::Trigger trigger,
|
||||
Genode::Irq_session::Polarity polarity,
|
||||
capid_t sig)
|
||||
{
|
||||
return (capid_t)call(call_id_new_irq(), (Call_arg)&irq, nr,
|
||||
(trigger << 2) | polarity, sig);
|
||||
@ -197,7 +197,7 @@ class Kernel::User_irq : public Kernel::Irq
|
||||
*
|
||||
* \param irq reference to constructible object
|
||||
*/
|
||||
static void syscall_destroy(Genode::Kernel_object<User_irq> &irq) {
|
||||
static void syscall_destroy(Core::Kernel_object<User_irq> &irq) {
|
||||
call(call_id_delete_irq(), (Call_arg) &irq); }
|
||||
|
||||
Object &kernel_object() { return _kernel_object; }
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include <cpu/atomic.h>
|
||||
#include <cpu/memory_barrier.h>
|
||||
|
||||
/* base-hw Core includes */
|
||||
/* base-hw core includes */
|
||||
#include <kernel/cpu.h>
|
||||
#include <kernel/lock.h>
|
||||
|
||||
|
@ -12,13 +12,8 @@
|
||||
* under the terms of the GNU Affero General Public License version 3.
|
||||
*/
|
||||
|
||||
/* base includes */
|
||||
#include <util/reconstructible.h>
|
||||
|
||||
/* base Core includes */
|
||||
/* core includes */
|
||||
#include <map_local.h>
|
||||
|
||||
/* base-hw Core includes */
|
||||
#include <kernel/cpu.h>
|
||||
#include <kernel/lock.h>
|
||||
#include <kernel/main.h>
|
||||
@ -28,11 +23,7 @@
|
||||
/* base-hw-internal includes */
|
||||
#include <hw/boot_info.h>
|
||||
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
class Main;
|
||||
}
|
||||
namespace Kernel { class Main; }
|
||||
|
||||
|
||||
class Kernel::Main
|
||||
@ -52,10 +43,10 @@ class Kernel::Main
|
||||
Cpu_pool _cpu_pool;
|
||||
Irq::Pool _user_irq_pool { };
|
||||
Board::Address_space_id_allocator _addr_space_id_alloc { };
|
||||
Genode::Core_platform_pd _core_platform_pd { _addr_space_id_alloc };
|
||||
Core::Core_platform_pd _core_platform_pd { _addr_space_id_alloc };
|
||||
Genode::Constructible<Core_main_thread> _core_main_thread { };
|
||||
Board::Global_interrupt_controller _global_irq_ctrl { };
|
||||
Board::Serial _serial { Genode::Platform::mmio_to_virt(Board::UART_BASE),
|
||||
Board::Serial _serial { Core::Platform::mmio_to_virt(Board::UART_BASE),
|
||||
Board::UART_CLOCK,
|
||||
SERIAL_BAUD_RATE };
|
||||
|
||||
@ -65,7 +56,7 @@ class Kernel::Main
|
||||
|
||||
public:
|
||||
|
||||
static Genode::Platform_pd &core_platform_pd();
|
||||
static Core::Platform_pd &core_platform_pd();
|
||||
};
|
||||
|
||||
|
||||
@ -101,7 +92,7 @@ void Kernel::main_handle_kernel_entry()
|
||||
|
||||
void Kernel::main_initialize_and_handle_kernel_entry()
|
||||
{
|
||||
static_assert(sizeof(Genode::sizet_arithm_t) >= 2 * sizeof(size_t),
|
||||
static_assert(sizeof(Core::sizet_arithm_t) >= 2 * sizeof(size_t),
|
||||
"Bad result type for size_t arithmetics.");
|
||||
|
||||
using Boot_info = Hw::Boot_info<Board::Boot_info>;
|
||||
@ -226,7 +217,7 @@ void Kernel::main_initialize_and_handle_kernel_entry()
|
||||
}
|
||||
|
||||
|
||||
Genode::Platform_pd &Kernel::Main::core_platform_pd()
|
||||
Core::Platform_pd &Kernel::Main::core_platform_pd()
|
||||
{
|
||||
return _instance->_core_platform_pd;
|
||||
}
|
||||
@ -244,15 +235,14 @@ Kernel::time_t Kernel::main_read_idle_thread_execution_time(unsigned cpu_idx)
|
||||
}
|
||||
|
||||
|
||||
Genode::Platform_pd &
|
||||
Genode::Platform_thread::_kernel_main_get_core_platform_pd()
|
||||
Core::Platform_pd &Core::Platform_thread::_kernel_main_get_core_platform_pd()
|
||||
{
|
||||
return Kernel::Main::core_platform_pd();
|
||||
}
|
||||
|
||||
|
||||
bool Genode::map_local(addr_t from_phys, addr_t to_virt, size_t num_pages,
|
||||
Page_flags flags)
|
||||
bool Core::map_local(addr_t from_phys, addr_t to_virt, size_t num_pages,
|
||||
Page_flags flags)
|
||||
{
|
||||
return
|
||||
Kernel::Main::core_platform_pd().insert_translation(
|
||||
@ -260,7 +250,7 @@ bool Genode::map_local(addr_t from_phys, addr_t to_virt, size_t num_pages,
|
||||
}
|
||||
|
||||
|
||||
bool Genode::unmap_local(addr_t virt_addr, size_t num_pages)
|
||||
bool Core::unmap_local(addr_t virt_addr, size_t num_pages)
|
||||
{
|
||||
Kernel::Main::core_platform_pd().flush(
|
||||
virt_addr, num_pages * get_page_size());
|
||||
|
@ -14,7 +14,7 @@
|
||||
#ifndef _KERNEL__MAIN_H_
|
||||
#define _KERNEL__MAIN_H_
|
||||
|
||||
/* base-hw Core includes */
|
||||
/* base-hw core includes */
|
||||
#include <kernel/types.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
@ -18,9 +18,9 @@
|
||||
#include <util/avl_tree.h>
|
||||
#include <util/bit_allocator.h>
|
||||
#include <util/list.h>
|
||||
#include <util/reconstructible.h>
|
||||
|
||||
/* core includes */
|
||||
#include <types.h>
|
||||
#include <kernel/core_interface.h>
|
||||
#include <kernel/interface.h>
|
||||
|
||||
|
@ -15,16 +15,13 @@
|
||||
#ifndef _CORE__KERNEL__PD_H_
|
||||
#define _CORE__KERNEL__PD_H_
|
||||
|
||||
/* base-hw Core includes */
|
||||
/* base-hw core includes */
|
||||
#include <hw/assert.h>
|
||||
#include <kernel/core_interface.h>
|
||||
#include <object.h>
|
||||
#include <board.h>
|
||||
|
||||
/* base includes */
|
||||
#include <util/reconstructible.h>
|
||||
|
||||
namespace Genode { class Platform_pd; }
|
||||
namespace Core { class Platform_pd; }
|
||||
|
||||
|
||||
namespace Kernel {
|
||||
@ -50,13 +47,13 @@ class Kernel::Pd
|
||||
|
||||
Kernel::Object _kernel_object { *this };
|
||||
Hw::Page_table &_table;
|
||||
Genode::Platform_pd &_platform_pd;
|
||||
Core::Platform_pd &_platform_pd;
|
||||
Capid_allocator _capid_alloc { };
|
||||
Object_identity_reference_tree _cap_tree { };
|
||||
|
||||
public:
|
||||
|
||||
Genode::Cpu::Mmu_context mmu_regs;
|
||||
Core::Cpu::Mmu_context mmu_regs;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@ -65,7 +62,7 @@ class Kernel::Pd
|
||||
* \param platform_pd core object of the PD
|
||||
*/
|
||||
Pd(Hw::Page_table &table,
|
||||
Genode::Platform_pd &platform_pd,
|
||||
Core::Platform_pd &platform_pd,
|
||||
Board::Address_space_id_allocator &addr_space_id_alloc)
|
||||
:
|
||||
_table(table),
|
||||
@ -82,15 +79,15 @@ class Kernel::Pd
|
||||
oir->~Object_identity_reference();
|
||||
}
|
||||
|
||||
static capid_t syscall_create(Genode::Kernel_object<Pd> &p,
|
||||
Hw::Page_table &tt,
|
||||
Genode::Platform_pd &pd)
|
||||
static capid_t syscall_create(Core::Kernel_object<Pd> &p,
|
||||
Hw::Page_table &tt,
|
||||
Core::Platform_pd &pd)
|
||||
{
|
||||
return (capid_t)call(call_id_new_pd(), (Call_arg)&p,
|
||||
(Call_arg)&tt, (Call_arg)&pd);
|
||||
}
|
||||
|
||||
static void syscall_destroy(Genode::Kernel_object<Pd> & p) {
|
||||
static void syscall_destroy(Core::Kernel_object<Pd> & p) {
|
||||
call(call_id_delete_pd(), (Call_arg)&p); }
|
||||
|
||||
/**
|
||||
@ -105,7 +102,7 @@ class Kernel::Pd
|
||||
***************/
|
||||
|
||||
Object &kernel_object() { return _kernel_object; }
|
||||
Genode::Platform_pd &platform_pd() { return _platform_pd; }
|
||||
Core::Platform_pd &platform_pd() { return _platform_pd; }
|
||||
Hw::Page_table &translation_table() { return _table; }
|
||||
Capid_allocator &capid_alloc() { return _capid_alloc; }
|
||||
Object_identity_reference_tree &cap_tree() { return _cap_tree; }
|
||||
|
@ -16,8 +16,8 @@
|
||||
|
||||
/* Genode includes */
|
||||
#include <base/signal.h>
|
||||
#include <util/reconstructible.h>
|
||||
|
||||
/* core includes */
|
||||
#include <kernel/core_interface.h>
|
||||
#include <object.h>
|
||||
|
||||
@ -199,7 +199,7 @@ class Kernel::Signal_context
|
||||
*
|
||||
* \retval capability id of the new kernel object
|
||||
*/
|
||||
static capid_t syscall_create(Genode::Kernel_object<Signal_context> &c,
|
||||
static capid_t syscall_create(Core::Kernel_object<Signal_context> &c,
|
||||
Signal_receiver & receiver,
|
||||
addr_t const imprint)
|
||||
{
|
||||
@ -212,7 +212,7 @@ class Kernel::Signal_context
|
||||
*
|
||||
* \param context pointer to signal context kernel object
|
||||
*/
|
||||
static void syscall_destroy(Genode::Kernel_object<Signal_context> &c) {
|
||||
static void syscall_destroy(Core::Kernel_object<Signal_context> &c) {
|
||||
call(call_id_delete_signal_context(), (Call_arg)&c); }
|
||||
|
||||
Object &kernel_object() { return _kernel_object; }
|
||||
@ -282,7 +282,7 @@ class Kernel::Signal_receiver
|
||||
*
|
||||
* \retval capability id of the new kernel object
|
||||
*/
|
||||
static capid_t syscall_create(Genode::Kernel_object<Signal_receiver> &r) {
|
||||
static capid_t syscall_create(Core::Kernel_object<Signal_receiver> &r) {
|
||||
return (capid_t)call(call_id_new_signal_receiver(), (Call_arg)&r); }
|
||||
|
||||
/**
|
||||
@ -290,7 +290,7 @@ class Kernel::Signal_receiver
|
||||
*
|
||||
* \param receiver pointer to signal receiver kernel object
|
||||
*/
|
||||
static void syscall_destroy(Genode::Kernel_object<Signal_receiver> &r) {
|
||||
static void syscall_destroy(Core::Kernel_object<Signal_receiver> &r) {
|
||||
call(call_id_delete_signal_receiver(), (Call_arg)&r); }
|
||||
|
||||
Object &kernel_object() { return _kernel_object; }
|
||||
|
@ -159,7 +159,7 @@ Tlb_invalidation::Tlb_invalidation(Inter_processor_work_list &global_work_list,
|
||||
}
|
||||
|
||||
|
||||
Thread::Destroy::Destroy(Thread & caller, Genode::Kernel_object<Thread> & to_delete)
|
||||
Thread::Destroy::Destroy(Thread & caller, Core::Kernel_object<Thread> & to_delete)
|
||||
:
|
||||
caller(caller), thread_to_destroy(to_delete)
|
||||
{
|
||||
@ -302,7 +302,7 @@ Cpu_job * Thread::helping_destination() {
|
||||
size_t Thread::_core_to_kernel_quota(size_t const quota) const
|
||||
{
|
||||
using Genode::Cpu_session;
|
||||
using Genode::sizet_arithm_t;
|
||||
using Core::sizet_arithm_t;
|
||||
|
||||
/* we assert at timer construction that cpu_quota_us in ticks fits size_t */
|
||||
size_t const ticks = (size_t)
|
||||
@ -445,8 +445,8 @@ void Thread::_call_yield_thread()
|
||||
|
||||
void Thread::_call_delete_thread()
|
||||
{
|
||||
Genode::Kernel_object<Thread> & to_delete =
|
||||
*(Genode::Kernel_object<Thread>*)user_arg_1();
|
||||
Core::Kernel_object<Thread> & to_delete =
|
||||
*(Core::Kernel_object<Thread>*)user_arg_1();
|
||||
|
||||
/**
|
||||
* Delete a thread immediately if it has no cpu assigned yet,
|
||||
@ -469,8 +469,8 @@ void Thread::_call_delete_thread()
|
||||
|
||||
void Thread::_call_delete_pd()
|
||||
{
|
||||
Genode::Kernel_object<Pd> & pd =
|
||||
*(Genode::Kernel_object<Pd>*)user_arg_1();
|
||||
Core::Kernel_object<Pd> & pd =
|
||||
*(Core::Kernel_object<Pd>*)user_arg_1();
|
||||
|
||||
if (_cpu->active(pd->mmu_regs))
|
||||
_cpu->switch_to(_core_pd.mmu_regs);
|
||||
@ -851,8 +851,8 @@ void Thread::_call()
|
||||
case call_id_thread_pager(): _call_pager(); return;
|
||||
case call_id_invalidate_tlb(): _call_invalidate_tlb(); return;
|
||||
case call_id_new_pd():
|
||||
_call_new<Pd>(*(Hw::Page_table *) user_arg_2(),
|
||||
*(Genode::Platform_pd *) user_arg_3(),
|
||||
_call_new<Pd>(*(Hw::Page_table *) user_arg_2(),
|
||||
*(Core::Platform_pd *) user_arg_3(),
|
||||
_addr_space_id_alloc);
|
||||
return;
|
||||
case call_id_delete_pd(): _call_delete_pd(); return;
|
||||
@ -951,11 +951,11 @@ Core_main_thread(Board::Address_space_id_allocator &addr_space_id_alloc,
|
||||
Core_object<Thread>(
|
||||
core_pd, addr_space_id_alloc, user_irq_pool, cpu_pool, core_pd, "core")
|
||||
{
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
Genode::map_local(Platform::core_phys_addr((addr_t)&_utcb_instance),
|
||||
(addr_t)utcb_main_thread(),
|
||||
sizeof(Native_utcb) / get_page_size());
|
||||
map_local(Platform::core_phys_addr((addr_t)&_utcb_instance),
|
||||
(addr_t)utcb_main_thread(),
|
||||
sizeof(Native_utcb) / get_page_size());
|
||||
|
||||
_utcb_instance.cap_add(core_capid());
|
||||
_utcb_instance.cap_add(cap_id_invalid());
|
||||
|
@ -14,12 +14,10 @@
|
||||
#ifndef _CORE__KERNEL__THREAD_H_
|
||||
#define _CORE__KERNEL__THREAD_H_
|
||||
|
||||
|
||||
/* Genode includes */
|
||||
#include <base/signal.h>
|
||||
#include <util/reconstructible.h>
|
||||
|
||||
/* base-hw Core includes */
|
||||
/* base-hw core includes */
|
||||
#include <kernel/cpu_context.h>
|
||||
#include <kernel/inter_processor_work.h>
|
||||
#include <kernel/signal_receiver.h>
|
||||
@ -101,7 +99,7 @@ class Kernel::Thread : private Kernel::Object, public Cpu_job, private Timeout
|
||||
*/
|
||||
struct Destroy : Inter_processor_work
|
||||
{
|
||||
using Kthread = Genode::Kernel_object<Thread>;
|
||||
using Kthread = Core::Kernel_object<Thread>;
|
||||
|
||||
Thread & caller; /* the caller gets blocked till the end */
|
||||
Kthread & thread_to_destroy; /* thread to be destroyed */
|
||||
@ -300,8 +298,7 @@ class Kernel::Thread : private Kernel::Object, public Cpu_job, private Timeout
|
||||
template <typename T, typename... ARGS>
|
||||
void _call_new(ARGS &&... args)
|
||||
{
|
||||
Genode::Kernel_object<T> & kobj =
|
||||
*(Genode::Kernel_object<T>*)user_arg_1();
|
||||
Core::Kernel_object<T> & kobj = *(Core::Kernel_object<T>*)user_arg_1();
|
||||
kobj.construct(_core_pd, args...);
|
||||
user_arg_0(kobj->core_capid());
|
||||
}
|
||||
@ -310,8 +307,7 @@ class Kernel::Thread : private Kernel::Object, public Cpu_job, private Timeout
|
||||
template <typename T>
|
||||
void _call_delete()
|
||||
{
|
||||
Genode::Kernel_object<T> & kobj =
|
||||
*(Genode::Kernel_object<T>*)user_arg_1();
|
||||
Core::Kernel_object<T> & kobj = *(Core::Kernel_object<T>*)user_arg_1();
|
||||
kobj.destruct();
|
||||
}
|
||||
|
||||
@ -321,7 +317,7 @@ class Kernel::Thread : private Kernel::Object, public Cpu_job, private Timeout
|
||||
|
||||
public:
|
||||
|
||||
Genode::Align_at<Genode::Cpu::Context> regs;
|
||||
Genode::Align_at<Core::Cpu::Context> regs;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@ -388,10 +384,10 @@ class Kernel::Thread : private Kernel::Object, public Cpu_job, private Timeout
|
||||
*
|
||||
* \retval capability id of the new kernel object
|
||||
*/
|
||||
static capid_t syscall_create(Genode::Kernel_object<Thread> & t,
|
||||
unsigned const priority,
|
||||
size_t const quota,
|
||||
char const * const label)
|
||||
static capid_t syscall_create(Core::Kernel_object<Thread> &t,
|
||||
unsigned const priority,
|
||||
size_t const quota,
|
||||
char const * const label)
|
||||
{
|
||||
return (capid_t)call(call_id_new_thread(), (Call_arg)&t,
|
||||
(Call_arg)priority, (Call_arg)quota,
|
||||
@ -406,8 +402,8 @@ class Kernel::Thread : private Kernel::Object, public Cpu_job, private Timeout
|
||||
*
|
||||
* \retval capability id of the new kernel object
|
||||
*/
|
||||
static capid_t syscall_create(Genode::Kernel_object<Thread> & t,
|
||||
char const * const label)
|
||||
static capid_t syscall_create(Core::Kernel_object<Thread> &t,
|
||||
char const * const label)
|
||||
{
|
||||
return (capid_t)call(call_id_new_core_thread(), (Call_arg)&t,
|
||||
(Call_arg)label);
|
||||
@ -418,11 +414,13 @@ class Kernel::Thread : private Kernel::Object, public Cpu_job, private Timeout
|
||||
*
|
||||
* \param thread pointer to thread kernel object
|
||||
*/
|
||||
static void syscall_destroy(Genode::Kernel_object<Thread> & t) {
|
||||
static void syscall_destroy(Core::Kernel_object<Thread> &t) {
|
||||
call(call_id_delete_thread(), (Call_arg)&t); }
|
||||
|
||||
|
||||
void print(Genode::Output &out) const;
|
||||
|
||||
|
||||
/**************
|
||||
** Ipc_node **
|
||||
**************/
|
||||
|
@ -11,7 +11,7 @@
|
||||
* under the terms of the GNU Affero General Public License version 3.
|
||||
*/
|
||||
|
||||
/* Core includes */
|
||||
/* core includes */
|
||||
#include <kernel/cpu.h>
|
||||
#include <kernel/timer.h>
|
||||
#include <kernel/configuration.h>
|
||||
|
@ -97,11 +97,11 @@ class Kernel::Vm : private Kernel::Object, public Cpu_job
|
||||
*
|
||||
* \retval cap id when successful, otherwise invalid cap id
|
||||
*/
|
||||
static capid_t syscall_create(Genode::Kernel_object<Vm> & vm,
|
||||
unsigned cpu,
|
||||
void * const state,
|
||||
capid_t const signal_context_id,
|
||||
Identity & id)
|
||||
static capid_t syscall_create(Core::Kernel_object<Vm> &vm,
|
||||
unsigned cpu,
|
||||
void * const state,
|
||||
capid_t const signal_context_id,
|
||||
Identity &id)
|
||||
{
|
||||
return (capid_t)call(call_id_new_vm(), (Call_arg)&vm, (Call_arg)cpu,
|
||||
(Call_arg)state, (Call_arg)&id, signal_context_id);
|
||||
@ -114,7 +114,7 @@ class Kernel::Vm : private Kernel::Object, public Cpu_job
|
||||
*
|
||||
* \retval 0 when successful, otherwise !=0
|
||||
*/
|
||||
static void syscall_destroy(Genode::Kernel_object<Vm> & vm) {
|
||||
static void syscall_destroy(Core::Kernel_object<Vm> & vm) {
|
||||
call(call_id_delete_vm(), (Call_arg) &vm); }
|
||||
|
||||
Object &kernel_object() { return _kernel_object; }
|
||||
|
@ -12,7 +12,7 @@
|
||||
* under the terms of the GNU Affero General Public License version 3.
|
||||
*/
|
||||
|
||||
/* base-hw Core includes */
|
||||
/* core includes */
|
||||
#include <kernel/main.h>
|
||||
#include <kernel/log.h>
|
||||
|
||||
|
@ -14,9 +14,11 @@
|
||||
#ifndef _CORE__MAP_LOCAL_H_
|
||||
#define _CORE__MAP_LOCAL_H_
|
||||
|
||||
/* core includes */
|
||||
#include <types.h>
|
||||
#include <hw/page_flags.h>
|
||||
|
||||
namespace Genode {
|
||||
namespace Core {
|
||||
|
||||
using Hw::Page_flags;
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include <pd_session_component.h>
|
||||
#include <native_pd_component.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
void Native_pd_component::upgrade_cap_slab()
|
||||
|
@ -18,17 +18,17 @@
|
||||
/* Genode includes */
|
||||
#include <hw_native_pd/hw_native_pd.h>
|
||||
|
||||
/* core-local includes */
|
||||
/* core includes */
|
||||
#include <rpc_cap_factory.h>
|
||||
|
||||
namespace Genode {
|
||||
namespace Core {
|
||||
|
||||
class Pd_session_component;
|
||||
class Native_pd_component;
|
||||
}
|
||||
|
||||
|
||||
class Genode::Native_pd_component : public Rpc_object<Pd_session::Native_pd>
|
||||
class Core::Native_pd_component : public Rpc_object<Pd_session::Native_pd>
|
||||
{
|
||||
private:
|
||||
|
||||
|
@ -14,29 +14,26 @@
|
||||
#ifndef _CORE__OBJECT_H_
|
||||
#define _CORE__OBJECT_H_
|
||||
|
||||
/* Genode includes */
|
||||
#include <util/reconstructible.h>
|
||||
|
||||
/* base-internal includes */
|
||||
#include <base/internal/capability_space.h>
|
||||
|
||||
/* core includes */
|
||||
#include <types.h>
|
||||
|
||||
/* base-hw includes */
|
||||
#include <kernel/interface.h>
|
||||
#include <kernel/object.h>
|
||||
|
||||
namespace Genode {
|
||||
|
||||
/**
|
||||
* Represents a kernel object in core
|
||||
*
|
||||
* \param T type of the kernel object
|
||||
*/
|
||||
template <typename T> class Kernel_object;
|
||||
}
|
||||
namespace Core { template <typename T> class Kernel_object; }
|
||||
|
||||
|
||||
/**
|
||||
* Represents a kernel object in core
|
||||
*
|
||||
* \param T type of the kernel object
|
||||
*/
|
||||
template <typename T>
|
||||
class Genode::Kernel_object : public Genode::Constructible<Kernel::Core_object<T>>
|
||||
class Core::Kernel_object : public Constructible<Kernel::Core_object<T>>
|
||||
{
|
||||
protected:
|
||||
|
||||
@ -66,12 +63,12 @@ class Genode::Kernel_object : public Genode::Constructible<Kernel::Core_object<T
|
||||
:
|
||||
_cap(Capability_space::import(Kernel::cap_id_invalid()))
|
||||
{
|
||||
Genode::Constructible<Kernel::Core_object<T>>::construct(args...);
|
||||
Constructible<Kernel::Core_object<T>>::construct(args...);
|
||||
}
|
||||
|
||||
~Kernel_object()
|
||||
{
|
||||
if (Genode::Constructible<Kernel::Core_object<T>>::constructed())
|
||||
if (Constructible<Kernel::Core_object<T>>::constructed())
|
||||
T::syscall_destroy(*this);
|
||||
}
|
||||
|
||||
@ -83,7 +80,7 @@ class Genode::Kernel_object : public Genode::Constructible<Kernel::Core_object<T
|
||||
template <typename... ARGS>
|
||||
bool create(ARGS &&... args)
|
||||
{
|
||||
if (Genode::Constructible<Kernel::Core_object<T>>::constructed())
|
||||
if (Constructible<Kernel::Core_object<T>>::constructed())
|
||||
return false;
|
||||
|
||||
_cap = Capability_space::import(T::syscall_create(*this, args...));
|
||||
|
@ -11,9 +11,6 @@
|
||||
* under the terms of the GNU Affero General Public License version 3.
|
||||
*/
|
||||
|
||||
/* Genode includes */
|
||||
#include <base/log.h>
|
||||
|
||||
/* core includes*/
|
||||
#include <pager.h>
|
||||
#include <platform_thread.h>
|
||||
@ -23,7 +20,7 @@
|
||||
/* base-internal includes */
|
||||
#include <base/internal/capability_space.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
/***************
|
||||
|
@ -21,14 +21,14 @@
|
||||
#include <base/signal.h>
|
||||
#include <pager/capability.h>
|
||||
|
||||
/* core-local includes */
|
||||
/* core includes */
|
||||
#include <kernel/signal_receiver.h>
|
||||
#include <hw/mapping.h>
|
||||
#include <mapping.h>
|
||||
#include <object.h>
|
||||
#include <rpc_cap_factory.h>
|
||||
|
||||
namespace Genode {
|
||||
namespace Core {
|
||||
|
||||
/**
|
||||
* Interface used by generic region_map code
|
||||
@ -50,11 +50,13 @@ namespace Genode {
|
||||
*/
|
||||
class Pager_entrypoint;
|
||||
|
||||
using Pager_capability = Capability<Pager_object>;
|
||||
|
||||
enum { PAGER_EP_STACK_SIZE = sizeof(addr_t) * 2048 };
|
||||
}
|
||||
|
||||
|
||||
class Genode::Ipc_pager
|
||||
class Core::Ipc_pager
|
||||
{
|
||||
protected:
|
||||
|
||||
@ -91,8 +93,8 @@ class Genode::Ipc_pager
|
||||
};
|
||||
|
||||
|
||||
class Genode::Pager_object : private Object_pool<Pager_object>::Entry,
|
||||
private Genode::Kernel_object<Kernel::Signal_context>
|
||||
class Core::Pager_object : private Object_pool<Pager_object>::Entry,
|
||||
private Kernel_object<Kernel::Signal_context>
|
||||
{
|
||||
friend class Pager_entrypoint;
|
||||
friend class Object_pool<Pager_object>;
|
||||
@ -171,9 +173,9 @@ class Genode::Pager_object : private Object_pool<Pager_object>::Entry,
|
||||
};
|
||||
|
||||
|
||||
class Genode::Pager_entrypoint : public Object_pool<Pager_object>,
|
||||
public Thread,
|
||||
private Ipc_pager
|
||||
class Core::Pager_entrypoint : public Object_pool<Pager_object>,
|
||||
public Thread,
|
||||
private Ipc_pager
|
||||
{
|
||||
private:
|
||||
|
||||
|
@ -13,11 +13,11 @@
|
||||
*/
|
||||
|
||||
|
||||
/* base Core includes */
|
||||
/* core includes */
|
||||
#include <boot_modules.h>
|
||||
#include <core_log.h>
|
||||
|
||||
/* base-hw Core includes */
|
||||
/* base-hw core includes */
|
||||
#include <map_local.h>
|
||||
#include <platform.h>
|
||||
#include <platform_pd.h>
|
||||
@ -34,10 +34,9 @@
|
||||
#include <base/internal/unmanaged_singleton.h>
|
||||
|
||||
/* base includes */
|
||||
#include <base/log.h>
|
||||
#include <trace/source_registry.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
/**************
|
||||
@ -155,8 +154,7 @@ void Platform::_init_platform_info()
|
||||
return;
|
||||
}
|
||||
|
||||
Genode::Xml_generator xml(reinterpret_cast<char *>(virt_addr),
|
||||
rom_size, rom_name, [&] ()
|
||||
Xml_generator xml(reinterpret_cast<char *>(virt_addr), rom_size, rom_name, [&] ()
|
||||
{
|
||||
xml.node("kernel", [&] () {
|
||||
xml.attribute("name", "hw");
|
||||
|
@ -30,20 +30,20 @@
|
||||
#include <kernel/core_interface.h>
|
||||
#include <kernel/pd.h>
|
||||
|
||||
/* base-hw Core includes */
|
||||
/* base-hw core includes */
|
||||
#include <platform_generic.h>
|
||||
#include <core_region_map.h>
|
||||
#include <core_mem_alloc.h>
|
||||
#include <assertion.h>
|
||||
#include <board.h>
|
||||
|
||||
namespace Genode {
|
||||
namespace Core {
|
||||
class Address_space;
|
||||
class Platform;
|
||||
};
|
||||
|
||||
|
||||
class Genode::Platform : public Genode::Platform_generic
|
||||
class Core::Platform : public Platform_generic
|
||||
{
|
||||
private:
|
||||
|
||||
@ -79,7 +79,7 @@ class Genode::Platform : public Genode::Platform_generic
|
||||
/**
|
||||
* Add additional platform-specific information.
|
||||
*/
|
||||
void _init_additional_platform_info(Genode::Xml_generator &);
|
||||
void _init_additional_platform_info(Xml_generator &);
|
||||
|
||||
void _init_rom_modules();
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include <platform_pd.h>
|
||||
#include <platform_thread.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
using Hw::Page_table;
|
||||
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
#ifndef _CORE__PLATFORM_PD_H_
|
||||
#define _CORE__PLATFORM_PD_H_
|
||||
|
||||
/* base-hw Core includes */
|
||||
/* core includes */
|
||||
#include <platform.h>
|
||||
#include <address_space.h>
|
||||
#include <object.h>
|
||||
@ -29,7 +29,7 @@
|
||||
namespace Hw {
|
||||
|
||||
using namespace Kernel;
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
/**
|
||||
* Memory virtualization interface of a protection domain
|
||||
@ -38,19 +38,19 @@ namespace Hw {
|
||||
}
|
||||
|
||||
|
||||
namespace Genode {
|
||||
namespace Core {
|
||||
|
||||
class Platform_thread; /* forward declaration */
|
||||
|
||||
class Cap_space;
|
||||
|
||||
/**
|
||||
* Platform specific part of a Genode protection domain
|
||||
* Platform specific part of a protection domain
|
||||
*/
|
||||
class Platform_pd;
|
||||
|
||||
/**
|
||||
* Platform specific part of Core's protection domain
|
||||
* Platform specific part of core's protection domain
|
||||
*/
|
||||
class Core_platform_pd;
|
||||
|
||||
@ -58,7 +58,7 @@ namespace Genode {
|
||||
}
|
||||
|
||||
|
||||
class Hw::Address_space : public Genode::Address_space
|
||||
class Hw::Address_space : public Core::Address_space
|
||||
{
|
||||
private:
|
||||
|
||||
@ -68,19 +68,19 @@ class Hw::Address_space : public Genode::Address_space
|
||||
Address_space(Address_space const &);
|
||||
Address_space &operator = (Address_space const &);
|
||||
|
||||
friend class Genode::Platform;
|
||||
friend class Genode::Mapped_mem_allocator;
|
||||
friend class Core::Platform;
|
||||
friend class Core::Mapped_mem_allocator;
|
||||
|
||||
using Table = Hw::Page_table;
|
||||
using Array = Table::Allocator::Array<DEFAULT_TRANSLATION_TABLE_MAX>;
|
||||
|
||||
Genode::Mutex _mutex { }; /* table lock */
|
||||
Mutex _mutex { }; /* table lock */
|
||||
Table &_tt; /* table virt addr */
|
||||
Genode::addr_t _tt_phys; /* table phys addr */
|
||||
addr_t _tt_phys; /* table phys addr */
|
||||
Array *_tt_array = nullptr;
|
||||
Table::Allocator &_tt_alloc; /* table allocator */
|
||||
|
||||
static inline Genode::Core_mem_allocator &_cma();
|
||||
static inline Core_mem_allocator &_cma();
|
||||
|
||||
static inline void *_table_alloc();
|
||||
|
||||
@ -119,11 +119,11 @@ class Hw::Address_space : public Genode::Address_space
|
||||
* \param size size of memory region
|
||||
* \param flags translation table flags (e.g. caching attributes)
|
||||
*/
|
||||
bool insert_translation(Genode::addr_t virt, Genode::addr_t phys,
|
||||
Genode::size_t size, Genode::Page_flags flags);
|
||||
bool insert_translation(addr_t virt, addr_t phys,
|
||||
size_t size, Page_flags flags);
|
||||
|
||||
bool lookup_rw_translation(addr_t const virt, addr_t & phys);
|
||||
|
||||
bool lookup_rw_translation(Genode::addr_t const virt,
|
||||
Genode::addr_t & phys);
|
||||
|
||||
/*****************************
|
||||
** Address-space interface **
|
||||
@ -138,13 +138,13 @@ class Hw::Address_space : public Genode::Address_space
|
||||
** Accessors **
|
||||
***************/
|
||||
|
||||
Kernel::Pd & kernel_pd() { return *_kobj; }
|
||||
Hw::Page_table & translation_table() { return _tt; }
|
||||
Genode::addr_t translation_table_phys() { return _tt_phys; }
|
||||
Kernel::Pd &kernel_pd() { return *_kobj; }
|
||||
Hw::Page_table &translation_table() { return _tt; }
|
||||
addr_t translation_table_phys() { return _tt_phys; }
|
||||
};
|
||||
|
||||
|
||||
class Genode::Cap_space
|
||||
class Core::Cap_space
|
||||
{
|
||||
private:
|
||||
|
||||
@ -166,8 +166,7 @@ class Genode::Cap_space
|
||||
};
|
||||
|
||||
|
||||
class Genode::Platform_pd : public Hw::Address_space,
|
||||
private Cap_space
|
||||
class Core::Platform_pd : public Hw::Address_space, private Cap_space
|
||||
{
|
||||
private:
|
||||
|
||||
@ -230,7 +229,7 @@ class Genode::Platform_pd : public Hw::Address_space,
|
||||
};
|
||||
|
||||
|
||||
struct Genode::Core_platform_pd : Genode::Platform_pd
|
||||
struct Core::Core_platform_pd : Platform_pd
|
||||
{
|
||||
Core_platform_pd(Board::Address_space_id_allocator &addr_space_id_alloc);
|
||||
};
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include <kernel/pd.h>
|
||||
#include <kernel/main.h>
|
||||
|
||||
using namespace Genode;
|
||||
using namespace Core;
|
||||
|
||||
|
||||
void Platform_thread::_init() { }
|
||||
@ -199,7 +199,7 @@ void Platform_thread::pager(Pager_object &pager)
|
||||
}
|
||||
|
||||
|
||||
Genode::Pager_object &Platform_thread::pager()
|
||||
Core::Pager_object &Platform_thread::pager()
|
||||
{
|
||||
if (_pager)
|
||||
return *_pager;
|
||||
|
@ -31,17 +31,19 @@
|
||||
#include <kernel/core_interface.h>
|
||||
#include <kernel/thread.h>
|
||||
|
||||
namespace Genode {
|
||||
namespace Core {
|
||||
|
||||
class Pager_object;
|
||||
class Thread_state;
|
||||
class Rm_client;
|
||||
class Platform_thread;
|
||||
class Platform_pd;
|
||||
}
|
||||
|
||||
|
||||
class Genode::Platform_thread : Noncopyable
|
||||
namespace Genode { class Thread_state; }
|
||||
|
||||
|
||||
class Core::Platform_thread : Noncopyable
|
||||
{
|
||||
private:
|
||||
|
||||
@ -130,9 +132,7 @@ class Genode::Platform_thread : Noncopyable
|
||||
/**
|
||||
* Join a protection domain
|
||||
*
|
||||
* \param pd platform pd object pointer
|
||||
* \param main_thread wether thread is the first in protection domain
|
||||
* \param address_space corresponding Genode address space
|
||||
* \param main_thread whether thread is the first in protection domain
|
||||
*
|
||||
* This function has no effect when called more twice for a
|
||||
* given thread.
|
||||
@ -207,7 +207,7 @@ class Genode::Platform_thread : Noncopyable
|
||||
*/
|
||||
Trace::Execution_time execution_time() const
|
||||
{
|
||||
Genode::uint64_t execution_time =
|
||||
uint64_t execution_time =
|
||||
const_cast<Platform_thread *>(this)->_kobj->execution_time();
|
||||
return { execution_time, 0, _quota, _priority }; }
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user