mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-29 15:44:02 +00:00
parent
261edf59a9
commit
c1f4dad811
@ -1,8 +0,0 @@
|
||||
TARGET = pistachio_timer_drv
|
||||
REQUIRES = pistachio
|
||||
INC_DIR += $(REP_DIR)/src/drivers/timer/include
|
||||
INC_DIR += $(REP_DIR)/src/drivers/timer/periodic
|
||||
SRC_CC += periodic/time_source.cc pistachio/time_source.cc main.cc
|
||||
LIBS += syscall-pistachio base-pistachio timeout
|
||||
|
||||
vpath %.cc $(REP_DIR)/src/drivers/timer
|
@ -1,57 +0,0 @@
|
||||
/*
|
||||
* \brief Time source that uses sleeping by the means of the kernel
|
||||
* \author Julian Stecklina
|
||||
* \author Martin Stein
|
||||
* \date 2008-03-19
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2008-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/blocking.h>
|
||||
|
||||
/* Pistachio includes */
|
||||
namespace Pistachio {
|
||||
#include <l4/ipc.h>
|
||||
}
|
||||
|
||||
/* local includes */
|
||||
#include <time_source.h>
|
||||
|
||||
using namespace Genode;
|
||||
using Microseconds = Genode::Time_source::Microseconds;
|
||||
|
||||
|
||||
Microseconds Timer::Time_source::max_timeout() const
|
||||
{
|
||||
Lock::Guard lock_guard(_lock);
|
||||
return Microseconds(1000 * 1000);
|
||||
}
|
||||
|
||||
|
||||
Microseconds Timer::Time_source::curr_time() const
|
||||
{
|
||||
Lock::Guard lock_guard(_lock);
|
||||
return Microseconds(_curr_time_us);
|
||||
}
|
||||
|
||||
|
||||
void Timer::Time_source::_usleep(unsigned long us)
|
||||
{
|
||||
using namespace Pistachio;
|
||||
|
||||
enum { MAGIC_USER_DEFINED_HANDLE = 13 };
|
||||
L4_Set_UserDefinedHandle(MAGIC_USER_DEFINED_HANDLE);
|
||||
|
||||
L4_Sleep(L4_TimePeriod(us));
|
||||
_curr_time_us += us;
|
||||
|
||||
/* check if sleep was canceled */
|
||||
if (L4_UserDefinedHandle() != MAGIC_USER_DEFINED_HANDLE)
|
||||
throw Blocking_canceled();
|
||||
}
|
@ -1,21 +1,12 @@
|
||||
proc binary_name_ld_lib_so { } { return "ld-pistachio.lib.so" }
|
||||
proc binary_name_core_o { } { return "pistachio/core.o" }
|
||||
proc binary_name_timer { } { return "pistachio_timer_drv" }
|
||||
proc binary_name_timer { } { return "pit_timer_drv" }
|
||||
|
||||
|
||||
proc run_boot_string { } { return "\n\r\033\\\[1m\033\\\[33mL4Ka::Pistachio -" }
|
||||
proc core_link_address { } { return "0x02000000" }
|
||||
|
||||
|
||||
##
|
||||
# Install files needed to boot via PXE
|
||||
#
|
||||
proc install_pxe_bootloader_to_run_dir { } {
|
||||
exec cp [genode_dir]/tool/boot/pulsar [run_dir]/boot/pulsar
|
||||
exec cp [genode_dir]/tool/boot/bender [run_dir]/boot/bender
|
||||
}
|
||||
|
||||
|
||||
##
|
||||
# Populdate boot directory with binaries on pistachio
|
||||
#
|
||||
|
Loading…
x
Reference in New Issue
Block a user