From 21fb356cd4646e788e19c9c8e81893529f125726 Mon Sep 17 00:00:00 2001 From: Adrian-Ken Rueegsegger Date: Thu, 20 Aug 2015 18:05:24 +0200 Subject: [PATCH] hw_x86_64_muen: Provide Muen-specific serial Subjects on Muen are not allowed to access the BIOS data area. Instead a serial console is emulated on the fixed I/O port 0x3f8. --- .../include/spec/{x86 => x86_64}/serial.h | 0 .../core/include/spec/x86_64_muen/serial.h | 40 +++++++++++++++++++ 2 files changed, 40 insertions(+) rename repos/base-hw/src/core/include/spec/{x86 => x86_64}/serial.h (100%) create mode 100644 repos/base-hw/src/core/include/spec/x86_64_muen/serial.h diff --git a/repos/base-hw/src/core/include/spec/x86/serial.h b/repos/base-hw/src/core/include/spec/x86_64/serial.h similarity index 100% rename from repos/base-hw/src/core/include/spec/x86/serial.h rename to repos/base-hw/src/core/include/spec/x86_64/serial.h diff --git a/repos/base-hw/src/core/include/spec/x86_64_muen/serial.h b/repos/base-hw/src/core/include/spec/x86_64_muen/serial.h new file mode 100644 index 000000000..bd1406f23 --- /dev/null +++ b/repos/base-hw/src/core/include/spec/x86_64_muen/serial.h @@ -0,0 +1,40 @@ +/* + * \brief Serial output driver for core + * \author Stefan Kalkowski + * \author Adrian-Ken Rueegsegger + * \date 2015-08-20 + */ + +/* + * Copyright (C) 2012-2015 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. + */ + +#pragma once + +/* Genode includes */ +#include + +namespace Genode { class Serial; } + +/** + * Serial output driver for core + */ +class Genode::Serial : public X86_uart_base +{ + private: + + enum { + CLOCK_UNUSED = 0, + COM1_PORT = 0x3f8 + }; + + public: + + Serial(unsigned baud_rate) + : + X86_uart_base(COM1_PORT, CLOCK_UNUSED, baud_rate) + { } +};