From 7841058320be01eeee080643fe0c2777a627ef9b Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Thu, 22 Sep 2016 11:53:09 +0200 Subject: [PATCH] hw: only use x86_64 specifier instead of x86 Fix #2109 --- repos/base-hw/lib/mk/spec/x86/core.inc | 24 ---------------- .../lib/mk/spec/x86_64/core-muen_off.mk | 6 ++-- repos/base-hw/lib/mk/spec/x86_64/core.inc | 16 +++++++++-- .../core/include/spec/{x86 => x86_64}/board.h | 8 +++--- .../src/core/include/spec/x86_64/cpu.h | 2 +- .../spec/{x86 => x86_64}/cpu_support.h | 8 +++--- .../core/include/spec/{x86 => x86_64}/fpu.h | 8 +++--- .../include/spec/{x86 => x86_64}/macros.s | 0 .../core/include/spec/{x86 => x86_64}/pic.h | 6 ++-- .../include/spec/{x86 => x86_64}/port_io.h | 6 ++-- .../core/include/spec/{x86 => x86_64}/timer.h | 6 ++-- .../src/core/spec/x86/kernel/thread.cc | 28 ------------------- .../spec/{x86 => x86_64}/bios_data_area.cc | 0 .../src/core/spec/{x86 => x86_64}/cpu.cc | 0 .../src/core/spec/{x86 => x86_64}/fpu.cc | 2 +- .../core/spec/{x86 => x86_64}/kernel/cpu.cc | 0 .../{x86 => x86_64}/kernel/cpu_exception.cc | 0 .../core/spec/{x86 => x86_64}/kernel/pd.cc | 0 .../src/core/spec/x86_64/kernel/thread.cc | 10 +++++++ .../kernel/thread_exception.cc | 0 .../src/core/spec/{x86 => x86_64}/pic.cc | 0 .../platform_support_common.cc} | 0 22 files changed, 49 insertions(+), 81 deletions(-) delete mode 100644 repos/base-hw/lib/mk/spec/x86/core.inc rename repos/base-hw/src/core/include/spec/{x86 => x86_64}/board.h (76%) rename repos/base-hw/src/core/include/spec/{x86 => x86_64}/cpu_support.h (97%) rename repos/base-hw/src/core/include/spec/{x86 => x86_64}/fpu.h (95%) rename repos/base-hw/src/core/include/spec/{x86 => x86_64}/macros.s (100%) rename repos/base-hw/src/core/include/spec/{x86 => x86_64}/pic.h (97%) rename repos/base-hw/src/core/include/spec/{x86 => x86_64}/port_io.h (80%) rename repos/base-hw/src/core/include/spec/{x86 => x86_64}/timer.h (95%) delete mode 100644 repos/base-hw/src/core/spec/x86/kernel/thread.cc rename repos/base-hw/src/core/spec/{x86 => x86_64}/bios_data_area.cc (100%) rename repos/base-hw/src/core/spec/{x86 => x86_64}/cpu.cc (100%) rename repos/base-hw/src/core/spec/{x86 => x86_64}/fpu.cc (95%) rename repos/base-hw/src/core/spec/{x86 => x86_64}/kernel/cpu.cc (100%) rename repos/base-hw/src/core/spec/{x86 => x86_64}/kernel/cpu_exception.cc (100%) rename repos/base-hw/src/core/spec/{x86 => x86_64}/kernel/pd.cc (100%) rename repos/base-hw/src/core/spec/{x86 => x86_64}/kernel/thread_exception.cc (100%) rename repos/base-hw/src/core/spec/{x86 => x86_64}/pic.cc (100%) rename repos/base-hw/src/core/spec/{x86/platform_support.cc => x86_64/platform_support_common.cc} (100%) diff --git a/repos/base-hw/lib/mk/spec/x86/core.inc b/repos/base-hw/lib/mk/spec/x86/core.inc deleted file mode 100644 index cfe4d5b21..000000000 --- a/repos/base-hw/lib/mk/spec/x86/core.inc +++ /dev/null @@ -1,24 +0,0 @@ -# -# \brief Build config for Genodes core process -# \author Stefan Kalkowski -# \author Martin Stein -# \date 2012-10-04 -# - -# add include paths -INC_DIR += $(BASE_DIR)/../base-hw/src/core/include/spec/x86 - -# add C++ sources -SRC_CC += kernel/kernel.cc -SRC_CC += spec/x86/kernel/pd.cc -SRC_CC += spec/x86/kernel/cpu.cc -SRC_CC += spec/x86/kernel/thread.cc -SRC_CC += spec/x86/platform_support.cc -SRC_CC += spec/x86/cpu.cc -SRC_CC += spec/x86/fpu.cc -SRC_CC += spec/x86/bios_data_area.cc -SRC_CC += spec/x86/io_port_session_component.cc -SRC_CC += spec/x86/io_port_session_support.cc - -# include less specific configuration -include $(BASE_DIR)/../base-hw/lib/mk/core.inc diff --git a/repos/base-hw/lib/mk/spec/x86_64/core-muen_off.mk b/repos/base-hw/lib/mk/spec/x86_64/core-muen_off.mk index 1de590b16..0ca30a7c6 100644 --- a/repos/base-hw/lib/mk/spec/x86_64/core-muen_off.mk +++ b/repos/base-hw/lib/mk/spec/x86_64/core-muen_off.mk @@ -9,9 +9,9 @@ SRC_S += spec/x86_64/kernel/crt0_translation_table.s # add C++ sources SRC_CC += kernel/vm_thread_off.cc -SRC_CC += spec/x86/pic.cc -SRC_CC += spec/x86/kernel/cpu_exception.cc -SRC_CC += spec/x86/kernel/thread_exception.cc +SRC_CC += spec/x86_64/pic.cc +SRC_CC += spec/x86_64/kernel/cpu_exception.cc +SRC_CC += spec/x86_64/kernel/thread_exception.cc SRC_CC += spec/x86_64/platform_support.cc SRC_CC += spec/x86/platform_services.cc diff --git a/repos/base-hw/lib/mk/spec/x86_64/core.inc b/repos/base-hw/lib/mk/spec/x86_64/core.inc index 35573b5ad..b8dd78cac 100644 --- a/repos/base-hw/lib/mk/spec/x86_64/core.inc +++ b/repos/base-hw/lib/mk/spec/x86_64/core.inc @@ -14,10 +14,20 @@ SRC_S += spec/x86_64/kernel/crt0.s SRC_S += spec/x86_64/crt0.s # add C++ sources -SRC_CC += spec/x86_64/kernel/thread.cc +SRC_CC += kernel/kernel.cc +SRC_CC += spec/x86/io_port_session_component.cc +SRC_CC += spec/x86/io_port_session_support.cc +SRC_CC += spec/x86_64/bios_data_area.cc +SRC_CC += spec/x86_64/cpu.cc +SRC_CC += spec/x86_64/fpu.cc SRC_CC += spec/x86_64/idt.cc -SRC_CC += spec/x86_64/tss.cc +SRC_CC += spec/x86_64/kernel/cpu.cc SRC_CC += spec/x86_64/kernel/cpu_context.cc +SRC_CC += spec/x86_64/kernel/pd.cc +SRC_CC += spec/x86_64/kernel/thread.cc +SRC_CC += spec/x86_64/kernel/thread.cc +SRC_CC += spec/x86_64/platform_support_common.cc +SRC_CC += spec/x86_64/tss.cc # include less specific configuration -include $(BASE_DIR)/../base-hw/lib/mk/spec/x86/core.inc +include $(BASE_DIR)/../base-hw/lib/mk/core.inc diff --git a/repos/base-hw/src/core/include/spec/x86/board.h b/repos/base-hw/src/core/include/spec/x86_64/board.h similarity index 76% rename from repos/base-hw/src/core/include/spec/x86/board.h rename to repos/base-hw/src/core/include/spec/x86_64/board.h index 579090c59..956bff0d2 100644 --- a/repos/base-hw/src/core/include/spec/x86/board.h +++ b/repos/base-hw/src/core/include/spec/x86_64/board.h @@ -1,5 +1,5 @@ /* - * \brief x86 constants + * \brief x86_64 constants * \author Reto Buerki * \date 2015-03-18 */ @@ -11,8 +11,8 @@ * under the terms of the GNU General Public License version 2. */ -#ifndef _CORE__INCLUDE__SPEC__X86__BOARD_H_ -#define _CORE__INCLUDE__SPEC__X86__BOARD_H_ +#ifndef _CORE__INCLUDE__SPEC__X86_64__BOARD_H_ +#define _CORE__INCLUDE__SPEC__X86_64__BOARD_H_ namespace Genode { @@ -34,4 +34,4 @@ namespace Genode }; } -#endif /* _CORE__INCLUDE__SPEC__X86__BOARD_H_ */ +#endif /* _CORE__INCLUDE__SPEC__X86_64__BOARD_H_ */ diff --git a/repos/base-hw/src/core/include/spec/x86_64/cpu.h b/repos/base-hw/src/core/include/spec/x86_64/cpu.h index ed4328e1a..711753fc7 100644 --- a/repos/base-hw/src/core/include/spec/x86_64/cpu.h +++ b/repos/base-hw/src/core/include/spec/x86_64/cpu.h @@ -15,7 +15,7 @@ #define _CORE__INCLUDE__SPEC__X86_64__CPU_H_ /* core includes */ -#include +#include namespace Genode { typedef __uint128_t sizet_arithm_t; } diff --git a/repos/base-hw/src/core/include/spec/x86/cpu_support.h b/repos/base-hw/src/core/include/spec/x86_64/cpu_support.h similarity index 97% rename from repos/base-hw/src/core/include/spec/x86/cpu_support.h rename to repos/base-hw/src/core/include/spec/x86_64/cpu_support.h index f42086795..0ed55a81a 100644 --- a/repos/base-hw/src/core/include/spec/x86/cpu_support.h +++ b/repos/base-hw/src/core/include/spec/x86_64/cpu_support.h @@ -1,5 +1,5 @@ /* - * \brief x86 CPU driver for core + * \brief x86_64 CPU driver for core * \author Adrian-Ken Rueegsegger * \author Martin stein * \author Reto Buerki @@ -13,8 +13,8 @@ * under the terms of the GNU General Public License version 2. */ -#ifndef _CORE__INCLUDE__SPEC__X86__CPU_SUPPORT_H_ -#define _CORE__INCLUDE__SPEC__X86__CPU_SUPPORT_H_ +#ifndef _CORE__INCLUDE__SPEC__X86_64__CPU_SUPPORT_H_ +#define _CORE__INCLUDE__SPEC__X86_64__CPU_SUPPORT_H_ /* Genode includes */ #include @@ -255,4 +255,4 @@ struct Genode::Cpu::Cr4 : Register<64> } }; -#endif /* _CORE__INCLUDE__SPEC__X86__CPU_SUPPORT_H_ */ +#endif /* _CORE__INCLUDE__SPEC__X86_64__CPU_SUPPORT_H_ */ diff --git a/repos/base-hw/src/core/include/spec/x86/fpu.h b/repos/base-hw/src/core/include/spec/x86_64/fpu.h similarity index 95% rename from repos/base-hw/src/core/include/spec/x86/fpu.h rename to repos/base-hw/src/core/include/spec/x86_64/fpu.h index 72e9fe784..535b8f416 100644 --- a/repos/base-hw/src/core/include/spec/x86/fpu.h +++ b/repos/base-hw/src/core/include/spec/x86_64/fpu.h @@ -1,5 +1,5 @@ /* - * \brief x86 FPU driver for core + * \brief x86_64 FPU driver for core * \author Adrian-Ken Rueegsegger * \author Martin stein * \author Reto Buerki @@ -14,8 +14,8 @@ * under the terms of the GNU General Public License version 2. */ -#ifndef _SPEC__X86__FPU_H_ -#define _SPEC__X86__FPU_H_ +#ifndef _SPEC__X86_64__FPU_H_ +#define _SPEC__X86_64__FPU_H_ /* Genode includes */ #include @@ -142,4 +142,4 @@ class Genode::Fpu if (_context == &context) _context = nullptr; } }; -#endif /* _SPEC__X86__FPU_H_ */ +#endif /* _SPEC__X86_64__FPU_H_ */ diff --git a/repos/base-hw/src/core/include/spec/x86/macros.s b/repos/base-hw/src/core/include/spec/x86_64/macros.s similarity index 100% rename from repos/base-hw/src/core/include/spec/x86/macros.s rename to repos/base-hw/src/core/include/spec/x86_64/macros.s diff --git a/repos/base-hw/src/core/include/spec/x86/pic.h b/repos/base-hw/src/core/include/spec/x86_64/pic.h similarity index 97% rename from repos/base-hw/src/core/include/spec/x86/pic.h rename to repos/base-hw/src/core/include/spec/x86_64/pic.h index 13b7141b3..0e991ce39 100644 --- a/repos/base-hw/src/core/include/spec/x86/pic.h +++ b/repos/base-hw/src/core/include/spec/x86_64/pic.h @@ -11,8 +11,8 @@ * under the terms of the GNU General Public License version 2. */ -#ifndef _CORE__INCLUDE__SPEC__X86__PIC_H_ -#define _CORE__INCLUDE__SPEC__X86__PIC_H_ +#ifndef _CORE__INCLUDE__SPEC__X86_64__PIC_H_ +#define _CORE__INCLUDE__SPEC__X86_64__PIC_H_ /* Genode includes */ #include @@ -279,4 +279,4 @@ class Genode::Pic : public Mmio namespace Kernel { class Pic : public Genode::Pic { }; } -#endif /* _CORE__INCLUDE__SPEC__X86__PIC_H_ */ +#endif /* _CORE__INCLUDE__SPEC__X86_64__PIC_H_ */ diff --git a/repos/base-hw/src/core/include/spec/x86/port_io.h b/repos/base-hw/src/core/include/spec/x86_64/port_io.h similarity index 80% rename from repos/base-hw/src/core/include/spec/x86/port_io.h rename to repos/base-hw/src/core/include/spec/x86_64/port_io.h index 7e103ec24..4e6bcfc1e 100644 --- a/repos/base-hw/src/core/include/spec/x86/port_io.h +++ b/repos/base-hw/src/core/include/spec/x86_64/port_io.h @@ -11,8 +11,8 @@ * under the terms of the GNU General Public License version 2. */ -#ifndef _CORE__INCLUDE__SPEC__X86__PORT_IO_H_ -#define _CORE__INCLUDE__SPEC__X86__PORT_IO_H_ +#ifndef _CORE__INCLUDE__SPEC__X86_64__PORT_IO_H_ +#define _CORE__INCLUDE__SPEC__X86_64__PORT_IO_H_ #include @@ -37,4 +37,4 @@ namespace Genode } } -#endif /* _CORE__INCLUDE__SPEC__X86__PORT_IO_H_ */ +#endif /* _CORE__INCLUDE__SPEC__X86_64__PORT_IO_H_ */ diff --git a/repos/base-hw/src/core/include/spec/x86/timer.h b/repos/base-hw/src/core/include/spec/x86_64/timer.h similarity index 95% rename from repos/base-hw/src/core/include/spec/x86/timer.h rename to repos/base-hw/src/core/include/spec/x86_64/timer.h index a62812f26..1d047b9f4 100644 --- a/repos/base-hw/src/core/include/spec/x86/timer.h +++ b/repos/base-hw/src/core/include/spec/x86_64/timer.h @@ -12,8 +12,8 @@ * under the terms of the GNU General Public License version 2. */ -#ifndef _CORE__INCLUDE__SPEC__X86__TIMER_H_ -#define _CORE__INCLUDE__SPEC__X86__TIMER_H_ +#ifndef _CORE__INCLUDE__SPEC__X86_64__TIMER_H_ +#define _CORE__INCLUDE__SPEC__X86_64__TIMER_H_ /* base-hw includes */ #include @@ -147,4 +147,4 @@ class Genode::Timer : public Mmio namespace Kernel { class Timer : public Genode::Timer { }; } -#endif /* _CORE__INCLUDE__SPEC__X86__TIMER_H_ */ +#endif /* _CORE__INCLUDE__SPEC__X86_64__TIMER_H_ */ diff --git a/repos/base-hw/src/core/spec/x86/kernel/thread.cc b/repos/base-hw/src/core/spec/x86/kernel/thread.cc deleted file mode 100644 index bcb743d99..000000000 --- a/repos/base-hw/src/core/spec/x86/kernel/thread.cc +++ /dev/null @@ -1,28 +0,0 @@ -/* - * \brief Kernel backend for execution contexts in userland - * \author Adrian-Ken Rueegsegger - * \author Reto Buerki - * \author Stefan Kalkowski - * \date 2015-02-09 - */ - -/* - * Copyright (C) 2015-2016 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. - */ - -/* core includes */ -#include - -using namespace Kernel; - - -void Thread::_call_update_data_region() { } - - -void Thread::_call_update_instr_region() { } - - -void Thread_event::_signal_acknowledged() { _thread->_resume(); } diff --git a/repos/base-hw/src/core/spec/x86/bios_data_area.cc b/repos/base-hw/src/core/spec/x86_64/bios_data_area.cc similarity index 100% rename from repos/base-hw/src/core/spec/x86/bios_data_area.cc rename to repos/base-hw/src/core/spec/x86_64/bios_data_area.cc diff --git a/repos/base-hw/src/core/spec/x86/cpu.cc b/repos/base-hw/src/core/spec/x86_64/cpu.cc similarity index 100% rename from repos/base-hw/src/core/spec/x86/cpu.cc rename to repos/base-hw/src/core/spec/x86_64/cpu.cc diff --git a/repos/base-hw/src/core/spec/x86/fpu.cc b/repos/base-hw/src/core/spec/x86_64/fpu.cc similarity index 95% rename from repos/base-hw/src/core/spec/x86/fpu.cc rename to repos/base-hw/src/core/spec/x86_64/fpu.cc index 4bd782f2b..5a4f22e06 100644 --- a/repos/base-hw/src/core/spec/x86/fpu.cc +++ b/repos/base-hw/src/core/spec/x86_64/fpu.cc @@ -1,5 +1,5 @@ /* - * \brief FPU implementation specific to x86 + * \brief FPU implementation specific to x86_64 * \author Stefan Kalkowski * \date 2016-01-19 */ diff --git a/repos/base-hw/src/core/spec/x86/kernel/cpu.cc b/repos/base-hw/src/core/spec/x86_64/kernel/cpu.cc similarity index 100% rename from repos/base-hw/src/core/spec/x86/kernel/cpu.cc rename to repos/base-hw/src/core/spec/x86_64/kernel/cpu.cc diff --git a/repos/base-hw/src/core/spec/x86/kernel/cpu_exception.cc b/repos/base-hw/src/core/spec/x86_64/kernel/cpu_exception.cc similarity index 100% rename from repos/base-hw/src/core/spec/x86/kernel/cpu_exception.cc rename to repos/base-hw/src/core/spec/x86_64/kernel/cpu_exception.cc diff --git a/repos/base-hw/src/core/spec/x86/kernel/pd.cc b/repos/base-hw/src/core/spec/x86_64/kernel/pd.cc similarity index 100% rename from repos/base-hw/src/core/spec/x86/kernel/pd.cc rename to repos/base-hw/src/core/spec/x86_64/kernel/pd.cc diff --git a/repos/base-hw/src/core/spec/x86_64/kernel/thread.cc b/repos/base-hw/src/core/spec/x86_64/kernel/thread.cc index 225f5a702..4da563d80 100644 --- a/repos/base-hw/src/core/spec/x86_64/kernel/thread.cc +++ b/repos/base-hw/src/core/spec/x86_64/kernel/thread.cc @@ -17,6 +17,16 @@ #include #include + +void Kernel::Thread::_call_update_data_region() { } + + +void Kernel::Thread::_call_update_instr_region() { } + + +void Kernel::Thread_event::_signal_acknowledged() { _thread->_resume(); } + + void Kernel::Thread::_mmu_exception() { _become_inactive(AWAITS_RESUME); diff --git a/repos/base-hw/src/core/spec/x86/kernel/thread_exception.cc b/repos/base-hw/src/core/spec/x86_64/kernel/thread_exception.cc similarity index 100% rename from repos/base-hw/src/core/spec/x86/kernel/thread_exception.cc rename to repos/base-hw/src/core/spec/x86_64/kernel/thread_exception.cc diff --git a/repos/base-hw/src/core/spec/x86/pic.cc b/repos/base-hw/src/core/spec/x86_64/pic.cc similarity index 100% rename from repos/base-hw/src/core/spec/x86/pic.cc rename to repos/base-hw/src/core/spec/x86_64/pic.cc diff --git a/repos/base-hw/src/core/spec/x86/platform_support.cc b/repos/base-hw/src/core/spec/x86_64/platform_support_common.cc similarity index 100% rename from repos/base-hw/src/core/spec/x86/platform_support.cc rename to repos/base-hw/src/core/spec/x86_64/platform_support_common.cc