From c1f4dad811717ef4a7ebbf370ee75f1886d5ae0a Mon Sep 17 00:00:00 2001 From: Sebastian Sumpf Date: Wed, 8 Mar 2017 16:51:00 +0100 Subject: [PATCH] base-pistachio: use PIT in Genode timer on x86_32 issue #2308 --- .../os/src/drivers/timer/pistachio/target.mk | 8 --- .../drivers/timer/pistachio/time_source.cc | 57 ------------------- tool/run/boot_dir/pistachio | 11 +--- 3 files changed, 1 insertion(+), 75 deletions(-) delete mode 100644 repos/os/src/drivers/timer/pistachio/target.mk delete mode 100644 repos/os/src/drivers/timer/pistachio/time_source.cc diff --git a/repos/os/src/drivers/timer/pistachio/target.mk b/repos/os/src/drivers/timer/pistachio/target.mk deleted file mode 100644 index 74f58aec2e..0000000000 --- a/repos/os/src/drivers/timer/pistachio/target.mk +++ /dev/null @@ -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 diff --git a/repos/os/src/drivers/timer/pistachio/time_source.cc b/repos/os/src/drivers/timer/pistachio/time_source.cc deleted file mode 100644 index e707e15c0a..0000000000 --- a/repos/os/src/drivers/timer/pistachio/time_source.cc +++ /dev/null @@ -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 - -/* Pistachio includes */ -namespace Pistachio { -#include -} - -/* local includes */ -#include - -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(); -} diff --git a/tool/run/boot_dir/pistachio b/tool/run/boot_dir/pistachio index 0e396e20f3..0db71c6958 100644 --- a/tool/run/boot_dir/pistachio +++ b/tool/run/boot_dir/pistachio @@ -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 #