4d3d4ecca0
With this, we get rid of platform specific timer interfaces. The new Timer class does the same as the old Clock class and has a generic interface. The old Timer class was merely used by the old Clock class. Also, we get rid of having only one timer instance which we tell with each method call for which CPU it shall be done. Instead now each Cpu object has its own Timer member that knows the CPU it works for. Also, rename all "tics" to "ticks". Fixes #2347
48 lines
1.3 KiB
C++
48 lines
1.3 KiB
C++
/*
|
|
* \brief Platform specific services for Arndale
|
|
* \author Stefan Kalkowski
|
|
* \date 2014-07-08
|
|
*/
|
|
|
|
/*
|
|
* Copyright (C) 2014-2017 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.
|
|
*/
|
|
|
|
/* Genode includes */
|
|
#include <base/service.h>
|
|
#include <base/heap.h>
|
|
|
|
/* core includes */
|
|
#include <platform.h>
|
|
#include <platform_services.h>
|
|
#include <core_parent.h> /* for 'Core_service' type */
|
|
#include <map_local.h>
|
|
#include <vm_root.h>
|
|
#include <platform.h>
|
|
|
|
extern Genode::addr_t _vt_host_context_ptr;
|
|
extern Genode::addr_t _vt_host_entry;
|
|
extern Genode::addr_t _mt_master_context_begin;
|
|
|
|
/*
|
|
* Add ARM virtualization specific vm service
|
|
*/
|
|
void Genode::platform_add_local_services(Rpc_entrypoint *ep,
|
|
Sliced_heap *sh,
|
|
Registry<Service> *services)
|
|
{
|
|
using namespace Genode;
|
|
|
|
/* initialize host context used in virtualization world switch */
|
|
*((void**)&_vt_host_context_ptr) = &_mt_master_context_begin;
|
|
|
|
map_local(Platform::core_phys_addr((addr_t)&_vt_host_entry),
|
|
0xfff00000, 1, Hw::PAGE_FLAGS_KERN_TEXT);
|
|
|
|
static Vm_root vm_root(ep, sh);
|
|
static Core_service<Vm_session_component> vm_service(*services, vm_root);
|
|
}
|