Remove long unused kdb_uart_drv for fiasco and foc

Removed in the context of issue #4860.
This commit is contained in:
Norman Feske 2023-05-04 17:19:51 +02:00 committed by Christian Helmuth
parent dab7c64762
commit a2832995d0
4 changed files with 0 additions and 228 deletions

View File

@ -1,85 +0,0 @@
#
# \brief Test for the KDB UART driver
# \author Christian Prochaska
# \date 2013-01-21
#
if {![have_spec fiasco]} {
puts "Run script only supports Fiasco."; exit 0 }
#
# Build
#
build {
core init timer
drivers/uart
test/terminal_echo
}
create_boot_directory
#
# Generate config
#
set config {
<config verbose="yes">
<parent-provides>
<service name="ROM"/>
<service name="IRQ"/>
<service name="IO_MEM"/>
<service name="IO_PORT"/>
<service name="PD"/>
<service name="RM"/>
<service name="CPU"/>
<service name="LOG"/>
</parent-provides>
<default-route>
<any-service> <parent/> <any-child/> </any-service>
</default-route>
<start name="timer">
<resource name="RAM" quantum="1M"/>
<provides> <service name="Timer"/> </provides>
</start>
<start name="kdb_uart_drv">
<resource name="RAM" quantum="2M"/>
<provides>
<service name="Terminal"/>
<service name="Uart"/>
</provides>
<config>
<policy label_prefix="test-terminal_echo" uart="0" detect_size="yes"/>
</config>
</start>
<start name="test-terminal_echo">
<resource name="RAM" quantum="1M"/>
</start>
</config>
}
install_config $config
#
# Boot modules
#
# generic modules
set boot_modules {
core ld.lib.so init timer
kdb_uart_drv
test-terminal_echo
}
set fiasco_serial_esc_arg ""
build_boot_image $boot_modules
#
# Execute test
#
# qemu config
append qemu_args " -nographic "
run_genode_until forever

View File

@ -1,5 +0,0 @@
REQUIRES = fiasco
LIBS += syscall-fiasco
include $(REP_DIR)/src/drivers/uart/kdb/target.inc

View File

@ -1,8 +0,0 @@
TARGET = kdb_uart_drv
SRC_CC = main.cc
LIBS += base
INC_DIR += $(REP_DIR)/src/drivers/uart $(REP_DIR)/src/drivers/uart/kdb
vpath main.cc $(REP_DIR)/src/drivers/uart
CC_CXX_WARN_STRICT_CONVERSION =

View File

@ -1,130 +0,0 @@
/*
* \brief Fiasco(.OC) KDB UART driver
* \author Christian Prochaska
* \date 2013-03-07
*/
/*
* Copyright (C) 2013-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.
*/
#ifndef _KDB_UART_H_
#define _KDB_UART_H_
/* Fiasco.OC includes */
namespace Fiasco {
#include <l4/sys/kdebug.h>
}
/* Genode includes */
#include <base/signal.h>
#include <timer_session/connection.h>
using namespace Genode;
namespace Uart {
class Driver;
struct Driver_factory;
struct Char_avail_functor;
};
/**
* Functor, called by 'Driver' when data is ready for reading
*/
struct Uart::Char_avail_functor
{
Genode::Signal_context_capability sigh;
void operator ()() {
if (sigh.valid()) Genode::Signal_transmitter(sigh).submit();
else Genode::error("no sigh"); }
};
class Uart::Driver
{
private:
signed char _buffered_char;
Char_avail_functor &_char_avail;
Timer::Connection _timer;
Signal_handler<Driver> _timer_handler;
void _timeout() { if (char_avail()) _char_avail(); }
public:
Driver(Genode::Env &env, unsigned, unsigned,
Uart::Char_avail_functor &func)
: _buffered_char(-1),
_char_avail(func),
_timer(env),
_timer_handler(env.ep(), *this, &Driver::_timeout)
{
_timer.sigh(_timer_handler);
_timer.trigger_periodic(20*1000);
}
/***************************
** UART driver interface **
***************************/
void put_char(char c) { Fiasco::outchar(c); }
bool char_avail()
{
if (_buffered_char == -1)
_buffered_char = Fiasco::l4kd_inchar();
return (_buffered_char != -1);
}
char get_char()
{
char result;
if (_buffered_char != -1) {
result = _buffered_char;
_buffered_char = -1;
} else
result = 0;
return result;
}
void baud_rate(int) { }
};
/**
* Factory used by 'Uart::Root' at session creation/destruction time
*/
struct Uart::Driver_factory
{
struct Not_available {};
enum { UARTS_NUM = 1 };
Genode::Env &env;
Genode::Heap &heap;
Driver *drivers[UARTS_NUM] { nullptr };
Driver_factory(Genode::Env &env, Genode::Heap &heap)
: env(env), heap(heap) {}
Uart::Driver &create(unsigned index, unsigned baudrate,
Uart::Char_avail_functor &callback);
void destroy(Uart::Driver *) { /* TODO */ }
};
#endif /* _KDB_UART_H_ */