pistachio: Remove dead code
This commit is contained in:
parent
bcdc706f42
commit
a8202c98dc
|
@ -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 <stdint.h>
|
|
||||||
|
|
||||||
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_ */
|
|
|
@ -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_ */
|
|
|
@ -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 <base/clock.h>
|
|
||||||
|
|
||||||
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_ */
|
|
|
@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,3 +0,0 @@
|
||||||
SRC_CC = hexdump.cc
|
|
||||||
|
|
||||||
vpath hexdump.cc $(REP_DIR)/src/util/hexdump
|
|
|
@ -1,7 +1,7 @@
|
||||||
TARGET = core
|
TARGET = core
|
||||||
REQUIRES = pistachio
|
REQUIRES = pistachio
|
||||||
LIBS = cxx ipc heap core_printf child pager lock \
|
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
|
GEN_CORE_DIR = $(BASE_DIR)/src/core
|
||||||
|
|
||||||
|
|
|
@ -1,55 +0,0 @@
|
||||||
#include <base/printf.h>
|
|
||||||
#include <util/hexdump.h>
|
|
||||||
|
|
||||||
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");
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user