From d9d2a7584e2bd456168173b163d1d8a7ba3eba7c Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Thu, 20 Jun 2024 13:39:47 +0200 Subject: [PATCH] base-hw: remove cortex spec directories For consistency reasons, remove the cortex_a8, cortex_a9, and cortex_a15 spec directories. Such SPEC variables do not exist since a while. Also rename remaining translation_table.h header to page_table.h to stay consistent with the class names inside. Fix genodelabs/genode#5253 --- .../core-hw-cortex_a15.inc} | 2 +- .../core-hw-cortex_a9.inc} | 4 ++-- .../lib/mk/spec/arm_v7/core-hw-pbxa9.mk | 2 +- .../spec/arm_v7/core-hw-virt_qemu_arm_v7a.mk | 2 +- repos/base-hw/recipes/src/base-hw_content.inc | 5 ++-- repos/base-hw/src/core/board/pbxa9/board.h | 2 +- .../src/core/board/virt_qemu_arm_v7a/board.h | 2 +- .../cpu.cc => arm/cortex_a15_cpu.cc} | 2 +- .../cpu.h => arm/cortex_a15_cpu.h} | 2 +- .../cortex_a8_page_table.h} | 6 ++--- .../board.cc => arm/cortex_a9_board.cc} | 0 .../cpu.cc => arm/cortex_a9_cpu.cc} | 2 +- .../{cortex_a9/cpu.h => arm/cortex_a9_cpu.h} | 2 +- .../cortex_a9_page_table.h} | 6 ++--- repos/base-hw/src/core/spec/arm_v6/cpu.h | 2 +- .../{translation_table.h => page_table.h} | 6 ++--- repos/base-hw/src/core/spec/arm_v8/cpu.h | 2 +- .../src/core/spec/arm_v8/translation_table.h | 20 ---------------- .../core/spec/cortex_a15/translation_table.h | 20 ---------------- repos/base-hw/src/core/spec/cortex_a8/cpu.h | 24 ------------------- repos/base-hw/src/core/spec/x86_64/cpu.h | 2 +- .../src/core/spec/x86_64/translation_table.h | 19 --------------- 22 files changed, 26 insertions(+), 108 deletions(-) rename repos/base-hw/lib/mk/spec/{cortex_a15/core-hw.inc => arm_v7/core-hw-cortex_a15.inc} (88%) rename repos/base-hw/lib/mk/spec/{cortex_a9/core-hw.inc => arm_v7/core-hw-cortex_a9.inc} (84%) rename repos/base-hw/src/core/spec/{cortex_a15/cpu.cc => arm/cortex_a15_cpu.cc} (97%) rename repos/base-hw/src/core/spec/{cortex_a15/cpu.h => arm/cortex_a15_cpu.h} (98%) rename repos/base-hw/src/core/spec/{cortex_a8/translation_table.h => arm/cortex_a8_page_table.h} (86%) rename repos/base-hw/src/core/spec/{cortex_a9/board.cc => arm/cortex_a9_board.cc} (100%) rename repos/base-hw/src/core/spec/{cortex_a9/cpu.cc => arm/cortex_a9_cpu.cc} (94%) rename repos/base-hw/src/core/spec/{cortex_a9/cpu.h => arm/cortex_a9_cpu.h} (94%) rename repos/base-hw/src/core/spec/{cortex_a9/translation_table.h => arm/cortex_a9_page_table.h} (78%) rename repos/base-hw/src/core/spec/arm_v6/{translation_table.h => page_table.h} (82%) delete mode 100644 repos/base-hw/src/core/spec/arm_v8/translation_table.h delete mode 100644 repos/base-hw/src/core/spec/cortex_a15/translation_table.h delete mode 100644 repos/base-hw/src/core/spec/cortex_a8/cpu.h delete mode 100644 repos/base-hw/src/core/spec/x86_64/translation_table.h diff --git a/repos/base-hw/lib/mk/spec/cortex_a15/core-hw.inc b/repos/base-hw/lib/mk/spec/arm_v7/core-hw-cortex_a15.inc similarity index 88% rename from repos/base-hw/lib/mk/spec/cortex_a15/core-hw.inc rename to repos/base-hw/lib/mk/spec/arm_v7/core-hw-cortex_a15.inc index 0970d6bc43..24fcd27a6f 100644 --- a/repos/base-hw/lib/mk/spec/cortex_a15/core-hw.inc +++ b/repos/base-hw/lib/mk/spec/arm_v7/core-hw-cortex_a15.inc @@ -5,7 +5,7 @@ # # add C++ sources -SRC_CC += spec/cortex_a15/cpu.cc +SRC_CC += spec/arm/cortex_a15_cpu.cc SRC_CC += kernel/cpu_mp.cc SRC_CC += spec/arm/kernel/lock.cc diff --git a/repos/base-hw/lib/mk/spec/cortex_a9/core-hw.inc b/repos/base-hw/lib/mk/spec/arm_v7/core-hw-cortex_a9.inc similarity index 84% rename from repos/base-hw/lib/mk/spec/cortex_a9/core-hw.inc rename to repos/base-hw/lib/mk/spec/arm_v7/core-hw-cortex_a9.inc index 6002a9f5b1..72eb114a58 100644 --- a/repos/base-hw/lib/mk/spec/cortex_a9/core-hw.inc +++ b/repos/base-hw/lib/mk/spec/arm_v7/core-hw-cortex_a9.inc @@ -5,8 +5,8 @@ # # add C++ sources -SRC_CC += spec/cortex_a9/board.cc -SRC_CC += spec/cortex_a9/cpu.cc +SRC_CC += spec/arm/cortex_a9_board.cc +SRC_CC += spec/arm/cortex_a9_cpu.cc SRC_CC += spec/arm/cortex_a9_global_timer.cc SRC_CC += spec/arm/gicv2.cc SRC_CC += spec/arm/kernel/lock.cc diff --git a/repos/base-hw/lib/mk/spec/arm_v7/core-hw-pbxa9.mk b/repos/base-hw/lib/mk/spec/arm_v7/core-hw-pbxa9.mk index 6d5de20eef..b0cf6060a4 100644 --- a/repos/base-hw/lib/mk/spec/arm_v7/core-hw-pbxa9.mk +++ b/repos/base-hw/lib/mk/spec/arm_v7/core-hw-pbxa9.mk @@ -12,4 +12,4 @@ REP_INC_DIR += src/core/board/pbxa9 SRC_CC += platform_services.cc # include less specific configuration -include $(call select_from_repositories,lib/mk/spec/cortex_a9/core-hw.inc) +include $(call select_from_repositories,lib/mk/spec/arm_v7/core-hw-cortex_a9.inc) diff --git a/repos/base-hw/lib/mk/spec/arm_v7/core-hw-virt_qemu_arm_v7a.mk b/repos/base-hw/lib/mk/spec/arm_v7/core-hw-virt_qemu_arm_v7a.mk index fd4f579d79..173e6bc676 100644 --- a/repos/base-hw/lib/mk/spec/arm_v7/core-hw-virt_qemu_arm_v7a.mk +++ b/repos/base-hw/lib/mk/spec/arm_v7/core-hw-virt_qemu_arm_v7a.mk @@ -16,4 +16,4 @@ SRC_S += spec/arm_v7/virtualization/exception_vector.s CC_MARCH = -march=armv7ve -mtune=cortex-a15 -mfpu=vfpv3 -mfloat-abi=softfp -include $(call select_from_repositories,lib/mk/spec/cortex_a15/core-hw.inc) +include $(call select_from_repositories,lib/mk/spec/arm_v7/core-hw-cortex_a15.inc) diff --git a/repos/base-hw/recipes/src/base-hw_content.inc b/repos/base-hw/recipes/src/base-hw_content.inc index d06bc2c5d2..168ff5320e 100644 --- a/repos/base-hw/recipes/src/base-hw_content.inc +++ b/repos/base-hw/recipes/src/base-hw_content.inc @@ -24,7 +24,7 @@ BOARD := $(patsubst base-hw-%,%,$(_BOARD)) # LIB_MK_SPECS(arm_v6) := arm arm_v6 -LIB_MK_SPECS(arm_v7a) := arm arm_v7 cortex_a9 cortex_a15 +LIB_MK_SPECS(arm_v7a) := arm arm_v7 LIB_MK_SPECS(arm_v8a) := arm_64 arm_v8 LIB_MK_SPECS(x86_64) := x86_64 LIB_MK_SPECS(riscv) := riscv @@ -36,7 +36,7 @@ SRC_BOOTSTRAP_SPECS(x86_64) := x86_64 SRC_BOOTSTRAP_SPECS(riscv) := riscv SRC_CORE_SPECS(arm_v6) := arm arm_v6 -SRC_CORE_SPECS(arm_v7a) := arm arm_v7 cortex_a8 cortex_a9 cortex_a15 +SRC_CORE_SPECS(arm_v7a) := arm arm_v7 SRC_CORE_SPECS(arm_v8a) := arm arm_v8 SRC_CORE_SPECS(x86_64) := x86 x86_64 SRC_CORE_SPECS(riscv) := riscv @@ -136,6 +136,7 @@ LIB_MK_FILES := base-common.inc base-hw-common.mk \ base.inc base-hw.inc base-hw.mk \ bootstrap-hw.inc bootstrap-hw-$(BOARD).inc bootstrap-hw-$(BOARD).mk \ core-hw.inc core-hw-$(BOARD).inc core-hw-$(BOARD).mk \ + core-hw-cortex_a9.inc core-hw-cortex_a15.inc \ startup.inc startup-hw.mk \ timeout-hw.mk cxx.mk ld-hw.mk syscall-hw.mk diff --git a/repos/base-hw/src/core/board/pbxa9/board.h b/repos/base-hw/src/core/board/pbxa9/board.h index e39d046502..af1eddb5f8 100644 --- a/repos/base-hw/src/core/board/pbxa9/board.h +++ b/repos/base-hw/src/core/board/pbxa9/board.h @@ -20,7 +20,7 @@ /* base-hw core includes */ #include -#include +#include namespace Board { diff --git a/repos/base-hw/src/core/board/virt_qemu_arm_v7a/board.h b/repos/base-hw/src/core/board/virt_qemu_arm_v7a/board.h index 324b783c28..98c052953e 100644 --- a/repos/base-hw/src/core/board/virt_qemu_arm_v7a/board.h +++ b/repos/base-hw/src/core/board/virt_qemu_arm_v7a/board.h @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include namespace Kernel { class Cpu; } diff --git a/repos/base-hw/src/core/spec/cortex_a15/cpu.cc b/repos/base-hw/src/core/spec/arm/cortex_a15_cpu.cc similarity index 97% rename from repos/base-hw/src/core/spec/cortex_a15/cpu.cc rename to repos/base-hw/src/core/spec/arm/cortex_a15_cpu.cc index 0bd9ffea7a..0a6a47f710 100644 --- a/repos/base-hw/src/core/spec/cortex_a15/cpu.cc +++ b/repos/base-hw/src/core/spec/arm/cortex_a15_cpu.cc @@ -13,7 +13,7 @@ /* base-hw core includes */ #include -#include +#include using namespace Core; diff --git a/repos/base-hw/src/core/spec/cortex_a15/cpu.h b/repos/base-hw/src/core/spec/arm/cortex_a15_cpu.h similarity index 98% rename from repos/base-hw/src/core/spec/cortex_a15/cpu.h rename to repos/base-hw/src/core/spec/arm/cortex_a15_cpu.h index 0e75037d21..fe9824167b 100644 --- a/repos/base-hw/src/core/spec/cortex_a15/cpu.h +++ b/repos/base-hw/src/core/spec/arm/cortex_a15_cpu.h @@ -17,7 +17,7 @@ /* base-hw core includes */ #include -#include +#include namespace Core { class Cpu; } diff --git a/repos/base-hw/src/core/spec/cortex_a8/translation_table.h b/repos/base-hw/src/core/spec/arm/cortex_a8_page_table.h similarity index 86% rename from repos/base-hw/src/core/spec/cortex_a8/translation_table.h rename to repos/base-hw/src/core/spec/arm/cortex_a8_page_table.h index e1fb29b0a5..a28a33858f 100644 --- a/repos/base-hw/src/core/spec/cortex_a8/translation_table.h +++ b/repos/base-hw/src/core/spec/arm/cortex_a8_page_table.h @@ -12,8 +12,8 @@ * under the terms of the GNU Affero General Public License version 3. */ -#ifndef _CORE__SPEC__CORTEX_A8__TRANSLATION_TABLE_H_ -#define _CORE__SPEC__CORTEX_A8__TRANSLATION_TABLE_H_ +#ifndef _CORE__SPEC__CORTEX_A8__PAGE_TABLE_H_ +#define _CORE__SPEC__CORTEX_A8__PAGE_TABLE_H_ /* base-hw internal includes */ #include @@ -41,4 +41,4 @@ void Hw::Page_table::_table_changed(unsigned long addr, unsigned long size) Core::Arm_cpu::cache_clean_data_region(addr, size); } -#endif /* _CORE__SPEC__CORTEX_A8__TRANSLATION_TABLE_H_ */ +#endif /* _CORE__SPEC__CORTEX_A8__PAGE_TABLE_H_ */ diff --git a/repos/base-hw/src/core/spec/cortex_a9/board.cc b/repos/base-hw/src/core/spec/arm/cortex_a9_board.cc similarity index 100% rename from repos/base-hw/src/core/spec/cortex_a9/board.cc rename to repos/base-hw/src/core/spec/arm/cortex_a9_board.cc diff --git a/repos/base-hw/src/core/spec/cortex_a9/cpu.cc b/repos/base-hw/src/core/spec/arm/cortex_a9_cpu.cc similarity index 94% rename from repos/base-hw/src/core/spec/cortex_a9/cpu.cc rename to repos/base-hw/src/core/spec/arm/cortex_a9_cpu.cc index aff904f29e..2598895d52 100644 --- a/repos/base-hw/src/core/spec/cortex_a9/cpu.cc +++ b/repos/base-hw/src/core/spec/arm/cortex_a9_cpu.cc @@ -13,7 +13,7 @@ */ /* base-hw core includes */ -#include +#include #include diff --git a/repos/base-hw/src/core/spec/cortex_a9/cpu.h b/repos/base-hw/src/core/spec/arm/cortex_a9_cpu.h similarity index 94% rename from repos/base-hw/src/core/spec/cortex_a9/cpu.h rename to repos/base-hw/src/core/spec/arm/cortex_a9_cpu.h index 62fcc75144..11c01ffd60 100644 --- a/repos/base-hw/src/core/spec/cortex_a9/cpu.h +++ b/repos/base-hw/src/core/spec/arm/cortex_a9_cpu.h @@ -17,7 +17,7 @@ /* base-hw core includes */ #include -#include +#include namespace Core { struct Cpu; } diff --git a/repos/base-hw/src/core/spec/cortex_a9/translation_table.h b/repos/base-hw/src/core/spec/arm/cortex_a9_page_table.h similarity index 78% rename from repos/base-hw/src/core/spec/cortex_a9/translation_table.h rename to repos/base-hw/src/core/spec/arm/cortex_a9_page_table.h index 14201acffc..1152024489 100644 --- a/repos/base-hw/src/core/spec/cortex_a9/translation_table.h +++ b/repos/base-hw/src/core/spec/arm/cortex_a9_page_table.h @@ -12,8 +12,8 @@ * under the terms of the GNU Affero General Public License version 3. */ -#ifndef _CORE__SPEC__CORTEX_A9__TRANSLATION_TABLE_H_ -#define _CORE__SPEC__CORTEX_A9__TRANSLATION_TABLE_H_ +#ifndef _CORE__SPEC__ARM__CORTEX_A9_PAGE_TABLE_H_ +#define _CORE__SPEC__ARM__CORTEX_A9_PAGE_TABLE_H_ #include @@ -27,4 +27,4 @@ constexpr bool Hw::Page_table::Descriptor_base::_smp() { return true; } void Hw::Page_table::_table_changed(unsigned long, unsigned long) { } -#endif /* _CORE__SPEC__CORTEX_A9__TRANSLATION_TABLE_H_ */ +#endif /* _CORE__SPEC__ARM__CORTEX_A9_PAGE_TABLE_H_ */ diff --git a/repos/base-hw/src/core/spec/arm_v6/cpu.h b/repos/base-hw/src/core/spec/arm_v6/cpu.h index 042c9a6eac..64a256f358 100644 --- a/repos/base-hw/src/core/spec/arm_v6/cpu.h +++ b/repos/base-hw/src/core/spec/arm_v6/cpu.h @@ -17,7 +17,7 @@ /* base-hw core includes */ #include -#include +#include namespace Core { struct Cpu; } diff --git a/repos/base-hw/src/core/spec/arm_v6/translation_table.h b/repos/base-hw/src/core/spec/arm_v6/page_table.h similarity index 82% rename from repos/base-hw/src/core/spec/arm_v6/translation_table.h rename to repos/base-hw/src/core/spec/arm_v6/page_table.h index fb2e2446bc..9d6d6f755c 100644 --- a/repos/base-hw/src/core/spec/arm_v6/translation_table.h +++ b/repos/base-hw/src/core/spec/arm_v6/page_table.h @@ -12,8 +12,8 @@ * under the terms of the GNU Affero General Public License version 3. */ -#ifndef _CORE__SPEC__ARM_V6__TRANSLATION_TABLE_H_ -#define _CORE__SPEC__ARM_V6__TRANSLATION_TABLE_H_ +#ifndef _CORE__SPEC__ARM_V6__PAGE_TABLE_H_ +#define _CORE__SPEC__ARM_V6__PAGE_TABLE_H_ #include #include @@ -32,4 +32,4 @@ void Hw::Page_table::_table_changed(unsigned long addr, unsigned long size) Core::Arm_cpu::cache_clean_data_region(addr, size); } -#endif /* _CORE__SPEC__ARM_V6__TRANSLATION_TABLE_H_ */ +#endif /* _CORE__SPEC__ARM_V6__PAGE_TABLE_H_ */ diff --git a/repos/base-hw/src/core/spec/arm_v8/cpu.h b/repos/base-hw/src/core/spec/arm_v8/cpu.h index 0f4fd7f223..86c88a9181 100644 --- a/repos/base-hw/src/core/spec/arm_v8/cpu.h +++ b/repos/base-hw/src/core/spec/arm_v8/cpu.h @@ -27,7 +27,7 @@ /* base-hw internal includes */ #include #include -#include +#include namespace Kernel { struct Thread_fault; } diff --git a/repos/base-hw/src/core/spec/arm_v8/translation_table.h b/repos/base-hw/src/core/spec/arm_v8/translation_table.h deleted file mode 100644 index 56fb10f856..0000000000 --- a/repos/base-hw/src/core/spec/arm_v8/translation_table.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * \brief Translation table definitions for core - * \author Stefan Kalkowski - * \date 2019-05-10 - */ - -/* - * Copyright (C) 2019 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 _CORE__SPEC__ARM_V8__TRANSLATION_TABLE_H_ -#define _CORE__SPEC__ARM_V8__TRANSLATION_TABLE_H_ - -/* core includes */ -#include - -#endif /* _CORE__SPEC__ARM_V8__TRANSLATION_TABLE_H_ */ diff --git a/repos/base-hw/src/core/spec/cortex_a15/translation_table.h b/repos/base-hw/src/core/spec/cortex_a15/translation_table.h deleted file mode 100644 index 3f67ed4f82..0000000000 --- a/repos/base-hw/src/core/spec/cortex_a15/translation_table.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * \brief Translation table definitions for core - * \author Stefan Kalkowski - * \date 2015-01-30 - */ - -/* - * Copyright (C) 2015-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 _CORE__SPEC__CORTEX_A15__TRANSLATION_TABLE_H_ -#define _CORE__SPEC__CORTEX_A15__TRANSLATION_TABLE_H_ - -/* core includes */ -#include - -#endif /* _CORE__SPEC__CORTEX_A15__TRANSLATION_TABLE_H_ */ diff --git a/repos/base-hw/src/core/spec/cortex_a8/cpu.h b/repos/base-hw/src/core/spec/cortex_a8/cpu.h deleted file mode 100644 index 1132b6e901..0000000000 --- a/repos/base-hw/src/core/spec/cortex_a8/cpu.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * \brief ARM Cortex A8 CPU driver for core - * \author Martin stein - * \author Stefan Kalkowski - * \date 2011-11-03 - */ - -/* - * Copyright (C) 2011-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 _CORE__SPEC__CORTEX_A8__CPU_H_ -#define _CORE__SPEC__CORTEX_A8__CPU_H_ - -/* base-hw core includes */ -#include -#include - -namespace Core { using Cpu = Arm_v7_cpu; } - -#endif /* _CORE__SPEC__CORTEX_A8__CPU_H_ */ diff --git a/repos/base-hw/src/core/spec/x86_64/cpu.h b/repos/base-hw/src/core/spec/x86_64/cpu.h index 5498ecef33..116ab5fc92 100644 --- a/repos/base-hw/src/core/spec/x86_64/cpu.h +++ b/repos/base-hw/src/core/spec/x86_64/cpu.h @@ -31,7 +31,7 @@ #include #include #include -#include +#include namespace Kernel { struct Thread_fault; } diff --git a/repos/base-hw/src/core/spec/x86_64/translation_table.h b/repos/base-hw/src/core/spec/x86_64/translation_table.h deleted file mode 100644 index dc7543cf8f..0000000000 --- a/repos/base-hw/src/core/spec/x86_64/translation_table.h +++ /dev/null @@ -1,19 +0,0 @@ -/* - * \brief x86_64 translation table definitions for core - * \author Adrian-Ken Rueegsegger - * \date 2015-02-06 - */ - -/* - * Copyright (C) 2015-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 _CORE__SPEC__X86_64__TRANSLATION_TABLE_H_ -#define _CORE__SPEC__X86_64__TRANSLATION_TABLE_H_ - -#include - -#endif /* _CORE__SPEC__X86_64__TRANSLATION_TABLE_H_ */