From 02d68fdb97de854c7c374253dbcf13df5bfb2d34 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Mon, 15 Jul 2019 13:11:28 +0200 Subject: [PATCH] hw: move arm virtualization to generic place Ref #3553 --- repos/base-hw/lib/mk/spec/arm_v7/core-hw-arndale.mk | 8 ++++---- repos/base-hw/lib/mk/spec/arm_v7/core-hw-imx7d_sabre.mk | 8 ++++---- .../{arm_v7 => arm}/virtualization/platform_services.cc | 0 .../virtualization/vm_session_component.cc | 2 +- .../{arm_v7 => arm}/virtualization/vm_session_component.h | 5 +++-- .../src/core/spec/{arm_v7 => arm}/vm_session_component.cc | 0 6 files changed, 12 insertions(+), 11 deletions(-) rename repos/base-hw/src/core/spec/{arm_v7 => arm}/virtualization/platform_services.cc (100%) rename repos/base-hw/src/core/spec/{arm_v7 => arm}/virtualization/vm_session_component.cc (98%) rename repos/base-hw/src/core/spec/{arm_v7 => arm}/virtualization/vm_session_component.h (96%) rename repos/base-hw/src/core/spec/{arm_v7 => arm}/vm_session_component.cc (100%) diff --git a/repos/base-hw/lib/mk/spec/arm_v7/core-hw-arndale.mk b/repos/base-hw/lib/mk/spec/arm_v7/core-hw-arndale.mk index cec0957f38..473c82e530 100644 --- a/repos/base-hw/lib/mk/spec/arm_v7/core-hw-arndale.mk +++ b/repos/base-hw/lib/mk/spec/arm_v7/core-hw-arndale.mk @@ -6,15 +6,15 @@ # add include paths INC_DIR += $(REP_DIR)/src/core/spec/arndale -INC_DIR += $(REP_DIR)/src/core/spec/arm_v7/virtualization +INC_DIR += $(REP_DIR)/src/core/spec/arm/virtualization # add C++ sources SRC_CC += kernel/vm_thread_on.cc SRC_CC += spec/arm/gicv2.cc SRC_CC += spec/arm_v7/virtualization/kernel/vm.cc -SRC_CC += spec/arm_v7/virtualization/platform_services.cc -SRC_CC += spec/arm_v7/virtualization/vm_session_component.cc -SRC_CC += spec/arm_v7/vm_session_component.cc +SRC_CC += spec/arm/virtualization/platform_services.cc +SRC_CC += spec/arm/virtualization/vm_session_component.cc +SRC_CC += spec/arm/vm_session_component.cc SRC_CC += vm_session_common.cc # add assembly sources diff --git a/repos/base-hw/lib/mk/spec/arm_v7/core-hw-imx7d_sabre.mk b/repos/base-hw/lib/mk/spec/arm_v7/core-hw-imx7d_sabre.mk index 838137de02..04bb2060d0 100644 --- a/repos/base-hw/lib/mk/spec/arm_v7/core-hw-imx7d_sabre.mk +++ b/repos/base-hw/lib/mk/spec/arm_v7/core-hw-imx7d_sabre.mk @@ -6,16 +6,16 @@ # add include paths INC_DIR += $(REP_DIR)/src/core/spec/imx7d_sabre -INC_DIR += $(REP_DIR)/src/core/spec/arm_v7/virtualization +INC_DIR += $(REP_DIR)/src/core/spec/arm/virtualization # add C++ sources SRC_CC += kernel/vm_thread_on.cc SRC_CC += spec/arm/generic_timer.cc SRC_CC += spec/arm/gicv2.cc SRC_CC += spec/arm_v7/virtualization/kernel/vm.cc -SRC_CC += spec/arm_v7/virtualization/platform_services.cc -SRC_CC += spec/arm_v7/virtualization/vm_session_component.cc -SRC_CC += spec/arm_v7/vm_session_component.cc +SRC_CC += spec/arm/virtualization/platform_services.cc +SRC_CC += spec/arm/virtualization/vm_session_component.cc +SRC_CC += spec/arm/vm_session_component.cc SRC_CC += vm_session_common.cc # add assembly sources diff --git a/repos/base-hw/src/core/spec/arm_v7/virtualization/platform_services.cc b/repos/base-hw/src/core/spec/arm/virtualization/platform_services.cc similarity index 100% rename from repos/base-hw/src/core/spec/arm_v7/virtualization/platform_services.cc rename to repos/base-hw/src/core/spec/arm/virtualization/platform_services.cc diff --git a/repos/base-hw/src/core/spec/arm_v7/virtualization/vm_session_component.cc b/repos/base-hw/src/core/spec/arm/virtualization/vm_session_component.cc similarity index 98% rename from repos/base-hw/src/core/spec/arm_v7/virtualization/vm_session_component.cc rename to repos/base-hw/src/core/spec/arm/virtualization/vm_session_component.cc index 45e4b8db1f..032acb592e 100644 --- a/repos/base-hw/src/core/spec/arm_v7/virtualization/vm_session_component.cc +++ b/repos/base-hw/src/core/spec/arm/virtualization/vm_session_component.cc @@ -16,7 +16,7 @@ /* core includes */ #include -#include +#include #include #include diff --git a/repos/base-hw/src/core/spec/arm_v7/virtualization/vm_session_component.h b/repos/base-hw/src/core/spec/arm/virtualization/vm_session_component.h similarity index 96% rename from repos/base-hw/src/core/spec/arm_v7/virtualization/vm_session_component.h rename to repos/base-hw/src/core/spec/arm/virtualization/vm_session_component.h index 7121565b55..b870106826 100644 --- a/repos/base-hw/src/core/spec/arm_v7/virtualization/vm_session_component.h +++ b/repos/base-hw/src/core/spec/arm/virtualization/vm_session_component.h @@ -27,6 +27,7 @@ #include #include #include +#include #include @@ -60,13 +61,13 @@ class Genode::Vm_session_component Avl_region _map { &_sliced_heap }; Region_map &_region_map; Ram_dataspace_capability _ds_cap { }; - Region_map::Local_addr _ds_addr { 0 }; + Region_map::Local_addr _ds_addr { nullptr }; Table &_table; Array &_table_array; Kernel_object _kobj {}; static size_t _ds_size() { - return align_addr(sizeof(Cpu_state_modes), + return align_addr(sizeof(Vm_state), get_page_size_log2()); } addr_t _alloc_ds(); diff --git a/repos/base-hw/src/core/spec/arm_v7/vm_session_component.cc b/repos/base-hw/src/core/spec/arm/vm_session_component.cc similarity index 100% rename from repos/base-hw/src/core/spec/arm_v7/vm_session_component.cc rename to repos/base-hw/src/core/spec/arm/vm_session_component.cc