diff --git a/base-pistachio/include/base/clock.h b/base-pistachio/include/base/clock.h deleted file mode 100644 index 594e73232..000000000 --- a/base-pistachio/include/base/clock.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * \brief Timer interface - * \author Julian Stecklina - * \date 2007-12-30 - */ - -/* - * Copyright (C) 2007-2013 Genode Labs GmbH - * - * This file is part of the Genode OS framework, which is distributed - * under the terms of the GNU General Public License version 2. - */ - -#ifndef _INCLUDE__BASE__CLOCK_H_ -#define _INCLUDE__BASE__CLOCK_H_ - -#include - -namespace Genode { - - typedef uint64_t cycles_t; - - /** - * Returns the clock resolution in nanoseconds - */ - uint64_t clock_resolution(); - - /** - * Return the current time as nanoseconds - * - * The base of this value is unspecified, but the value should not - * wrap in at least several years. - */ - uint64_t get_time(); -} - -#endif /* _INCLUDE__BASE__CLOCK_H_ */ diff --git a/base-pistachio/include/util/hexdump.h b/base-pistachio/include/util/hexdump.h deleted file mode 100644 index 53dd9f56e..000000000 --- a/base-pistachio/include/util/hexdump.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * \brief Hexdump utility - * \author Julian Stecklina - * \date 2008-02-20 - */ - -/* - * Copyright (C) 2008-2013 Genode Labs GmbH - * - * This file is part of the Genode OS framework, which is distributed - * under the terms of the GNU General Public License version 2. - */ - -#ifndef _INCLUDE__UTIL__HEXDUMP_H_ -#define _INCLUDE__UTIL__HEXDUMP_H_ - -namespace Util { - - /** - * Dump a block of memory in a nice way to the terminal. - * - * \param addr the memory address to start dump - * \param length the amount of bytes to be dumped - */ - void hexdump(const unsigned char *addr, - unsigned long length); - - /** - * Exactly like hexdump, but prints real_addr instead of addr as address - * - * \param addr the memory address to start dump - * \param length the amount of bytes to be dumped - */ - void hexdump(const unsigned char *addr, - unsigned long length, - unsigned long real_addr); -} - -#endif /* _INCLUDE__UTIL__HEXDUMP_H_ */ diff --git a/base-pistachio/include/x86/cpu/rdtsc.h b/base-pistachio/include/x86/cpu/rdtsc.h deleted file mode 100644 index 67125bb38..000000000 --- a/base-pistachio/include/x86/cpu/rdtsc.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * \brief Read time-stamp counter - * \author Norman Feske - * \date 2008-11-29 - */ - -/* - * Copyright (C) 2008-2013 Genode Labs GmbH - * - * This file is part of the Genode OS framework, which is distributed - * under the terms of the GNU General Public License version 2. - */ - -#ifndef _INCLUDE__X86__CPU__RDTSC_H_ -#define _INCLUDE__X86__CPU__RDTSC_H_ - -#include - -namespace Genode { - - static inline cycles_t rdtsc() - { - uint32_t lo, hi; - /* We cannot use "=A", since this would use %rax on x86_64 */ - __asm__ __volatile__ ("rdtsc" : "=a" (lo), "=d" (hi)); - return (uint64_t)hi << 32 | lo; - } -} - -#endif /* _INCLUDE__X86__CPU__RDTSC_H_ */ diff --git a/base-pistachio/include/x86/util/smath.h b/base-pistachio/include/x86/util/smath.h deleted file mode 100644 index 57b87e06c..000000000 --- a/base-pistachio/include/x86/util/smath.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * \brief Simple math calls - * \author Julian Stecklina - * \date 2008-02-20 - */ - -/* - * Copyright (C) 2008-2013 Genode Labs GmbH - * - * This file is part of the Genode OS framework, which is distributed - * under the terms of the GNU General Public License version 2. - */ - -namespace SMath { - - static inline float sinf(float x) - { - float res; - - asm ("fsin" - : "=t" (res) /* output */ - : "0" (x) /* input */ - : /* clobbers */ - ); - - return res; - } - - static inline float cosf(float x) - { - float res; - - asm ("fcos" - : "=t" (res) /* output */ - : "0" (x) /* input */ - : /* clobbers */ - ); - - return res; - } - - static inline float sqrtf(float x) - { - float res; - - asm ("fsqrt" - : "=t" (res) /* output */ - : "0" (x) /* input */ - : /* clobbers */ - ); - - return res; - } -} diff --git a/base-pistachio/lib/mk/hexdump.mk b/base-pistachio/lib/mk/hexdump.mk deleted file mode 100644 index c1725471e..000000000 --- a/base-pistachio/lib/mk/hexdump.mk +++ /dev/null @@ -1,3 +0,0 @@ -SRC_CC = hexdump.cc - -vpath hexdump.cc $(REP_DIR)/src/util/hexdump diff --git a/base-pistachio/src/core/target.inc b/base-pistachio/src/core/target.inc index 43518d17b..7cf706353 100644 --- a/base-pistachio/src/core/target.inc +++ b/base-pistachio/src/core/target.inc @@ -1,7 +1,7 @@ TARGET = core REQUIRES = pistachio LIBS = cxx ipc heap core_printf child pager lock \ - raw_signal raw_server kip hexdump + raw_signal raw_server kip GEN_CORE_DIR = $(BASE_DIR)/src/core diff --git a/base-pistachio/src/util/hexdump/hexdump.cc b/base-pistachio/src/util/hexdump/hexdump.cc deleted file mode 100644 index f91d21ff0..000000000 --- a/base-pistachio/src/util/hexdump/hexdump.cc +++ /dev/null @@ -1,55 +0,0 @@ -#include -#include - -using Genode::printf; - -void -Util::hexdump(const unsigned char *addr, unsigned long length) -{ - hexdump(addr, length, (unsigned long)addr); -} - -void -Util::hexdump(const unsigned char *addr, unsigned long length, unsigned long real_addr) -{ - unsigned long addr_int = (unsigned int)addr; - const unsigned long step = 16; - - real_addr = real_addr&(~(step-1)); - - for (unsigned long pos = addr_int&(~(step-1)); pos < (addr_int + length); - pos += step, real_addr += step) { - - printf(" 0x%08lx:", real_addr); - for (unsigned int lpos = pos; lpos < (pos + step); lpos ++) { - - if ((lpos & 3) == 0) printf(" "); - - if ((lpos < addr_int) || (lpos > (addr_int + length))) - printf(" "); - else - printf(" %02x", addr[lpos - addr_int]); - } - - printf(" | "); - - for (unsigned int lpos = pos; lpos < (pos + step); lpos ++) { - - if ((lpos & 3) == 0) printf(" "); - - unsigned char ch; - - if ((lpos < addr_int) || (lpos > (addr_int + length))) - ch = ' '; - else - ch = addr[lpos - addr_int]; - - if ((ch < 32) || (ch >= 127)) - ch = '.'; - - printf("%c", ch); - } - - printf("\n"); - } -}