diff --git a/repos/base-hw/etc/specs.conf b/repos/base-hw/etc/specs.conf index 3943bf09ff..7095ca4f55 100644 --- a/repos/base-hw/etc/specs.conf +++ b/repos/base-hw/etc/specs.conf @@ -4,7 +4,7 @@ ifeq ($(filter-out $(SPECS),x86_64),) SPECS += pci ps2 vesa framebuffer ifneq ($(filter-out $(SPECS),muen),) -SPECS += acpi +SPECS += acpi x86_pc endif endif diff --git a/repos/base-hw/include/spec/imx53/drivers/trustzone.h b/repos/base-hw/include/spec/imx53/drivers/trustzone.h index 890bf53ded..8a65fea024 100644 --- a/repos/base-hw/include/spec/imx53/drivers/trustzone.h +++ b/repos/base-hw/include/spec/imx53/drivers/trustzone.h @@ -15,7 +15,7 @@ #define _INCLUDE__SPEC__IMX53__DRIVERS__TRUSTZONE_H_ /* Genode includes */ -#include +#include namespace Trustzone { @@ -26,9 +26,9 @@ namespace Trustzone * on this platform allows to protect a max. region of * 256MB per RAM bank only. */ - SECURE_RAM_BASE = Genode::Board_base::RAM0_BASE, + SECURE_RAM_BASE = Imx53::RAM_BANK_0_BASE, SECURE_RAM_SIZE = 256 * 1024 * 1024, - NONSECURE_RAM_BASE = Genode::Board_base::RAM0_BASE + SECURE_RAM_SIZE, + NONSECURE_RAM_BASE = Imx53::RAM_BANK_0_BASE + SECURE_RAM_SIZE, NONSECURE_RAM_SIZE = 256 * 1024 * 1024, }; } diff --git a/repos/base-hw/lib/mk/core-hw-muen.mk b/repos/base-hw/lib/mk/core-hw-muen.mk deleted file mode 100644 index b9d6cfdb83..0000000000 --- a/repos/base-hw/lib/mk/core-hw-muen.mk +++ /dev/null @@ -1,10 +0,0 @@ -# -# \brief Build config for parts of core that depend on Muen status -# \author Stefan Kalkowski -# \date 2015-06-02 -# - -REQUIRES = x86_64 - -# add library dependencies -LIBS += core-hw-muen_off diff --git a/repos/base-hw/lib/mk/core-hw-trustzone.mk b/repos/base-hw/lib/mk/core-hw-trustzone.mk deleted file mode 100644 index 148090d875..0000000000 --- a/repos/base-hw/lib/mk/core-hw-trustzone.mk +++ /dev/null @@ -1,11 +0,0 @@ -# -# \brief Build config for parts of core that depend on Trustzone status -# \author Stefan Kalkowski -# \author Martin Stein -# \date 2012-10-24 -# - -REQUIRES = imx53 - -# add library dependencies -LIBS += core-hw-trustzone_off diff --git a/repos/base-hw/lib/mk/spec/arndale/core-hw.mk b/repos/base-hw/lib/mk/spec/arndale/core-hw.mk index 26f47f304a..52193759d9 100644 --- a/repos/base-hw/lib/mk/spec/arndale/core-hw.mk +++ b/repos/base-hw/lib/mk/spec/arndale/core-hw.mk @@ -5,6 +5,7 @@ # # add include paths +INC_DIR += $(REP_DIR)/src/core/spec/arndale INC_DIR += $(REP_DIR)/src/core/spec/arm_v7/virtualization # add C++ sources diff --git a/repos/base-hw/lib/mk/spec/exynos5/core-hw.inc b/repos/base-hw/lib/mk/spec/exynos5/core-hw.inc index 762b22c9d3..f9d139ace6 100644 --- a/repos/base-hw/lib/mk/spec/exynos5/core-hw.inc +++ b/repos/base-hw/lib/mk/spec/exynos5/core-hw.inc @@ -9,6 +9,7 @@ INC_DIR += $(BASE_DIR)/../base-hw/src/core/spec/exynos5 # add C++ sources SRC_CC += spec/exynos5/cpu.cc +SRC_CC += spec/exynos5/timer.cc # include less specific configuration include $(BASE_DIR)/../base-hw/lib/mk/spec/cortex_a15/core-hw.inc diff --git a/repos/base-hw/lib/mk/spec/imx53/core-hw-trustzone_off.mk b/repos/base-hw/lib/mk/spec/imx53/core-hw-trustzone_off.mk deleted file mode 100644 index c550b876ae..0000000000 --- a/repos/base-hw/lib/mk/spec/imx53/core-hw-trustzone_off.mk +++ /dev/null @@ -1,13 +0,0 @@ -# -# \brief Build config for parts of core that depend on Trustzone status -# \author Stefan Kalkowski -# \author Martin Stein -# \date 2012-10-24 -# - -# add C++ sources -SRC_CC += kernel/vm_thread_off.cc -SRC_CC += platform_services.cc - -# include less specific configuration -include $(REP_DIR)/lib/mk/spec/imx53/core-hw.inc diff --git a/repos/base-hw/lib/mk/spec/imx53/core-hw.inc b/repos/base-hw/lib/mk/spec/imx53/core-hw.inc deleted file mode 100644 index 6cc246b42a..0000000000 --- a/repos/base-hw/lib/mk/spec/imx53/core-hw.inc +++ /dev/null @@ -1,16 +0,0 @@ -# -# \brief Build config for Genodes core process -# \author Stefan Kalkowski -# \author Martin Stein -# \date 2012-10-24 -# - -# add include paths -INC_DIR += $(REP_DIR)/src/core/spec/imx53 -INC_DIR += $(REP_DIR)/src/core/spec/imx - -SRC_CC += spec/imx53/pic.cc -SRC_CC += spec/arm/cpu_context_trustzone.cc - -# include less specific configuration -include $(REP_DIR)/lib/mk/spec/cortex_a8/core-hw.inc diff --git a/repos/base-hw/lib/mk/spec/imx53/core-hw.mk b/repos/base-hw/lib/mk/spec/imx53/core-hw.mk deleted file mode 100644 index c198188b4f..0000000000 --- a/repos/base-hw/lib/mk/spec/imx53/core-hw.mk +++ /dev/null @@ -1 +0,0 @@ -LIBS += core-hw-trustzone diff --git a/repos/base-hw/lib/mk/spec/imx53_qsb/core-hw-trustzone_on.mk b/repos/base-hw/lib/mk/spec/imx53_qsb/core-hw-trustzone_on.mk deleted file mode 100644 index 7f7f279aa1..0000000000 --- a/repos/base-hw/lib/mk/spec/imx53_qsb/core-hw-trustzone_on.mk +++ /dev/null @@ -1,11 +0,0 @@ -# -# \brief Build config for parts of core that depend on Trustzone status -# \author Martin Stein -# \date 2015-10-30 -# - -# add include paths -INC_DIR += $(REP_DIR)/src/core/spec/imx53_qsb/trustzone - -# include less specific configuration -include $(REP_DIR)/lib/mk/spec/imx53/core-hw-trustzone_on.inc diff --git a/repos/base-hw/lib/mk/spec/imx53_qsb/core-hw.mk b/repos/base-hw/lib/mk/spec/imx53_qsb/core-hw.mk new file mode 100644 index 0000000000..c38e5d26ec --- /dev/null +++ b/repos/base-hw/lib/mk/spec/imx53_qsb/core-hw.mk @@ -0,0 +1,34 @@ +# +# \brief Build config for Genodes core process +# \author Stefan Kalkowski +# \author Martin Stein +# \date 2012-10-24 +# + +# add include paths +INC_DIR += $(REP_DIR)/src/core/spec/imx53_qsb +INC_DIR += $(REP_DIR)/src/core/spec/imx53 +INC_DIR += $(REP_DIR)/src/core/spec/imx + +SRC_CC += spec/imx53/pic.cc +SRC_CC += spec/imx53/timer.cc +SRC_CC += spec/arm/cpu_context_trustzone.cc + +ifneq ($(filter-out $(SPECS),trustzone),) +SRC_CC += kernel/vm_thread_off.cc +SRC_CC += platform_services.cc +else +INC_DIR += $(REP_DIR)/src/core/spec/arm_v7/trustzone +INC_DIR += $(REP_DIR)/src/core/spec/imx53/trustzone + +SRC_CC += spec/imx53/trustzone/platform_services.cc +SRC_CC += kernel/vm_thread_on.cc +SRC_CC += spec/arm_v7/trustzone/kernel/vm.cc +SRC_CC += spec/arm_v7/vm_session_component.cc +SRC_CC += spec/arm_v7/trustzone/vm_session_component.cc + +SRC_S += spec/arm_v7/trustzone/mode_transition.s +endif + +# include less specific configuration +include $(REP_DIR)/lib/mk/spec/cortex_a8/core-hw.inc diff --git a/repos/base-hw/lib/mk/spec/imx6/core-hw.mk b/repos/base-hw/lib/mk/spec/imx6/core-hw.mk index 8e23885816..c95150fc1b 100644 --- a/repos/base-hw/lib/mk/spec/imx6/core-hw.mk +++ b/repos/base-hw/lib/mk/spec/imx6/core-hw.mk @@ -7,7 +7,7 @@ # # add include paths -INC_DIR += $(REP_DIR)/src/core/spec/imx6 +INC_DIR += $(REP_DIR)/src/core/spec/wand_quad INC_DIR += $(REP_DIR)/src/core/spec/imx # add C++ sources diff --git a/repos/base-hw/lib/mk/spec/x86_64/bootstrap-hw.mk b/repos/base-hw/lib/mk/spec/muen/bootstrap-hw.mk similarity index 66% rename from repos/base-hw/lib/mk/spec/x86_64/bootstrap-hw.mk rename to repos/base-hw/lib/mk/spec/muen/bootstrap-hw.mk index f6b401a27a..87a6995f6f 100644 --- a/repos/base-hw/lib/mk/spec/x86_64/bootstrap-hw.mk +++ b/repos/base-hw/lib/mk/spec/muen/bootstrap-hw.mk @@ -1,14 +1,9 @@ INC_DIR += $(BASE_DIR)/../base-hw/src/bootstrap/spec/x86_64 -SRC_S += bootstrap/spec/x86_64/crt0.s - -ifneq ($(filter-out $(SPECS),muen),) -SRC_CC += bootstrap/spec/x86_64/platform.cc -SRC_S += bootstrap/spec/x86_64/crt0_translation_table.s -else -SRC_CC += lib/muen/sinfo.cc SRC_CC += bootstrap/spec/x86_64/platform_muen.cc +SRC_CC += lib/muen/sinfo.cc + +SRC_S += bootstrap/spec/x86_64/crt0.s SRC_S += bootstrap/spec/x86_64/crt0_translation_table_muen.s -endif include $(BASE_DIR)/../base-hw/lib/mk/bootstrap-hw.inc diff --git a/repos/base-hw/lib/mk/spec/muen/core-hw-muen.mk b/repos/base-hw/lib/mk/spec/muen/core-hw-muen.mk deleted file mode 100644 index 01afde646f..0000000000 --- a/repos/base-hw/lib/mk/spec/muen/core-hw-muen.mk +++ /dev/null @@ -1 +0,0 @@ -LIBS += core-hw-muen_on diff --git a/repos/base-hw/lib/mk/spec/muen/core-hw.mk b/repos/base-hw/lib/mk/spec/muen/core-hw.mk new file mode 100644 index 0000000000..65dfcb71a6 --- /dev/null +++ b/repos/base-hw/lib/mk/spec/muen/core-hw.mk @@ -0,0 +1,44 @@ +# +# \brief Build config for Genodes core process +# \author Stefan Kalkowski +# \author Martin Stein +# \date 2012-10-04 +# + +REQUIRES = muen + +LIBS += sinfo-muen + +# add include paths +INC_DIR += $(REP_DIR)/src/core/spec/x86_64/muen +INC_DIR += $(BASE_DIR)/../base-hw/src/core/spec/x86_64 + +# add assembly sources +SRC_S += spec/x86_64/mode_transition.s +SRC_S += spec/x86_64/crt0.s + +# add C++ sources +SRC_CC += spec/x86_64/muen/kernel/cpu_exception.cc +SRC_CC += spec/x86_64/muen/kernel/thread_exception.cc +SRC_CC += spec/x86_64/muen/platform_support.cc +SRC_CC += spec/x86_64/muen/kernel/vm.cc +SRC_CC += spec/x86_64/muen/platform_services.cc +SRC_CC += spec/x86_64/muen/sinfo_instance.cc +SRC_CC += spec/x86_64/muen/timer.cc +SRC_CC += kernel/vm_thread_on.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/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 + +# include less specific configuration +include $(BASE_DIR)/../base-hw/lib/mk/core-hw.inc diff --git a/repos/base-hw/lib/mk/spec/odroid_xu/core-hw.mk b/repos/base-hw/lib/mk/spec/odroid_xu/core-hw.mk index 8a62feed10..3dab9b2109 100644 --- a/repos/base-hw/lib/mk/spec/odroid_xu/core-hw.mk +++ b/repos/base-hw/lib/mk/spec/odroid_xu/core-hw.mk @@ -4,6 +4,9 @@ # \date 2015-02-09 # +# add include paths +INC_DIR += $(REP_DIR)/src/core/spec/odroid_xu + # add C++ sources SRC_CC += spec/arm/kernel/cpu_context.cc SRC_CC += spec/arm_gic/pic.cc diff --git a/repos/base-hw/lib/mk/spec/pbxa9/core-hw.mk b/repos/base-hw/lib/mk/spec/pbxa9/core-hw.mk index 3207881ba0..b87782f57d 100644 --- a/repos/base-hw/lib/mk/spec/pbxa9/core-hw.mk +++ b/repos/base-hw/lib/mk/spec/pbxa9/core-hw.mk @@ -11,7 +11,6 @@ INC_DIR += $(REP_DIR)/src/core/spec/pl011 # add C++ sources SRC_CC += platform_services.cc -SRC_CC += spec/pbxa9/board.cc NR_OF_CPUS = 1 diff --git a/repos/base-hw/lib/mk/spec/trustzone/core-hw-trustzone.mk b/repos/base-hw/lib/mk/spec/trustzone/core-hw-trustzone.mk deleted file mode 100644 index d386137286..0000000000 --- a/repos/base-hw/lib/mk/spec/trustzone/core-hw-trustzone.mk +++ /dev/null @@ -1 +0,0 @@ -LIBS += core-hw-trustzone_on diff --git a/repos/base-hw/lib/mk/spec/usb_armory/core-hw-trustzone_on.mk b/repos/base-hw/lib/mk/spec/usb_armory/core-hw-trustzone_on.mk deleted file mode 100644 index 1693ea29d8..0000000000 --- a/repos/base-hw/lib/mk/spec/usb_armory/core-hw-trustzone_on.mk +++ /dev/null @@ -1,11 +0,0 @@ -# -# \brief Build config for parts of core that depend on Trustzone status -# \author Martin Stein -# \date 2015-10-30 -# - -# add include paths -INC_DIR += $(REP_DIR)/src/core/spec/usb_armory - -# include less specific configuration -include $(REP_DIR)/lib/mk/spec/imx53/core-hw-trustzone_on.inc diff --git a/repos/base-hw/lib/mk/spec/imx53/core-hw-trustzone_on.inc b/repos/base-hw/lib/mk/spec/usb_armory/core-hw.mk similarity index 65% rename from repos/base-hw/lib/mk/spec/imx53/core-hw-trustzone_on.inc rename to repos/base-hw/lib/mk/spec/usb_armory/core-hw.mk index 3dee863851..1057ae01d6 100644 --- a/repos/base-hw/lib/mk/spec/imx53/core-hw-trustzone_on.inc +++ b/repos/base-hw/lib/mk/spec/usb_armory/core-hw.mk @@ -1,11 +1,13 @@ # # \brief Build config for parts of core that depend on Trustzone status -# \author Stefan Kalkowski # \author Martin Stein -# \date 2012-10-24 +# \date 2015-10-30 # # add include paths +INC_DIR += $(REP_DIR)/src/core/spec/usb_armory +INC_DIR += $(REP_DIR)/src/core/spec/imx53 +INC_DIR += $(REP_DIR)/src/core/spec/imx INC_DIR += $(REP_DIR)/src/core/spec/arm_v7/trustzone INC_DIR += $(REP_DIR)/src/core/spec/imx53/trustzone @@ -15,9 +17,12 @@ SRC_CC += kernel/vm_thread_on.cc SRC_CC += spec/arm_v7/trustzone/kernel/vm.cc SRC_CC += spec/arm_v7/vm_session_component.cc SRC_CC += spec/arm_v7/trustzone/vm_session_component.cc +SRC_CC += spec/imx53/pic.cc +SRC_CC += spec/imx53/timer.cc +SRC_CC += spec/arm/cpu_context_trustzone.cc # add assembly sources SRC_S += spec/arm_v7/trustzone/mode_transition.s # include less specific configuration -include $(REP_DIR)/lib/mk/spec/imx53/core-hw.inc +include $(REP_DIR)/lib/mk/spec/cortex_a8/core-hw.inc diff --git a/repos/base-hw/lib/mk/spec/x86_64/core-hw-muen_off.mk b/repos/base-hw/lib/mk/spec/x86_64/core-hw-muen_off.mk deleted file mode 100644 index 25be436d43..0000000000 --- a/repos/base-hw/lib/mk/spec/x86_64/core-hw-muen_off.mk +++ /dev/null @@ -1,17 +0,0 @@ -# -# \brief Build config for Genodes core process -# \author Stefan Kalkowski -# \date 2015-06-02 -# - -# add C++ sources -SRC_CC += kernel/vm_thread_off.cc -SRC_CC += spec/x86_64/pic.cc -SRC_CC += spec/x86_64/timer.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 - -# include less specific configuration -include $(REP_DIR)/lib/mk/spec/x86_64/core-hw.inc diff --git a/repos/base-hw/lib/mk/spec/x86_64/core-hw-muen_on.mk b/repos/base-hw/lib/mk/spec/x86_64/core-hw-muen_on.mk deleted file mode 100644 index 6ab9f9fe3a..0000000000 --- a/repos/base-hw/lib/mk/spec/x86_64/core-hw-muen_on.mk +++ /dev/null @@ -1,23 +0,0 @@ -# -# \brief Build config for Genodes core process -# \author Stefan Kalkowski -# \date 2015-06-02 -# - -REQUIRES = muen - -# add include paths -INC_DIR += $(REP_DIR)/src/core/spec/x86_64/muen - -# add C++ sources -SRC_CC += spec/x86_64/muen/kernel/cpu_exception.cc -SRC_CC += spec/x86_64/muen/kernel/thread_exception.cc -SRC_CC += spec/x86_64/muen/platform_support.cc -SRC_CC += spec/x86_64/muen/kernel/vm.cc -SRC_CC += spec/x86_64/muen/platform_services.cc -SRC_CC += kernel/vm_thread_on.cc - -LIBS += sinfo-muen - -# include less specific configuration -include $(REP_DIR)/lib/mk/spec/x86_64/core-hw.inc diff --git a/repos/base-hw/lib/mk/spec/x86_64/core-hw.mk b/repos/base-hw/lib/mk/spec/x86_64/core-hw.mk deleted file mode 100644 index b3855903fd..0000000000 --- a/repos/base-hw/lib/mk/spec/x86_64/core-hw.mk +++ /dev/null @@ -1,7 +0,0 @@ -# -# \brief Build config for Genodes core process -# \author Stefan Kalkowski -# \date 2015-06-02 -# - -LIBS += core-hw-muen diff --git a/repos/base-hw/lib/mk/spec/x86_pc/bootstrap-hw.mk b/repos/base-hw/lib/mk/spec/x86_pc/bootstrap-hw.mk new file mode 100644 index 0000000000..4d4067234d --- /dev/null +++ b/repos/base-hw/lib/mk/spec/x86_pc/bootstrap-hw.mk @@ -0,0 +1,7 @@ +INC_DIR += $(BASE_DIR)/../base-hw/src/bootstrap/spec/x86_64 + +SRC_S += bootstrap/spec/x86_64/crt0.s +SRC_CC += bootstrap/spec/x86_64/platform.cc +SRC_S += bootstrap/spec/x86_64/crt0_translation_table.s + +include $(BASE_DIR)/../base-hw/lib/mk/bootstrap-hw.inc diff --git a/repos/base-hw/lib/mk/spec/x86_64/core-hw.inc b/repos/base-hw/lib/mk/spec/x86_pc/core-hw.mk similarity index 75% rename from repos/base-hw/lib/mk/spec/x86_64/core-hw.inc rename to repos/base-hw/lib/mk/spec/x86_pc/core-hw.mk index 860ef27f01..c2a54f8f08 100644 --- a/repos/base-hw/lib/mk/spec/x86_64/core-hw.inc +++ b/repos/base-hw/lib/mk/spec/x86_pc/core-hw.mk @@ -13,6 +13,14 @@ SRC_S += spec/x86_64/mode_transition.s SRC_S += spec/x86_64/crt0.s # add C++ sources +SRC_CC += kernel/vm_thread_off.cc +SRC_CC += spec/x86_64/pic.cc +SRC_CC += spec/x86_64/timer.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 + SRC_CC += kernel/kernel.cc SRC_CC += spec/x86/io_port_session_component.cc SRC_CC += spec/x86/io_port_session_support.cc diff --git a/repos/base-hw/src/bootstrap/log.cc b/repos/base-hw/src/bootstrap/log.cc index e8f4ebe754..18c9be57d7 100644 --- a/repos/base-hw/src/bootstrap/log.cc +++ b/repos/base-hw/src/bootstrap/log.cc @@ -22,7 +22,7 @@ #include -using namespace Bootstrap; +using namespace Board; using namespace Genode; struct Buffer diff --git a/repos/base-hw/src/bootstrap/platform.h b/repos/base-hw/src/bootstrap/platform.h index 35ad183d21..75de0185e3 100644 --- a/repos/base-hw/src/bootstrap/platform.h +++ b/repos/base-hw/src/bootstrap/platform.h @@ -40,7 +40,7 @@ class Bootstrap::Platform { private: - struct Board : Genode::Board_base + struct Board { Memory_region_array early_ram_regions; Memory_region_array late_ram_regions; diff --git a/repos/base-hw/src/bootstrap/spec/arm/cortex_a9_mmu.cc b/repos/base-hw/src/bootstrap/spec/arm/cortex_a9_mmu.cc index 8d0df51425..53b7f8de75 100644 --- a/repos/base-hw/src/bootstrap/spec/arm/cortex_a9_mmu.cc +++ b/repos/base-hw/src/bootstrap/spec/arm/cortex_a9_mmu.cc @@ -66,9 +66,7 @@ struct Scu : Genode::Mmio struct Cpu3_way : Bitfield<12, 4> { }; }; - using Memory_map = Hw::Cpu_memory_map; - - Scu() : Genode::Mmio(Memory_map::SCU_MMIO_BASE) { } + Scu() : Genode::Mmio(Board::Cpu_mmio::SCU_MMIO_BASE) { } void invalidate() { @@ -128,7 +126,7 @@ void Bootstrap::Platform::enable_mmu() if (primary) { Scu scu; scu.invalidate(); - Bootstrap::L2_cache l2_cache(Board::PL310_MMIO_BASE); + ::Board::L2_cache l2_cache(::Board::PL310_MMIO_BASE); l2_cache.disable(); l2_cache.invalidate(); scu.enable(Cpu::errata(Cpu::ARM_764369)); @@ -146,7 +144,7 @@ void Bootstrap::Platform::enable_mmu() data_cache_enabled.wait_for(NR_OF_CPUS); if (primary) { - Bootstrap::L2_cache l2_cache(board.core_mmio.virt_addr(Board::PL310_MMIO_BASE)); + ::Board::L2_cache l2_cache(board.core_mmio.virt_addr(::Board::PL310_MMIO_BASE)); l2_cache.enable(); } diff --git a/repos/base-hw/src/bootstrap/spec/arm/imx_tzic.cc b/repos/base-hw/src/bootstrap/spec/arm/imx_tzic.cc index d160f01b4b..019acc3f62 100644 --- a/repos/base-hw/src/bootstrap/spec/arm/imx_tzic.cc +++ b/repos/base-hw/src/bootstrap/spec/arm/imx_tzic.cc @@ -13,11 +13,11 @@ #include -Hw::Pic::Pic() : Genode::Mmio(Genode::Board_base::IRQ_CONTROLLER_BASE) +Hw::Pic::Pic() : Genode::Mmio(Board::IRQ_CONTROLLER_BASE) { for (unsigned i = 0; i < NR_OF_IRQ; i++) { - write(!Bootstrap::secure_irq(i), i); - if (!Bootstrap::secure_irq(i)) write(0x80, i); + write(!Board::secure_irq(i), i); + if (!Board::secure_irq(i)) write(0x80, i); write(1, i); } write(0xff); diff --git a/repos/base-hw/src/bootstrap/spec/arm/pic.cc b/repos/base-hw/src/bootstrap/spec/arm/pic.cc index c3eee962e3..80b83ea85b 100644 --- a/repos/base-hw/src/bootstrap/spec/arm/pic.cc +++ b/repos/base-hw/src/bootstrap/spec/arm/pic.cc @@ -14,7 +14,6 @@ #include #include -using Memory_map = Hw::Cpu_memory_map; using Bootstrap::Platform; void Bootstrap::Pic::init_cpu_local() @@ -31,8 +30,8 @@ void Bootstrap::Pic::init_cpu_local() Hw::Pic::Pic() -: _distr(Memory_map::IRQ_CONTROLLER_DISTR_BASE), - _cpui (Memory_map::IRQ_CONTROLLER_CPU_BASE), +: _distr(Board::Cpu_mmio::IRQ_CONTROLLER_DISTR_BASE), + _cpui (Board::Cpu_mmio::IRQ_CONTROLLER_CPU_BASE), _last_iar(Cpu_interface::Iar::Irq_id::bits(spurious_id)), _max_irq(_distr.max_irq()) { diff --git a/repos/base-hw/src/bootstrap/spec/arndale/board.h b/repos/base-hw/src/bootstrap/spec/arndale/board.h index 6d323f6351..aa86cf561a 100644 --- a/repos/base-hw/src/bootstrap/spec/arndale/board.h +++ b/repos/base-hw/src/bootstrap/spec/arndale/board.h @@ -14,23 +14,23 @@ #ifndef _SRC__BOOTSTRAP__SPEC__ARNDALE__BOARD_H_ #define _SRC__BOOTSTRAP__SPEC__ARNDALE__BOARD_H_ -#include -#include +#include +#include #include #include #include #include -namespace Bootstrap { - class L2_cache; +namespace Board { - using Serial = Genode::Exynos_uart_base; + using namespace Arndale; + using Cpu_mmio = Hw::Cortex_a15_mmio; + using Serial = Genode::Exynos_uart; enum { - UART_BASE = Genode::Board_base::UART_2_MMIO_BASE, - UART_CLOCK = Genode::Board_base::UART_2_CLOCK, - CPU_MMIO_BASE = Genode::Board_base::IRQ_CONTROLLER_BASE, + UART_BASE = UART_2_MMIO_BASE, + UART_CLOCK = UART_2_CLOCK, }; } diff --git a/repos/base-hw/src/bootstrap/spec/arndale/pic.cc b/repos/base-hw/src/bootstrap/spec/arndale/pic.cc index a2dafa095d..7eb3f88cf5 100644 --- a/repos/base-hw/src/bootstrap/spec/arndale/pic.cc +++ b/repos/base-hw/src/bootstrap/spec/arndale/pic.cc @@ -15,7 +15,6 @@ #include #include -using Memory_map = Hw::Cpu_memory_map; using Bootstrap::Platform; void Bootstrap::Pic::init_cpu_local() @@ -42,8 +41,8 @@ void Bootstrap::Pic::init_cpu_local() Hw::Pic::Pic() -: _distr(Memory_map::IRQ_CONTROLLER_DISTR_BASE), - _cpui(Memory_map::IRQ_CONTROLLER_CPU_BASE), +: _distr(Board::Cpu_mmio::IRQ_CONTROLLER_DISTR_BASE), + _cpui (Board::Cpu_mmio::IRQ_CONTROLLER_CPU_BASE), _last_iar(Cpu_interface::Iar::Irq_id::bits(spurious_id)), _max_irq(_distr.max_irq()) { diff --git a/repos/base-hw/src/bootstrap/spec/arndale/platform.cc b/repos/base-hw/src/bootstrap/spec/arndale/platform.cc index 5a91785ac0..cf3624a1fa 100644 --- a/repos/base-hw/src/bootstrap/spec/arndale/platform.cc +++ b/repos/base-hw/src/bootstrap/spec/arndale/platform.cc @@ -16,6 +16,8 @@ extern "C" void * _start_setup_stack; /* entrypoint for non-boot CPUs */ static unsigned char hyp_mode_stack[1024]; /* hypervisor mode's kernel stack */ +using namespace Board; + Bootstrap::Platform::Board::Board() : early_ram_regions(Memory_region { RAM_0_BASE, RAM_0_SIZE }), core_mmio(Memory_region { IRQ_CONTROLLER_BASE, IRQ_CONTROLLER_SIZE }, @@ -176,6 +178,6 @@ void Bootstrap::Platform::enable_mmu() void Bootstrap::Cpu::wake_up_all_cpus(void * const ip) { - *(void * volatile *)Genode::Board_base::IRAM_BASE = ip; + *(void * volatile *)Board::IRAM_BASE = ip; asm volatile("dsb; sev;"); } diff --git a/repos/base-hw/src/bootstrap/spec/imx53_qsb/board.h b/repos/base-hw/src/bootstrap/spec/imx53_qsb/board.h index 37ee9ce6ae..c64cad5324 100644 --- a/repos/base-hw/src/bootstrap/spec/imx53_qsb/board.h +++ b/repos/base-hw/src/bootstrap/spec/imx53_qsb/board.h @@ -14,23 +14,25 @@ #ifndef _SRC__BOOTSTRAP__SPEC__IMX53_QSB__BOARD_H_ #define _SRC__BOOTSTRAP__SPEC__IMX53_QSB__BOARD_H_ -#include -#include +#include +#include #include #include #include -namespace Bootstrap { - using Hw::Pic; - using Serial = Genode::Imx_uart_base; +namespace Board { + using namespace Imx53_qsb; + using Serial = Genode::Imx_uart; enum { - UART_BASE = Genode::Board_base::UART_1_MMIO_BASE, + UART_BASE = UART_1_MMIO_BASE, UART_CLOCK = 0, /* ignored value */ }; bool secure_irq(unsigned irq); } +namespace Bootstrap { using Hw::Pic; } + #endif /* _SRC__BOOTSTRAP__SPEC__IMX53_QSB__BOARD_H_ */ diff --git a/repos/base-hw/src/bootstrap/spec/imx53_qsb/platform.cc b/repos/base-hw/src/bootstrap/spec/imx53_qsb/platform.cc index 8e7945a4ec..84aad353a2 100644 --- a/repos/base-hw/src/bootstrap/spec/imx53_qsb/platform.cc +++ b/repos/base-hw/src/bootstrap/spec/imx53_qsb/platform.cc @@ -14,7 +14,9 @@ #include #include -bool Bootstrap::secure_irq(unsigned i) { return true; } +using namespace Board; + +bool Board::secure_irq(unsigned i) { return true; } Bootstrap::Platform::Board::Board() diff --git a/repos/base-hw/src/bootstrap/spec/imx53_qsb/platform_trustzone.cc b/repos/base-hw/src/bootstrap/spec/imx53_qsb/platform_trustzone.cc index bec4b397e1..694d67bf52 100644 --- a/repos/base-hw/src/bootstrap/spec/imx53_qsb/platform_trustzone.cc +++ b/repos/base-hw/src/bootstrap/spec/imx53_qsb/platform_trustzone.cc @@ -16,16 +16,16 @@ #include #include -bool Bootstrap::secure_irq(unsigned i) -{ - using Board = Genode::Board_base; +using namespace Board; - if (i == Board::EPIT_1_IRQ) return true; - if (i == Board::EPIT_2_IRQ) return true; - if (i == Board::I2C_2_IRQ) return true; - if (i == Board::I2C_3_IRQ) return true; - if (i >= Board::GPIO1_IRQL && i <= Board::GPIO4_IRQH) return true; - if (i >= Board::GPIO5_IRQL && i <= Board::GPIO7_IRQH) return true; +bool Board::secure_irq(unsigned i) +{ + if (i == EPIT_1_IRQ) return true; + if (i == EPIT_2_IRQ) return true; + if (i == I2C_2_IRQ) return true; + if (i == I2C_3_IRQ) return true; + if (i >= GPIO1_IRQL && i <= GPIO4_IRQH) return true; + if (i >= GPIO5_IRQL && i <= GPIO7_IRQH) return true; return false; } @@ -51,5 +51,5 @@ Bootstrap::Platform::Board::Board() Cpu::Nsacr::write(v); /* configure central security unit */ - Csu csu(Genode::Board_base::CSU_BASE, false, true, false, true); + Csu csu(CSU_BASE, false, true, false, true); } diff --git a/repos/base-hw/src/bootstrap/spec/odroid_xu/board.h b/repos/base-hw/src/bootstrap/spec/odroid_xu/board.h index 33e843fb02..130ed639d0 100644 --- a/repos/base-hw/src/bootstrap/spec/odroid_xu/board.h +++ b/repos/base-hw/src/bootstrap/spec/odroid_xu/board.h @@ -14,23 +14,23 @@ #ifndef _SRC__BOOTSTRAP__SPEC__ODROID_XU__BOARD_H_ #define _SRC__BOOTSTRAP__SPEC__ODROID_XU__BOARD_H_ -#include -#include +#include +#include #include #include #include #include -namespace Bootstrap { - class L2_cache; +namespace Board { - using Serial = Genode::Exynos_uart_base; + using namespace Odroid_xu; + using Cpu_mmio = Hw::Cortex_a15_mmio; + using Serial = Genode::Exynos_uart; enum { - UART_BASE = Genode::Board_base::UART_2_MMIO_BASE, - UART_CLOCK = Genode::Board_base::UART_2_CLOCK, - CPU_MMIO_BASE = Genode::Board_base::IRQ_CONTROLLER_BASE, + UART_BASE = UART_2_MMIO_BASE, + UART_CLOCK = UART_2_CLOCK, }; } diff --git a/repos/base-hw/src/bootstrap/spec/odroid_xu/platform.cc b/repos/base-hw/src/bootstrap/spec/odroid_xu/platform.cc index ce0fea0024..7436a70064 100644 --- a/repos/base-hw/src/bootstrap/spec/odroid_xu/platform.cc +++ b/repos/base-hw/src/bootstrap/spec/odroid_xu/platform.cc @@ -13,6 +13,8 @@ #include +using namespace Board; + Bootstrap::Platform::Board::Board() : early_ram_regions(Memory_region { RAM_0_BASE, RAM_0_SIZE }), core_mmio(Memory_region { IRQ_CONTROLLER_BASE, IRQ_CONTROLLER_SIZE }, diff --git a/repos/base-hw/src/bootstrap/spec/panda/board.h b/repos/base-hw/src/bootstrap/spec/panda/board.h index 1a8a285997..ada9a5a3fa 100644 --- a/repos/base-hw/src/bootstrap/spec/panda/board.h +++ b/repos/base-hw/src/bootstrap/spec/panda/board.h @@ -14,8 +14,8 @@ #ifndef _SRC__BOOTSTRAP__SPEC__PANDA__BOARD_H_ #define _SRC__BOOTSTRAP__SPEC__PANDA__BOARD_H_ -#include -#include +#include +#include #include #include #include @@ -24,20 +24,21 @@ #include #include -namespace Bootstrap { +namespace Board { class L2_cache; - using Serial = Genode::Tl16c750_base; + using namespace Panda; + using Cpu_mmio = Hw::Cortex_a9_mmio; + using Serial = Genode::Tl16c750_uart; enum { - UART_BASE = Genode::Board_base::TL16C750_3_MMIO_BASE, - UART_CLOCK = Genode::Board_base::TL16C750_CLOCK, - CPU_MMIO_BASE = Genode::Board_base::CORTEX_A9_PRIVATE_MEM_BASE, + UART_BASE = TL16C750_3_MMIO_BASE, + UART_CLOCK = TL16C750_CLOCK, }; - - struct Actlr; } +namespace Bootstrap { struct Actlr; } + struct Bootstrap::Actlr { @@ -46,7 +47,7 @@ struct Bootstrap::Actlr }; -class Bootstrap::L2_cache : Hw::Pl310 +class Board::L2_cache : Hw::Pl310 { private: diff --git a/repos/base-hw/src/bootstrap/spec/panda/platform.cc b/repos/base-hw/src/bootstrap/spec/panda/platform.cc index 7162ea801d..be386ff471 100644 --- a/repos/base-hw/src/bootstrap/spec/panda/platform.cc +++ b/repos/base-hw/src/bootstrap/spec/panda/platform.cc @@ -13,6 +13,8 @@ #include +using namespace Board; + Bootstrap::Platform::Board::Board() : early_ram_regions(Memory_region { RAM_0_BASE, RAM_0_SIZE }), core_mmio(Memory_region { CORTEX_A9_PRIVATE_MEM_BASE, @@ -36,8 +38,7 @@ void Bootstrap::Cpu::wake_up_all_cpus(void * const ip) struct Aux_core_boot_1 : Register<0x804, 32> { }; - Wakeup_generator(void * const ip) - : Mmio(Genode::Board_base::CORTEX_A9_WUGEN_MMIO_BASE) + Wakeup_generator(void * const ip) : Mmio(CORTEX_A9_WUGEN_MMIO_BASE) { write((addr_t)ip); write(1); diff --git a/repos/base-hw/src/bootstrap/spec/pbxa9/board.h b/repos/base-hw/src/bootstrap/spec/pbxa9/board.h index 218e13cc5b..89bbed1b3e 100644 --- a/repos/base-hw/src/bootstrap/spec/pbxa9/board.h +++ b/repos/base-hw/src/bootstrap/spec/pbxa9/board.h @@ -14,8 +14,8 @@ #ifndef _SRC__BOOTSTRAP__SPEC__PBXA9__BOARD_H_ #define _SRC__BOOTSTRAP__SPEC__PBXA9__BOARD_H_ -#include -#include +#include +#include #include #include @@ -24,14 +24,17 @@ #include #include -namespace Bootstrap { +namespace Board { + + using namespace Pbxa9; + using L2_cache = Hw::Pl310; - using Serial = Genode::Pl011_base; + using Cpu_mmio = Hw::Cortex_a9_mmio; + using Serial = Genode::Pl011_uart; enum { - UART_BASE = Genode::Board_base::PL011_0_MMIO_BASE, - UART_CLOCK = Genode::Board_base::PL011_0_CLOCK, - CPU_MMIO_BASE = Genode::Board_base::CORTEX_A9_PRIVATE_MEM_BASE, + UART_BASE = PL011_0_MMIO_BASE, + UART_CLOCK = PL011_0_CLOCK, }; } diff --git a/repos/base-hw/src/bootstrap/spec/pbxa9/platform.cc b/repos/base-hw/src/bootstrap/spec/pbxa9/platform.cc index 6af10c12d0..07da434d40 100644 --- a/repos/base-hw/src/bootstrap/spec/pbxa9/platform.cc +++ b/repos/base-hw/src/bootstrap/spec/pbxa9/platform.cc @@ -14,15 +14,17 @@ /* bootstrap includes */ #include +using namespace Board; + Bootstrap::Platform::Board::Board() : early_ram_regions(Memory_region { RAM_0_BASE, RAM_0_SIZE }, Memory_region { RAM_1_BASE, RAM_1_SIZE }), - core_mmio(Memory_region { Board::CORTEX_A9_PRIVATE_MEM_BASE, - Board::CORTEX_A9_PRIVATE_MEM_SIZE }, - Memory_region { Board::PL011_0_MMIO_BASE, - Board::PL011_0_MMIO_SIZE }, - Memory_region { Board::PL310_MMIO_BASE, - Board::PL310_MMIO_SIZE }) { } + core_mmio(Memory_region { CORTEX_A9_PRIVATE_MEM_BASE, + CORTEX_A9_PRIVATE_MEM_SIZE }, + Memory_region { PL011_0_MMIO_BASE, + PL011_0_MMIO_SIZE }, + Memory_region { PL310_MMIO_BASE, + PL310_MMIO_SIZE }) { } bool Bootstrap::Cpu::errata(Bootstrap::Cpu::Errata err) { @@ -42,8 +44,7 @@ void Bootstrap::Cpu::wake_up_all_cpus(void * const ip) struct Flagsset : Register<0x30, 32> { }; struct Flagsclr : Register<0x34, 32> { }; - System_control(void * const ip) - : Mmio(Genode::Board_base::SYSTEM_CONTROL_MMIO_BASE) + System_control(void * const ip) : Mmio(SYSTEM_CONTROL_MMIO_BASE) { write(~0UL); write(reinterpret_cast(ip)); diff --git a/repos/base-hw/src/bootstrap/spec/riscv/board.h b/repos/base-hw/src/bootstrap/spec/riscv/board.h index 760d5605dd..37aeee2a30 100644 --- a/repos/base-hw/src/bootstrap/spec/riscv/board.h +++ b/repos/base-hw/src/bootstrap/spec/riscv/board.h @@ -17,12 +17,12 @@ #include #include -namespace Genode { struct Board_base {}; } - namespace Bootstrap { struct Cpu {}; struct Pic {}; +} +namespace Board { enum { UART_BASE, UART_CLOCK }; struct Serial : Hw::Riscv_uart { Serial(unsigned, unsigned, unsigned) {} }; diff --git a/repos/base-hw/src/bootstrap/spec/rpi/board.h b/repos/base-hw/src/bootstrap/spec/rpi/board.h index efb1bdfbde..37d0e075a6 100644 --- a/repos/base-hw/src/bootstrap/spec/rpi/board.h +++ b/repos/base-hw/src/bootstrap/spec/rpi/board.h @@ -14,23 +14,23 @@ #ifndef _SRC__BOOTSTRAP__SPEC__RPI__BOARD_H_ #define _SRC__BOOTSTRAP__SPEC__RPI__BOARD_H_ -#include -#include +#include +#include #include #include -namespace Bootstrap { - using Serial = Genode::Pl011_base; +namespace Board { + using Serial = Genode::Pl011_uart; enum { - UART_BASE = Genode::Board_base::PL011_0_MMIO_BASE, - UART_CLOCK = Genode::Board_base::PL011_0_CLOCK, + UART_BASE = Rpi::PL011_0_MMIO_BASE, + UART_CLOCK = Rpi::PL011_0_CLOCK, }; - - struct Pic {}; } +namespace Bootstrap { struct Pic {}; } + constexpr unsigned Hw::Page_table::Descriptor_base::_device_tex() { return 0; } diff --git a/repos/base-hw/src/bootstrap/spec/rpi/platform.cc b/repos/base-hw/src/bootstrap/spec/rpi/platform.cc index 5ab454953d..85ec82b5f1 100644 --- a/repos/base-hw/src/bootstrap/spec/rpi/platform.cc +++ b/repos/base-hw/src/bootstrap/spec/rpi/platform.cc @@ -15,6 +15,8 @@ #include #include +using namespace Rpi; + /** * Leave out the first page (being 0x0) from bootstraps RAM allocator, * some code does not feel happy with addresses being zero diff --git a/repos/base-hw/src/bootstrap/spec/usb_armory/board.h b/repos/base-hw/src/bootstrap/spec/usb_armory/board.h index 5bcd50db77..9dc4b41f4d 100644 --- a/repos/base-hw/src/bootstrap/spec/usb_armory/board.h +++ b/repos/base-hw/src/bootstrap/spec/usb_armory/board.h @@ -14,19 +14,21 @@ #ifndef _SRC__BOOTSTRAP__SPEC__USB_ARMORY__BOARD_H_ #define _SRC__BOOTSTRAP__SPEC__USB_ARMORY__BOARD_H_ -#include -#include +#include +#include #include #include #include -namespace Bootstrap { - using Hw::Pic; - using Serial = Genode::Imx_uart_base; +namespace Bootstrap { using Hw::Pic; } + +namespace Board { + using namespace Usb_armory; + using Serial = Genode::Imx_uart; enum { - UART_BASE = Genode::Board_base::UART_1_MMIO_BASE, + UART_BASE = UART_1_MMIO_BASE, UART_CLOCK = 0, /* ignored value */ }; diff --git a/repos/base-hw/src/bootstrap/spec/usb_armory/platform.cc b/repos/base-hw/src/bootstrap/spec/usb_armory/platform.cc index fb8fcd013f..40960b1937 100644 --- a/repos/base-hw/src/bootstrap/spec/usb_armory/platform.cc +++ b/repos/base-hw/src/bootstrap/spec/usb_armory/platform.cc @@ -16,13 +16,13 @@ #include #include -bool Bootstrap::secure_irq(unsigned i) -{ - using Board = Genode::Board_base; +using namespace Board; - if (i == Board::EPIT_1_IRQ) return true; - if (i == Board::EPIT_2_IRQ) return true; - if (i == Board::SDHC_IRQ) return true; +bool Board::secure_irq(unsigned i) +{ + if (i == EPIT_1_IRQ) return true; + if (i == EPIT_2_IRQ) return true; + if (i == SDHC_IRQ) return true; return false; } @@ -48,5 +48,5 @@ Bootstrap::Platform::Board::Board() Cpu::Nsacr::write(v); /* configure central security unit */ - Csu csu(Genode::Board_base::CSU_BASE, true, false, true, false); + Csu csu(CSU_BASE, true, false, true, false); } diff --git a/repos/base-hw/src/bootstrap/spec/wand_quad/board.h b/repos/base-hw/src/bootstrap/spec/wand_quad/board.h index 218926ec39..3a6d06d6fd 100644 --- a/repos/base-hw/src/bootstrap/spec/wand_quad/board.h +++ b/repos/base-hw/src/bootstrap/spec/wand_quad/board.h @@ -14,8 +14,8 @@ #ifndef _SRC__BOOTSTRAP__SPEC__WAND_QUAD__BOARD_H_ #define _SRC__BOOTSTRAP__SPEC__WAND_QUAD__BOARD_H_ -#include -#include +#include +#include #include #include @@ -24,14 +24,17 @@ #include #include -namespace Bootstrap { +namespace Board { + + using namespace Wand_quad; + using L2_cache = Hw::Pl310; - using Serial = Genode::Imx_uart_base; + using Cpu_mmio = Hw::Cortex_a9_mmio; + using Serial = Genode::Imx_uart; enum { - UART_BASE = Genode::Board_base::UART_1_MMIO_BASE, + UART_BASE = UART_1_MMIO_BASE, UART_CLOCK = 0, /* dummy value, not used */ - CPU_MMIO_BASE = Genode::Board_base::CORTEX_A9_PRIVATE_MEM_BASE, }; } diff --git a/repos/base-hw/src/bootstrap/spec/wand_quad/platform.cc b/repos/base-hw/src/bootstrap/spec/wand_quad/platform.cc index 0f4d5ccb8f..db4318ac21 100644 --- a/repos/base-hw/src/bootstrap/spec/wand_quad/platform.cc +++ b/repos/base-hw/src/bootstrap/spec/wand_quad/platform.cc @@ -16,6 +16,8 @@ #include #include +using namespace Board; + Bootstrap::Platform::Board::Board() : early_ram_regions(Memory_region { RAM0_BASE, RAM0_SIZE }), core_mmio(Memory_region { UART_1_MMIO_BASE, @@ -52,8 +54,7 @@ void Bootstrap::Cpu::wake_up_all_cpus(void * const entry) struct Gpr5 : Register<0x30, 32> {}; /* ep core 2 */ struct Gpr7 : Register<0x38, 32> {}; /* ep core 3 */ - Src(void * const entry) - : Genode::Mmio(Genode::Board_base::SRC_MMIO_BASE) + Src(void * const entry) : Genode::Mmio(SRC_MMIO_BASE) { write((Gpr3::access_t)entry); write((Gpr5::access_t)entry); diff --git a/repos/base-hw/src/bootstrap/spec/x86_64/board.h b/repos/base-hw/src/bootstrap/spec/x86_64/board.h index eba952cc83..8f54f66453 100644 --- a/repos/base-hw/src/bootstrap/spec/x86_64/board.h +++ b/repos/base-hw/src/bootstrap/spec/x86_64/board.h @@ -14,26 +14,24 @@ #ifndef _SRC__BOOTSTRAP__SPEC__X86_64__BOARD_H_ #define _SRC__BOOTSTRAP__SPEC__X86_64__BOARD_H_ -#include +#include #include #include #include -namespace Genode { struct Board_base {}; } - namespace Bootstrap { - - struct Serial; struct Pic {}; - using Cpu = Hw::X86_64_cpu; +} +namespace Board { + struct Serial; enum Dummies { UART_BASE, UART_CLOCK }; } -struct Bootstrap::Serial : Genode::X86_uart_base +struct Board::Serial : Genode::X86_uart { Serial(Genode::addr_t, Genode::size_t, unsigned); }; diff --git a/repos/base-hw/src/bootstrap/spec/x86_64/platform.cc b/repos/base-hw/src/bootstrap/spec/x86_64/platform.cc index efa222dce7..61c300499c 100644 --- a/repos/base-hw/src/bootstrap/spec/x86_64/platform.cc +++ b/repos/base-hw/src/bootstrap/spec/x86_64/platform.cc @@ -74,5 +74,5 @@ void Bootstrap::Platform::enable_mmu() { addr_t Bios_data_area::_mmio_base_virt() { return 0x1ff000; } -Bootstrap::Serial::Serial(addr_t, size_t, unsigned baudrate) -:X86_uart_base(Bios_data_area::singleton()->serial_port(), 0, baudrate) {} +Board::Serial::Serial(addr_t, size_t, unsigned baudrate) +:X86_uart(Bios_data_area::singleton()->serial_port(), 0, baudrate) {} diff --git a/repos/base-hw/src/bootstrap/spec/x86_64/platform_muen.cc b/repos/base-hw/src/bootstrap/spec/x86_64/platform_muen.cc index 7178462c9f..535baad111 100644 --- a/repos/base-hw/src/bootstrap/spec/x86_64/platform_muen.cc +++ b/repos/base-hw/src/bootstrap/spec/x86_64/platform_muen.cc @@ -46,5 +46,5 @@ void Bootstrap::Platform::enable_mmu() { Cpu::Cr3::write(Cpu::Cr3::Pdb::masked((addr_t)core_pd->table_base)); } -Bootstrap::Serial::Serial(addr_t, size_t, unsigned baudrate) -:X86_uart_base(COM1_PORT, 0, baudrate) {} +Board::Serial::Serial(Genode::addr_t, Genode::size_t, unsigned baudrate) +:X86_uart(COM1_PORT, 0, baudrate) {} diff --git a/repos/base-hw/src/bootstrap/spec/zynq/board.h b/repos/base-hw/src/bootstrap/spec/zynq/board.h index f3908ccc65..26d4eb65f2 100644 --- a/repos/base-hw/src/bootstrap/spec/zynq/board.h +++ b/repos/base-hw/src/bootstrap/spec/zynq/board.h @@ -14,8 +14,8 @@ #ifndef _SRC__BOOTSTRAP__SPEC__ZYNQ__BOARD_H_ #define _SRC__BOOTSTRAP__SPEC__ZYNQ__BOARD_H_ -#include -#include +#include +#include #include #include @@ -24,14 +24,14 @@ #include #include -namespace Bootstrap { +namespace Board { + using namespace Zynq_qemu; using L2_cache = Hw::Pl310; - using Serial = Genode::Xilinx_uartps_base; + using Cpu_mmio = Hw::Cortex_a9_mmio; + using Serial = Genode::Xilinx_uart; enum { - UART_BASE = Genode::Board_base::UART_0_MMIO_BASE, - UART_CLOCK = Genode::Board_base::UART_CLOCK, - CPU_MMIO_BASE = Genode::Board_base::CORTEX_A9_PRIVATE_MEM_BASE, + UART_BASE = UART_0_MMIO_BASE, }; } diff --git a/repos/base-hw/src/bootstrap/spec/zynq/platform.cc b/repos/base-hw/src/bootstrap/spec/zynq/platform.cc index a88053eb30..19a8b15c0a 100644 --- a/repos/base-hw/src/bootstrap/spec/zynq/platform.cc +++ b/repos/base-hw/src/bootstrap/spec/zynq/platform.cc @@ -15,6 +15,8 @@ /* core includes */ #include +using namespace Board; + Bootstrap::Platform::Board::Board() : early_ram_regions(Memory_region { RAM_0_BASE + 0x1000, RAM_0_SIZE - 0x1000 }), diff --git a/repos/base-hw/src/core/kernel/init.cc b/repos/base-hw/src/core/kernel/init.cc index 260451fee3..1428a7b183 100644 --- a/repos/base-hw/src/core/kernel/init.cc +++ b/repos/base-hw/src/core/kernel/init.cc @@ -34,10 +34,6 @@ Pd * Kernel::core_pd() { Pic * Kernel::pic() { return unmanaged_singleton(); } -Genode::Board & Kernel::board() { - return *unmanaged_singleton(); } - - extern "C" void _start() __attribute__((section(".text.crt0"))); /** diff --git a/repos/base-hw/src/core/kernel/kernel.h b/repos/base-hw/src/core/kernel/kernel.h index a134e486ae..56e30fe448 100644 --- a/repos/base-hw/src/core/kernel/kernel.h +++ b/repos/base-hw/src/core/kernel/kernel.h @@ -16,7 +16,6 @@ #define _CORE__KERNEL__KERNEL_H_ #include -#include /** * Main routine of every kernel pass @@ -28,9 +27,8 @@ namespace Kernel { class Pd; - Pd * core_pd(); - Pic * pic(); - Genode::Board & board(); + Pd * core_pd(); + Pic * pic(); } #endif /* _CORE__KERNEL__KERNEL_H_ */ diff --git a/repos/base-hw/src/core/spec/arm/cpu_support.h b/repos/base-hw/src/core/spec/arm/cpu_support.h index d0112e61e8..210ba7eca0 100644 --- a/repos/base-hw/src/core/spec/arm/cpu_support.h +++ b/repos/base-hw/src/core/spec/arm/cpu_support.h @@ -12,8 +12,8 @@ * under the terms of the GNU Affero General Public License version 3. */ -#ifndef _CORE__SPEC__ARM__CPU_H_ -#define _CORE__SPEC__ARM__CPU_H_ +#ifndef _CORE__SPEC__ARM__CPU_SUPPORT_H_ +#define _CORE__SPEC__ARM__CPU_SUPPORT_H_ /* Genode includes */ #include @@ -256,4 +256,4 @@ struct Genode::Arm_cpu : public Hw::Arm_cpu static unsigned primary_id() { return 0; } }; -#endif /* _CORE__SPEC__ARM__CPU_H_ */ +#endif /* _CORE__SPEC__ARM__CPU_SUPPORT_H_ */ diff --git a/repos/base-hw/src/core/spec/arm_gic/pic.cc b/repos/base-hw/src/core/spec/arm_gic/pic.cc index 810f5c3a64..ae71e3723f 100644 --- a/repos/base-hw/src/core/spec/arm_gic/pic.cc +++ b/repos/base-hw/src/core/spec/arm_gic/pic.cc @@ -19,7 +19,7 @@ using namespace Genode; Hw::Pic::Pic() -: _distr(Platform::mmio_to_virt(Board::IRQ_CONTROLLER_DISTR_BASE)), - _cpui (Platform::mmio_to_virt(Board::IRQ_CONTROLLER_CPU_BASE)), +: _distr(Platform::mmio_to_virt(Board::Cpu_mmio::IRQ_CONTROLLER_DISTR_BASE)), + _cpui (Platform::mmio_to_virt(Board::Cpu_mmio::IRQ_CONTROLLER_CPU_BASE)), _last_iar(Cpu_interface::Iar::Irq_id::bits(spurious_id)), _max_irq(_distr.max_irq()) { } diff --git a/repos/base-hw/src/core/spec/arm_v7/virtualization/kernel/vm.cc b/repos/base-hw/src/core/spec/arm_v7/virtualization/kernel/vm.cc index ae53370a03..826c59c416 100644 --- a/repos/base-hw/src/core/spec/arm_v7/virtualization/kernel/vm.cc +++ b/repos/base-hw/src/core/spec/arm_v7/virtualization/kernel/vm.cc @@ -73,10 +73,10 @@ struct Kernel::Virtual_pic : Genode::Mmio template struct Gich_lr : Register<0x100 + SLOT*4, 32> { }; - Vm_irq irq = Genode::Board::VT_MAINTAINANCE_IRQ; + Vm_irq irq = Board::VT_MAINTAINANCE_IRQ; Virtual_pic() - : Genode::Mmio(Genode::Platform::mmio_to_virt(Genode::Board::IRQ_CONTROLLER_VT_CTRL_BASE)) { } + : Genode::Mmio(Genode::Platform::mmio_to_virt(Board::IRQ_CONTROLLER_VT_CTRL_BASE)) { } static Virtual_pic& pic() { @@ -124,7 +124,7 @@ struct Kernel::Virtual_pic : Genode::Mmio struct Kernel::Virtual_timer { - Vm_irq irq = Genode::Board::VT_TIMER_IRQ; + Vm_irq irq = Board::VT_TIMER_IRQ; /** * Return virtual timer object of currently executing cpu @@ -213,7 +213,7 @@ void Kernel::Vm::exception(unsigned const cpu_id) switch(_state->cpu_exception) { case Genode::Cpu_state::INTERRUPT_REQUEST: case Genode::Cpu_state::FAST_INTERRUPT_REQUEST: - _state->gic_irq = Genode::Board_base::VT_MAINTAINANCE_IRQ; + _state->gic_irq = Board::VT_MAINTAINANCE_IRQ; _interrupt(cpu_id); break; default: diff --git a/repos/base-hw/src/core/spec/arndale/board.h b/repos/base-hw/src/core/spec/arndale/board.h new file mode 100644 index 0000000000..e279b43bfb --- /dev/null +++ b/repos/base-hw/src/core/spec/arndale/board.h @@ -0,0 +1,29 @@ +/* + * \brief Board driver for core + * \author Stefan Kalkowski + * \date 2017-04-27 + */ + +/* + * Copyright (C) 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__ARNDALE__BOARD_H_ +#define _CORE__SPEC__ARNDALE__BOARD_H_ + +/* base includes */ +#include + +#include + +namespace Board { + using namespace Arndale; + using Cpu_mmio = Hw::Cortex_a15_mmio; + + static constexpr bool SMP = true; +} + +#endif /* _CORE__SPEC__ARNDALE__BOARD_H_ */ diff --git a/repos/base-hw/src/core/spec/arndale/platform_services.cc b/repos/base-hw/src/core/spec/arndale/platform_services.cc index 4ce0a0f533..e7782f4c62 100644 --- a/repos/base-hw/src/core/spec/arndale/platform_services.cc +++ b/repos/base-hw/src/core/spec/arndale/platform_services.cc @@ -16,6 +16,7 @@ #include /* core includes */ +#include #include #include /* for 'Core_service' type */ #include diff --git a/repos/base-hw/src/core/spec/cortex_a15/board_support.h b/repos/base-hw/src/core/spec/cortex_a15/board_support.h deleted file mode 100644 index 68f0ba65d7..0000000000 --- a/repos/base-hw/src/core/spec/cortex_a15/board_support.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * \brief Board driver definitions common to Cortex A15 SoCs - * \author Stefan Kalkowski - * \date 2015-02-09 - */ - -/* - * 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__BOARD_SUPPORT_H_ -#define _CORE__SPEC__CORTEX_A15__BOARD_SUPPORT_H_ - -/* core includes */ -#include - -namespace Cortex_a15 -{ - class Board_base : public Genode::Board_base - { - private: - - using Base = Genode::Board_base; - - public: - - enum - { - /* interrupt controller */ - IRQ_CONTROLLER_DISTR_BASE = Base::IRQ_CONTROLLER_BASE + 0x1000, - IRQ_CONTROLLER_DISTR_SIZE = 0x1000, - IRQ_CONTROLLER_CPU_BASE = Base::IRQ_CONTROLLER_BASE + 0x2000, - IRQ_CONTROLLER_CPU_SIZE = 0x2000, - }; - }; -} - -#endif /* _CORE__SPEC__CORTEX_A15__BOARD_SUPPORT_H_ */ diff --git a/repos/base-hw/src/core/spec/cortex_a9/board.cc b/repos/base-hw/src/core/spec/cortex_a9/board.cc index 9f5eb9315b..20ee1dfc1d 100644 --- a/repos/base-hw/src/core/spec/cortex_a9/board.cc +++ b/repos/base-hw/src/core/spec/cortex_a9/board.cc @@ -14,7 +14,10 @@ #include #include -using namespace Genode; +Board::L2_cache & Board::l2_cache() +{ + using namespace Genode; -Cortex_a9::Board::Board() -: _l2_cache(Platform::mmio_to_virt(Board_base::PL310_MMIO_BASE)) {} + static L2_cache cache(Platform::mmio_to_virt(Board::PL310_MMIO_BASE)); + return cache; +} diff --git a/repos/base-hw/src/core/spec/cortex_a9/board_support.h b/repos/base-hw/src/core/spec/cortex_a9/board_support.h deleted file mode 100644 index 1fa958ba82..0000000000 --- a/repos/base-hw/src/core/spec/cortex_a9/board_support.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * \brief Board driver definitions common to Cortex A9 SoCs - * \author Stefan Kalkowski - * \date 2015-02-09 - */ - -/* - * 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_A9__BOARD_SUPPORT_H_ -#define _CORE__SPEC__CORTEX_A9__BOARD_SUPPORT_H_ - -/* core includes */ -#include -#include - -namespace Cortex_a9 { class Board; } - -class Cortex_a9::Board : public Genode::Board_base -{ - public: - - using L2_cache = Hw::Pl310; - - static constexpr bool SMP = true; - - enum Errata { - ARM_754322, - ARM_764369, - ARM_775420, - PL310_588369, - PL310_727915, - PL310_769419, - }; - - enum { - /* interrupt controller */ - IRQ_CONTROLLER_DISTR_BASE = CORTEX_A9_PRIVATE_MEM_BASE + 0x1000, - IRQ_CONTROLLER_DISTR_SIZE = 0x1000, - IRQ_CONTROLLER_CPU_BASE = CORTEX_A9_PRIVATE_MEM_BASE + 0x100, - IRQ_CONTROLLER_CPU_SIZE = 0x100, - - /* timer */ - PRIVATE_TIMER_MMIO_BASE = CORTEX_A9_PRIVATE_MEM_BASE + 0x600, - PRIVATE_TIMER_MMIO_SIZE = 0x10, - PRIVATE_TIMER_IRQ = 29, - }; - - Board(); - - L2_cache & l2_cache() { return _l2_cache; } - - void init() { } - void wake_up_all_cpus(void * const ip); - bool errata(Errata); - - protected: - - L2_cache _l2_cache; -}; - -#endif /* _CORE__SPEC__CORTEX_A9__BOARD_SUPPORT_H_ */ diff --git a/repos/base-hw/src/core/spec/cortex_a9/cpu.h b/repos/base-hw/src/core/spec/cortex_a9/cpu.h index 1ac7bb7848..23fa1e220a 100644 --- a/repos/base-hw/src/core/spec/cortex_a9/cpu.h +++ b/repos/base-hw/src/core/spec/cortex_a9/cpu.h @@ -80,7 +80,7 @@ class Genode::Cpu : public Arm_v7_cpu void clean_invalidate_data_cache() { clean_invalidate_inner_data_cache(); - Kernel::board().l2_cache().clean_invalidate(); + Board::l2_cache().clean_invalidate(); } /** @@ -89,7 +89,7 @@ class Genode::Cpu : public Arm_v7_cpu void invalidate_data_cache() { invalidate_inner_data_cache(); - Kernel::board().l2_cache().invalidate(); + Board::l2_cache().invalidate(); } /** @@ -100,7 +100,7 @@ class Genode::Cpu : public Arm_v7_cpu size_t const size) { Arm_cpu::clean_invalidate_data_cache_by_virt_region(base, size); - Kernel::board().l2_cache().clean_invalidate(); + Board::l2_cache().clean_invalidate(); } static unsigned executing_id() { return Mpidr::Aff_0::get(Mpidr::read()); } diff --git a/repos/base-hw/src/core/spec/cortex_a9/timer.cc b/repos/base-hw/src/core/spec/cortex_a9/timer.cc index 1f9927a832..77dc4df14b 100644 --- a/repos/base-hw/src/core/spec/cortex_a9/timer.cc +++ b/repos/base-hw/src/core/spec/cortex_a9/timer.cc @@ -14,14 +14,18 @@ #include #include -Genode::Timer::Timer() -: Genode::Mmio(Genode::Platform::mmio_to_virt(Board::PRIVATE_TIMER_MMIO_BASE)) +using Genode::Timer; +using Genode::Mmio; +using Genode::Platform; + +Timer::Timer() +: Mmio(Platform::mmio_to_virt(Board::Cpu_mmio::PRIVATE_TIMER_MMIO_BASE)) { write(0); } -void Genode::Timer::start_one_shot(time_t const tics, unsigned const) +void Timer::start_one_shot(time_t const tics, unsigned const) { enum { PRESCALER = Board::CORTEX_A9_PRIVATE_TIMER_DIV - 1 }; diff --git a/repos/base-hw/src/core/spec/cortex_a9/timer.h b/repos/base-hw/src/core/spec/cortex_a9/timer.h index 4f032c1975..f1dce34b52 100644 --- a/repos/base-hw/src/core/spec/cortex_a9/timer.h +++ b/repos/base-hw/src/core/spec/cortex_a9/timer.h @@ -76,7 +76,7 @@ class Genode::Timer : public Mmio * Return kernel name of timer interrupt */ static unsigned interrupt_id(unsigned const) { - return Board::PRIVATE_TIMER_IRQ; } + return Board::Cpu_mmio::PRIVATE_TIMER_IRQ; } /** * Start single timeout run diff --git a/repos/base-hw/src/core/spec/exynos5/board.h b/repos/base-hw/src/core/spec/exynos5/board.h deleted file mode 100644 index c0fc19f2ba..0000000000 --- a/repos/base-hw/src/core/spec/exynos5/board.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * \brief Board driver for core - * \author Martin Stein - * \author Stefan Kalkowski - * \date 2012-04-23 - */ - -/* - * Copyright (C) 2012-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__EXYNOS5__BOARD_H_ -#define _CORE__SPEC__EXYNOS5__BOARD_H_ - -/* core includes */ -#include - -namespace Genode -{ - class Board : public Cortex_a15::Board_base - { - public: - - static void init() { } - - /** - * Tell secondary CPUs to start execution from instr. pointer 'ip' - */ - static void wake_up_all_cpus(void * const ip) - { - *(void * volatile *)IRAM_BASE = ip; - asm volatile("dsb\n" - "sev\n"); - } - - static constexpr bool SMP = true; - }; -} - -#endif /* _CORE__SPEC__EXYNOS5__BOARD_H_ */ diff --git a/repos/base-hw/src/core/spec/exynos5/serial.h b/repos/base-hw/src/core/spec/exynos5/serial.h index 06d5e96170..9c89c086d0 100644 --- a/repos/base-hw/src/core/spec/exynos5/serial.h +++ b/repos/base-hw/src/core/spec/exynos5/serial.h @@ -20,14 +20,14 @@ #include /* Genode includes */ -#include +#include namespace Genode { /** * Serial output driver for core */ - class Serial : public Exynos_uart_base + class Serial : public Exynos_uart { public: @@ -38,8 +38,8 @@ namespace Genode */ Serial(unsigned const baud_rate) : - Exynos_uart_base(Platform::mmio_to_virt(Board::UART_2_MMIO_BASE), - Board::UART_2_CLOCK, baud_rate) + Exynos_uart(Platform::mmio_to_virt(Board::UART_2_MMIO_BASE), + Board::UART_2_CLOCK, baud_rate) { } }; } diff --git a/repos/base-hw/src/core/spec/exynos5/timer.cc b/repos/base-hw/src/core/spec/exynos5/timer.cc new file mode 100644 index 0000000000..aa87e09145 --- /dev/null +++ b/repos/base-hw/src/core/spec/exynos5/timer.cc @@ -0,0 +1,27 @@ +/* + * \brief Timer driver for core + * \author Martin stein + * \date 2013-01-10 + */ + +/* + * 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. + */ + +#include +#include + +Genode::Timer::Timer() +: Mmio(Platform::mmio_to_virt(Board::MCT_MMIO_BASE)), + _tics_per_ms(_calc_tics_per_ms(Board::MCT_CLOCK)) +{ + Mct_cfg::access_t mct_cfg = 0; + Mct_cfg::Prescaler::set(mct_cfg, PRESCALER); + Mct_cfg::Div_mux::set(mct_cfg, DIV_MUX); + write(mct_cfg); + write(L0_int_enb::Frceie::bits(1)); + write(L1_int_enb::Frceie::bits(1)); +} diff --git a/repos/base-hw/src/core/spec/exynos5/timer.h b/repos/base-hw/src/core/spec/exynos5/timer.h index c8d58a11c7..3ad52a7348 100644 --- a/repos/base-hw/src/core/spec/exynos5/timer.h +++ b/repos/base-hw/src/core/spec/exynos5/timer.h @@ -19,7 +19,6 @@ /* core include */ #include -#include /* Genode includes */ #include @@ -203,21 +202,7 @@ class Genode::Timer : public Mmio } } - /** - * Constructor - */ - Timer() - : - Mmio(Platform::mmio_to_virt(Board::MCT_MMIO_BASE)), - _tics_per_ms(_calc_tics_per_ms(Board::MCT_CLOCK)) - { - Mct_cfg::access_t mct_cfg = 0; - Mct_cfg::Prescaler::set(mct_cfg, PRESCALER); - Mct_cfg::Div_mux::set(mct_cfg, DIV_MUX); - write(mct_cfg); - write(L0_int_enb::Frceie::bits(1)); - write(L1_int_enb::Frceie::bits(1)); - } + Timer(); /** * Raise interrupt of CPU 'cpu' once after timeout 'tics' diff --git a/repos/base-hw/src/core/spec/imx/serial.h b/repos/base-hw/src/core/spec/imx/serial.h index 88c86d9d99..4d9f3da9da 100644 --- a/repos/base-hw/src/core/spec/imx/serial.h +++ b/repos/base-hw/src/core/spec/imx/serial.h @@ -19,19 +19,19 @@ #include /* Genode includes */ -#include +#include namespace Genode { /** * Serial output driver for core */ - class Serial : public Imx_uart_base + class Serial : public Imx_uart { public: Serial(unsigned baudrate) - : Imx_uart_base(Platform::mmio_to_virt(Board::UART_1_MMIO_BASE), + : Imx_uart(Platform::mmio_to_virt(Board::UART_1_MMIO_BASE), /* ignored clock rate */ 0, baudrate) { } }; } diff --git a/repos/base-hw/src/core/spec/imx53/timer.cc b/repos/base-hw/src/core/spec/imx53/timer.cc new file mode 100644 index 0000000000..ed10b1eea9 --- /dev/null +++ b/repos/base-hw/src/core/spec/imx53/timer.cc @@ -0,0 +1,20 @@ +/* + * \brief Timer implementation for core + * \author Stefan Kalkowski + * \date 2017-05-10 + */ + +/* + * Copyright (C) 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. + */ + +#include +#include +#include + +Genode::Timer::Timer() +: Genode::Mmio(Genode::Platform::mmio_to_virt(Board::EPIT_1_MMIO_BASE)) { } + diff --git a/repos/base-hw/src/core/spec/imx53/timer.h b/repos/base-hw/src/core/spec/imx53/timer.h index 51f429df2e..6601b93938 100644 --- a/repos/base-hw/src/core/spec/imx53/timer.h +++ b/repos/base-hw/src/core/spec/imx53/timer.h @@ -22,7 +22,6 @@ /* core includes */ #include -#include namespace Genode { class Timer; } @@ -136,7 +135,7 @@ class Genode::Timer : public Mmio return Board::EPIT_1_IRQ; } - Timer() : Mmio(Platform::mmio_to_virt(Board::EPIT_1_MMIO_BASE)) { } + Timer(); /** * Start single timeout run diff --git a/repos/base-hw/src/core/spec/imx53/board.h b/repos/base-hw/src/core/spec/imx53_qsb/board.h similarity index 53% rename from repos/base-hw/src/core/spec/imx53/board.h rename to repos/base-hw/src/core/spec/imx53_qsb/board.h index 6377f5c080..d16148148b 100644 --- a/repos/base-hw/src/core/spec/imx53/board.h +++ b/repos/base-hw/src/core/spec/imx53_qsb/board.h @@ -12,13 +12,14 @@ * under the terms of the GNU Affero General Public License version 3. */ -#ifndef _CORE__SPEC__IMX53__BOARD_H_ -#define _CORE__SPEC__IMX53__BOARD_H_ +#ifndef _CORE__SPEC__IMX53_QSB__BOARD_H_ +#define _CORE__SPEC__IMX53_QSB__BOARD_H_ -#include +#include -namespace Genode { struct Board; } +namespace Board { + using namespace Imx53_qsb; + static constexpr bool SMP = false; +} -struct Genode::Board : Genode::Board_base { static constexpr bool SMP = false; }; - -#endif /* _CORE__SPEC__IMX53__BOARD_H_ */ +#endif /* _CORE__SPEC__IMX53_QSB__BOARD_H_ */ diff --git a/repos/base-hw/src/core/spec/imx6/board.h b/repos/base-hw/src/core/spec/imx6/board.h deleted file mode 100644 index d0f2498cb7..0000000000 --- a/repos/base-hw/src/core/spec/imx6/board.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * \brief Board driver - * \author Stefan Kalkowski - * \author Martin Stein - * \date 2014-02-25 - */ - -/* - * Copyright (C) 2014-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__IMX6__BOARD_H_ -#define _CORE__SPEC__IMX6__BOARD_H_ - -/* core includes */ -#include - -namespace Genode { using Board = Cortex_a9::Board; } - -#endif /* _CORE__SPEC__IMX6__BOARD_H_ */ diff --git a/repos/base-hw/src/core/spec/odroid_xu/board.h b/repos/base-hw/src/core/spec/odroid_xu/board.h new file mode 100644 index 0000000000..a871dc008c --- /dev/null +++ b/repos/base-hw/src/core/spec/odroid_xu/board.h @@ -0,0 +1,29 @@ +/* + * \brief Board driver for core + * \author Stefan Kalkowski + * \date 2017-04-27 + */ + +/* + * Copyright (C) 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__ODROID_XU__BOARD_H_ +#define _CORE__SPEC__ODROID_XU__BOARD_H_ + +/* base includes */ +#include + +#include + +namespace Board { + using namespace Odroid_xu; + using Cpu_mmio = Hw::Cortex_a15_mmio; + + static constexpr bool SMP = true; +} + +#endif /* _CORE__SPEC__ODROID_XU__BOARD_H_ */ diff --git a/repos/base-hw/src/core/spec/panda/board.h b/repos/base-hw/src/core/spec/panda/board.h index 06415e8ead..1ac5b5e184 100644 --- a/repos/base-hw/src/core/spec/panda/board.h +++ b/repos/base-hw/src/core/spec/panda/board.h @@ -15,48 +15,46 @@ #ifndef _CORE__SPEC__PANDA__BOARD_H_ #define _CORE__SPEC__PANDA__BOARD_H_ +/* base includes */ +#include + +#include +#include #include -#include -namespace Genode { class Board; } +namespace Board { + using namespace Panda; + using Cpu_mmio = Hw::Cortex_a9_mmio; -class Genode::Board : public Cortex_a9::Board -{ - public: + static constexpr bool SMP = true; - using Base = Cortex_a9::Board; + class L2_cache : public Hw::Pl310 + { + private: - class L2_cache : public Base::L2_cache - { - private: + unsigned long _debug_value() + { + Debug::access_t v = 0; + Debug::Dwb::set(v, 1); + Debug::Dcl::set(v, 1); + return v; + } - unsigned long _debug_value() - { - Debug::access_t v = 0; - Debug::Dwb::set(v, 1); - Debug::Dcl::set(v, 1); - return v; - } + public: - public: + L2_cache(Genode::addr_t mmio) : Hw::Pl310(mmio) { } - L2_cache(Genode::addr_t mmio) : Base::L2_cache(mmio) { } + void clean_invalidate() + { + using namespace Hw; + call_panda_firmware(L2_CACHE_SET_DEBUG_REG, _debug_value()); + Pl310::clean_invalidate(); + call_panda_firmware(L2_CACHE_SET_DEBUG_REG, 0); + } + }; - void clean_invalidate() - { - using namespace Hw; - call_panda_firmware(L2_CACHE_SET_DEBUG_REG, _debug_value()); - Base::L2_cache::clean_invalidate(); - call_panda_firmware(L2_CACHE_SET_DEBUG_REG, 0); - } - }; - - L2_cache & l2_cache() { return _l2_cache; } - - private: - - L2_cache _l2_cache { Base::l2_cache().base() }; -}; + L2_cache & l2_cache(); +} #endif /* _CORE__SPEC__PANDA__BOARD_H_ */ diff --git a/repos/base-hw/src/core/spec/pbxa9/board.cc b/repos/base-hw/src/core/spec/pbxa9/board.cc deleted file mode 100644 index a173c7ba70..0000000000 --- a/repos/base-hw/src/core/spec/pbxa9/board.cc +++ /dev/null @@ -1,45 +0,0 @@ -/* - * \brief Board implementation specific to PBXA9 - * \author Stefan Kalkowski - * \date 2016-01-07 - */ - -/* - * Copyright (C) 2016-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. - */ - -#include -#include -#include - -bool Cortex_a9::Board::errata(Cortex_a9::Board::Errata err) { - return false; } - - -void Cortex_a9::Board::wake_up_all_cpus(void * const ip) -{ - /** - * set the entrypoint for the other CPUs via the flags register - * of the system control registers. ARMs boot monitor code will - * read out this register and jump to it after the cpu received - * an interrupt - */ - struct System_control : Genode::Mmio - { - struct Flagsset : Register<0x30, 32> { }; - struct Flagsclr : Register<0x34, 32> { }; - - System_control(void * const ip) - : Mmio(SYSTEM_CONTROL_MMIO_BASE) - { - write(~0UL); - write(reinterpret_cast(ip)); - } - } sc(ip); - - /* send an IPI to all other cpus */ - Kernel::pic()->send_ipi(); -} diff --git a/repos/base-hw/src/core/spec/pbxa9/board.h b/repos/base-hw/src/core/spec/pbxa9/board.h index 053a4aadaf..c3b9891c8e 100644 --- a/repos/base-hw/src/core/spec/pbxa9/board.h +++ b/repos/base-hw/src/core/spec/pbxa9/board.h @@ -14,12 +14,20 @@ #ifndef _CORE__SPEC__PBXA9__BOARD_H_ #define _CORE__SPEC__PBXA9__BOARD_H_ -/* core includes */ -#include +/* base includes */ +#include -namespace Genode -{ - using Board = Cortex_a9::Board; +#include +#include + +namespace Board { + using namespace Pbxa9; + using Cpu_mmio = Hw::Cortex_a9_mmio; + using L2_cache = Hw::Pl310; + + static constexpr bool SMP = true; + + L2_cache & l2_cache(); } #endif /* _CORE__SPEC__PBXA9__BOARD_H_ */ diff --git a/repos/base-hw/src/core/spec/pl011/serial.h b/repos/base-hw/src/core/spec/pl011/serial.h index 191b745850..38a465bddf 100644 --- a/repos/base-hw/src/core/spec/pl011/serial.h +++ b/repos/base-hw/src/core/spec/pl011/serial.h @@ -19,12 +19,12 @@ #include /* Genode includes */ -#include +#include namespace Genode { class Serial; } -class Genode::Serial : public Pl011_base +class Genode::Serial : public Pl011_uart { public: @@ -35,7 +35,7 @@ class Genode::Serial : public Pl011_base */ Serial(unsigned const baud_rate) : - Pl011_base(Platform::mmio_to_virt(Board::PL011_0_MMIO_BASE), + Pl011_uart(Platform::mmio_to_virt(Board::PL011_0_MMIO_BASE), Board::PL011_0_CLOCK, baud_rate) { } }; diff --git a/repos/base-hw/src/core/spec/riscv/board.h b/repos/base-hw/src/core/spec/riscv/board.h index 1b82538ccc..226dbb96d5 100644 --- a/repos/base-hw/src/core/spec/riscv/board.h +++ b/repos/base-hw/src/core/spec/riscv/board.h @@ -14,6 +14,6 @@ #ifndef _CORE__SPEC__RISCV__BOARD_H_ #define _CORE__SPEC__RISCV__BOARD_H_ -namespace Genode { struct Board { void init() { } }; } +namespace Board { } #endif /* _CORE__SPEC__RISCV__BOARD_H_ */ diff --git a/repos/base-hw/src/core/spec/rpi/board.h b/repos/base-hw/src/core/spec/rpi/board.h index 4055ecdce1..6af776238a 100644 --- a/repos/base-hw/src/core/spec/rpi/board.h +++ b/repos/base-hw/src/core/spec/rpi/board.h @@ -16,13 +16,10 @@ #define _CORE__SPEC__RPI__BOARD_H_ /* core includes */ -#include +#include -namespace Genode { struct Board; } - -struct Genode::Board : Board_base -{ - void init() { } +namespace Board { + using namespace Rpi; static constexpr bool SMP = false; }; diff --git a/repos/base-hw/src/core/spec/rpi/pic.cc b/repos/base-hw/src/core/spec/rpi/pic.cc index f8851567f3..26d8f72be0 100644 --- a/repos/base-hw/src/core/spec/rpi/pic.cc +++ b/repos/base-hw/src/core/spec/rpi/pic.cc @@ -92,10 +92,10 @@ bool Genode::Pic::take_request(unsigned &irq) if (!_is_pending(i, p1, p2)) continue; - irq = Board_base::GPU_IRQ_BASE + i; + irq = Board::GPU_IRQ_BASE + i; /* handle SOF interrupts locally, filter from the user land */ - if (irq == Board_base::DWC_IRQ) + if (irq == Board::DWC_IRQ) if (_usb.handle_sof()) return false; diff --git a/repos/base-hw/src/core/spec/tl16c750/serial.h b/repos/base-hw/src/core/spec/tl16c750/serial.h index ab1ce8a441..efd2054375 100644 --- a/repos/base-hw/src/core/spec/tl16c750/serial.h +++ b/repos/base-hw/src/core/spec/tl16c750/serial.h @@ -19,14 +19,14 @@ #include /* Genode includes */ -#include +#include namespace Genode { /** * Serial output driver for core */ - class Serial : public Tl16c750_base + class Serial : public Tl16c750_uart { public: @@ -37,7 +37,7 @@ namespace Genode */ Serial(unsigned const baud_rate) : - Tl16c750_base(Platform::mmio_to_virt(Board::TL16C750_3_MMIO_BASE), + Tl16c750_uart(Platform::mmio_to_virt(Board::TL16C750_3_MMIO_BASE), Board::TL16C750_CLOCK, baud_rate) { } }; diff --git a/repos/base-hw/src/core/spec/usb_armory/board.h b/repos/base-hw/src/core/spec/usb_armory/board.h new file mode 100644 index 0000000000..7e079b51d7 --- /dev/null +++ b/repos/base-hw/src/core/spec/usb_armory/board.h @@ -0,0 +1,25 @@ +/* + * \brief Board driver + * \author Stefan Kalkowski + * \author Martin Stein + * \date 2012-10-24 + */ + +/* + * Copyright (C) 2012-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__USB_ARMORY__BOARD_H_ +#define _CORE__SPEC__USB_ARMORY__BOARD_H_ + +#include + +namespace Board { + using namespace Usb_armory; + static constexpr bool SMP = false; +} + +#endif /* _CORE__SPEC__USB_ARMORY__BOARD_H_ */ diff --git a/repos/base-hw/src/core/spec/wand_quad/board.h b/repos/base-hw/src/core/spec/wand_quad/board.h new file mode 100644 index 0000000000..9868f46ad8 --- /dev/null +++ b/repos/base-hw/src/core/spec/wand_quad/board.h @@ -0,0 +1,34 @@ +/* + * \brief Board driver + * \author Stefan Kalkowski + * \author Martin Stein + * \date 2014-02-25 + */ + +/* + * Copyright (C) 2014-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__WAND_QUAD__BOARD_H_ +#define _CORE__SPEC__WAND_QUAD__BOARD_H_ + +/* base includes */ +#include + +#include +#include + +namespace Board { + using namespace Wand_quad; + using Cpu_mmio = Hw::Cortex_a9_mmio; + using L2_cache = Hw::Pl310; + + static constexpr bool SMP = true; + + L2_cache & l2_cache(); +} + +#endif /* _CORE__SPEC__WAND_QUAD__BOARD_H_ */ diff --git a/repos/base-hw/src/core/spec/x86_64/muen/serial.h b/repos/base-hw/src/core/spec/x86_64/muen/serial.h index 99655d6230..121a4a4e67 100644 --- a/repos/base-hw/src/core/spec/x86_64/muen/serial.h +++ b/repos/base-hw/src/core/spec/x86_64/muen/serial.h @@ -16,14 +16,14 @@ #define _CORE__SPEC__X86_64__MUEN__SERIAL_H_ /* Genode includes */ -#include +#include namespace Genode { class Serial; } /** * Serial output driver for core */ -class Genode::Serial : public X86_uart_base +class Genode::Serial : public X86_uart { private: @@ -36,7 +36,7 @@ class Genode::Serial : public X86_uart_base Serial(unsigned baud_rate) : - X86_uart_base(COM1_PORT, CLOCK_UNUSED, baud_rate) + X86_uart(COM1_PORT, CLOCK_UNUSED, baud_rate) { } }; diff --git a/repos/base-hw/src/core/spec/x86_64/muen/sinfo_instance.cc b/repos/base-hw/src/core/spec/x86_64/muen/sinfo_instance.cc new file mode 100644 index 0000000000..d185bf7c52 --- /dev/null +++ b/repos/base-hw/src/core/spec/x86_64/muen/sinfo_instance.cc @@ -0,0 +1,21 @@ +/* + * \brief Sinfo kernel singleton + * \author Reto Buerki + * \date 2016-05-09 + */ + +/* + * Copyright (C) 2016-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. + */ + +#include +#include + +Genode::Sinfo * Genode::sinfo() +{ + static Sinfo singleton(Platform::mmio_to_virt(Sinfo::PHYSICAL_BASE_ADDR)); + return &singleton; +} diff --git a/repos/base-hw/src/core/spec/x86_64/muen/sinfo_instance.h b/repos/base-hw/src/core/spec/x86_64/muen/sinfo_instance.h index d8e6b15e7b..2c97554f31 100644 --- a/repos/base-hw/src/core/spec/x86_64/muen/sinfo_instance.h +++ b/repos/base-hw/src/core/spec/x86_64/muen/sinfo_instance.h @@ -16,17 +16,13 @@ /* base includes */ #include -#include namespace Genode { /** * Return sinfo singleton */ - static Sinfo * sinfo() { - static Sinfo singleton(Platform::mmio_to_virt(Sinfo::PHYSICAL_BASE_ADDR)); - return &singleton; - } + Sinfo * sinfo(); } #endif /* _CORE__SPEC__X86_64__MUEN__SINFO_INSTANCE_H_ */ diff --git a/repos/base-hw/src/core/spec/x86_64/muen/timer.cc b/repos/base-hw/src/core/spec/x86_64/muen/timer.cc new file mode 100644 index 0000000000..8037833dc6 --- /dev/null +++ b/repos/base-hw/src/core/spec/x86_64/muen/timer.cc @@ -0,0 +1,42 @@ +/* + * \brief Timer driver for core + * \author Reto Buerki + * \date 2015-04-14 + */ + +/* + * 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. + */ + +#include +#include + +Genode::Timer::Timer() : _tics_per_ms(sinfo()->get_tsc_khz()) +{ + + /* first sinfo instance, output status */ + sinfo()->log_status(); + + struct Sinfo::Memregion_info region; + if (!sinfo()->get_memregion_info("timed_event", ®ion)) { + error("muen-timer: Unable to retrieve timed event region"); + throw Invalid_region(); + } + + _event_page = (Subject_timed_event *)Platform::mmio_to_virt(region.address); + _event_page->event_nr = Board::TIMER_EVENT_KERNEL; + log("muen-timer: Page @", Hex(region.address), ", " + "frequency ", _tics_per_ms, " kHz, " + "event ", (unsigned)_event_page->event_nr); + + if (sinfo()->get_memregion_info("monitor_timed_event", ®ion)) { + log("muen-timer: Found guest timed event page @", Hex(region.address), + " -> enabling preemption"); + _guest_event_page = (Subject_timed_event *)Platform::mmio_to_virt(region.address); + _guest_event_page->event_nr = Board::TIMER_EVENT_PREEMPT; + } +} + diff --git a/repos/base-hw/src/core/spec/x86_64/muen/timer.h b/repos/base-hw/src/core/spec/x86_64/muen/timer.h index f85b8e52e8..8107e92605 100644 --- a/repos/base-hw/src/core/spec/x86_64/muen/timer.h +++ b/repos/base-hw/src/core/spec/x86_64/muen/timer.h @@ -61,32 +61,7 @@ class Genode::Timer public: - Timer() : - _tics_per_ms(sinfo()->get_tsc_khz()) - { - - /* first sinfo instance, output status */ - sinfo()->log_status(); - - struct Sinfo::Memregion_info region; - if (!sinfo()->get_memregion_info("timed_event", ®ion)) { - error("muen-timer: Unable to retrieve timed event region"); - throw Invalid_region(); - } - - _event_page = (Subject_timed_event *)Platform::mmio_to_virt(region.address); - _event_page->event_nr = Board::TIMER_EVENT_KERNEL; - log("muen-timer: Page @", Hex(region.address), ", " - "frequency ", _tics_per_ms, " kHz, " - "event ", (unsigned)_event_page->event_nr); - - if (sinfo()->get_memregion_info("monitor_timed_event", ®ion)) { - log("muen-timer: Found guest timed event page @", Hex(region.address), - " -> enabling preemption"); - _guest_event_page = (Subject_timed_event *)Platform::mmio_to_virt(region.address); - _guest_event_page->event_nr = Board::TIMER_EVENT_PREEMPT; - } - } + Timer(); static unsigned interrupt_id(int) { return Board::TIMER_VECTOR_KERNEL; } diff --git a/repos/base-hw/src/core/spec/x86_64/serial.h b/repos/base-hw/src/core/spec/x86_64/serial.h index 27295ae3fc..d9d1436169 100644 --- a/repos/base-hw/src/core/spec/x86_64/serial.h +++ b/repos/base-hw/src/core/spec/x86_64/serial.h @@ -16,14 +16,14 @@ /* Genode includes */ #include -#include +#include namespace Genode { class Serial; } /** * Serial output driver for core */ -class Genode::Serial : public X86_uart_base +class Genode::Serial : public X86_uart { private: @@ -33,8 +33,8 @@ class Genode::Serial : public X86_uart_base Serial(unsigned baud_rate) : - X86_uart_base(Bios_data_area::singleton()->serial_port(), - CLOCK_UNUSED, baud_rate) + X86_uart(Bios_data_area::singleton()->serial_port(), + CLOCK_UNUSED, baud_rate) { } }; diff --git a/repos/base-hw/src/core/spec/xilinx_uartps_0/serial.h b/repos/base-hw/src/core/spec/xilinx_uartps_0/serial.h index 805cb907e2..ffec6da028 100644 --- a/repos/base-hw/src/core/spec/xilinx_uartps_0/serial.h +++ b/repos/base-hw/src/core/spec/xilinx_uartps_0/serial.h @@ -19,14 +19,14 @@ #include /* Genode includes */ -#include +#include namespace Genode { class Serial; } /** * Serial output driver for core */ -class Genode::Serial : public Xilinx_uartps_base +class Genode::Serial : public Xilinx_uart { public: @@ -37,8 +37,8 @@ class Genode::Serial : public Xilinx_uartps_base */ Serial(unsigned const baud_rate) : - Xilinx_uartps_base(Platform::mmio_to_virt(Board::UART_0_MMIO_BASE), - Board::UART_CLOCK, baud_rate) + Xilinx_uart(Platform::mmio_to_virt(Board::UART_0_MMIO_BASE), + Board::UART_CLOCK, baud_rate) { } }; diff --git a/repos/base-hw/src/core/spec/zynq_qemu/board.h b/repos/base-hw/src/core/spec/zynq_qemu/board.h index cf30eb8171..65068d7342 100644 --- a/repos/base-hw/src/core/spec/zynq_qemu/board.h +++ b/repos/base-hw/src/core/spec/zynq_qemu/board.h @@ -16,18 +16,20 @@ #ifndef _CORE__SPEC__ZYNQ_QEMU__BOARD_H_ #define _CORE__SPEC__ZYNQ_QEMU__BOARD_H_ -/* core includes */ -#include +/* base includes */ +#include -namespace Genode -{ - struct Board : Cortex_a9::Board - { - enum { - KERNEL_UART_BASE = UART_0_MMIO_BASE, - KERNEL_UART_SIZE = UART_SIZE, - }; - }; +#include +#include + +namespace Board { + using namespace Zynq_qemu; + using Cpu_mmio = Hw::Cortex_a9_mmio; + using L2_cache = Hw::Pl310; + + static constexpr bool SMP = true; + + L2_cache & l2_cache(); } #endif /* _CORE__SPEC__ZYNQ_QEMU__BOARD_H_ */ diff --git a/repos/base-hw/src/lib/hw/spec/arm/cortex_a15.h b/repos/base-hw/src/lib/hw/spec/arm/cortex_a15.h index a1b21ab94c..c24122c0de 100644 --- a/repos/base-hw/src/lib/hw/spec/arm/cortex_a15.h +++ b/repos/base-hw/src/lib/hw/spec/arm/cortex_a15.h @@ -16,10 +16,10 @@ #include -namespace Hw { template struct Cpu_memory_map; } +namespace Hw { template struct Cortex_a15_mmio; } template -struct Hw::Cpu_memory_map +struct Hw::Cortex_a15_mmio { enum { IRQ_CONTROLLER_DISTR_BASE = BASE + 0x1000, diff --git a/repos/base-hw/src/lib/hw/spec/arm/cortex_a9.h b/repos/base-hw/src/lib/hw/spec/arm/cortex_a9.h index f14dde76ae..ec4da8ee62 100644 --- a/repos/base-hw/src/lib/hw/spec/arm/cortex_a9.h +++ b/repos/base-hw/src/lib/hw/spec/arm/cortex_a9.h @@ -16,10 +16,10 @@ #include -namespace Hw { template struct Cpu_memory_map; } +namespace Hw { template struct Cortex_a9_mmio; } template -struct Hw::Cpu_memory_map +struct Hw::Cortex_a9_mmio { enum { SCU_MMIO_BASE = BASE, diff --git a/repos/base-nova/src/core/core_log.cc b/repos/base-nova/src/core/core_log.cc index e8a92d357a..0571e83c16 100644 --- a/repos/base-nova/src/core/core_log.cc +++ b/repos/base-nova/src/core/core_log.cc @@ -16,14 +16,14 @@ /* Genode includes */ #include -#include +#include void Genode::Core_log::out(char const c) { enum { CLOCK = 0, BAUDRATE = 115200 }; - static X86_uart_base uart(Bios_data_area::singleton()->serial_port(), - CLOCK, BAUDRATE); + static X86_uart uart(Bios_data_area::singleton()->serial_port(), + CLOCK, BAUDRATE); if (c == '\n') uart.put_char('\r'); uart.put_char(c); diff --git a/repos/base/include/spec/arndale/drivers/board_base.h b/repos/base/include/drivers/defs/arndale.h similarity index 55% rename from repos/base/include/spec/arndale/drivers/board_base.h rename to repos/base/include/drivers/defs/arndale.h index a7c835ce38..181c570347 100644 --- a/repos/base/include/spec/arndale/drivers/board_base.h +++ b/repos/base/include/drivers/defs/arndale.h @@ -1,5 +1,5 @@ /* - * \brief Driver base for the InSignal Arndale 5 board + * \brief MMIO and IRQ definitions for the InSignal Arndale 5 board * \author Martin stein * \date 2013-01-09 */ @@ -11,20 +11,16 @@ * under the terms of the GNU Affero General Public License version 3. */ -#ifndef _INCLUDE__SPEC__ARNDALE__DRIVERS__BOARD_BASE_H_ -#define _INCLUDE__SPEC__ARNDALE__DRIVERS__BOARD_BASE_H_ +#ifndef _INCLUDE__DRIVERS__DEFS__ARNDALE_H_ +#define _INCLUDE__DRIVERS__DEFS__ARNDALE_H_ /* Genode includes */ -#include +#include -namespace Genode { struct Board_base; } +namespace Arndale { + using namespace Exynos5; -/** - * Board driver base - */ -struct Genode::Board_base : Exynos5 -{ enum { /* clock management unit */ @@ -41,10 +37,7 @@ struct Genode::Board_base : Exynos5 /* UART */ UART_2_CLOCK = 100000000, - - /* wether board provides security extension */ - SECURITY_EXTENSION = 1, }; }; -#endif /* _INCLUDE__SPEC__ARNDALE__DRIVERS__BOARD_BASE_H_ */ +#endif /* _INCLUDE__DRIVERS__DEFS__ARNDALE_H_ */ diff --git a/repos/base/include/spec/exynos5/board_base.h b/repos/base/include/drivers/defs/exynos5.h similarity index 86% rename from repos/base/include/spec/exynos5/board_base.h rename to repos/base/include/drivers/defs/exynos5.h index bfcfb7a643..0a4986e7b2 100644 --- a/repos/base/include/spec/exynos5/board_base.h +++ b/repos/base/include/drivers/defs/exynos5.h @@ -1,5 +1,5 @@ /* - * \brief Board-driver base + * \brief MMIO and IRQ definitions common to Exynos5 SoC * \author Stefan Kalkowski * \date 2013-11-25 */ @@ -11,17 +11,10 @@ * under the terms of the GNU Affero General Public License version 3. */ -#ifndef _INCLUDE__SPEC__EXYNOS5__BOARD_BASE_H_ -#define _INCLUDE__SPEC__EXYNOS5__BOARD_BASE_H_ +#ifndef _INCLUDE__DRIVERS__DEFS__EXYNOS5_H_ +#define _INCLUDE__DRIVERS__DEFS__EXYNOS5_H_ -namespace Genode { struct Exynos5; } - - -/** - * Board-driver base - */ -struct Genode::Exynos5 -{ +namespace Exynos5 { enum { /* normal RAM */ RAM_0_BASE = 0x40000000, @@ -95,4 +88,4 @@ struct Genode::Exynos5 }; }; -#endif /* _INCLUDE__SPEC__EXYNOS5__BOARD_BASE_H_ */ +#endif /* _INCLUDE__DRIVERS__DEFS__EXYNOS5_H_ */ diff --git a/repos/base/include/spec/imx53/drivers/board_base_support.h b/repos/base/include/drivers/defs/imx53.h similarity index 83% rename from repos/base/include/spec/imx53/drivers/board_base_support.h rename to repos/base/include/drivers/defs/imx53.h index bc5ff8cac6..36980d4b4d 100644 --- a/repos/base/include/spec/imx53/drivers/board_base_support.h +++ b/repos/base/include/drivers/defs/imx53.h @@ -1,5 +1,5 @@ /* - * \brief Board definitions for the i.MX53 + * \brief MMIO and IRQ definitions common to i.MX53 SoC * \author Stefan Kalkowski * \date 2012-10-24 */ @@ -11,24 +11,22 @@ * under the terms of the GNU Affero General Public License version 3. */ -#ifndef _INCLUDE__SPEC__IMX53__DRIVERS__BOARD_BASE_SUPPORT_H_ -#define _INCLUDE__SPEC__IMX53__DRIVERS__BOARD_BASE_SUPPORT_H_ +#ifndef _INCLUDE__DRIVERS__DEFS__IMX53_H_ +#define _INCLUDE__DRIVERS__DEFS__IMX53_H_ -namespace Imx53 { struct Board_base; } - - -/** - * i.MX53 motherboard - */ -struct Imx53::Board_base -{ +namespace Imx53 { enum { MMIO_BASE = 0x0, MMIO_SIZE = 0x70000000, - SDHC_IRQ = 1, - SDHC_MMIO_BASE = 0x50004000, - SDHC_MMIO_SIZE = 0x00004000, + RAM_BANK_0_BASE = 0x70000000, + RAM_BANK_0_SIZE = 0x40000000, + RAM_BANK_1_BASE = 0xb0000000, + RAM_BANK_1_SIZE = 0x40000000, + + SDHC_IRQ = 1, + SDHC_MMIO_BASE = 0x50004000, + SDHC_MMIO_SIZE = 0x00004000, UART_1_IRQ = 31, UART_1_MMIO_BASE = 0x53fbc000, @@ -109,12 +107,9 @@ struct Imx53::Board_base M4IF_BASE = 0x63fd8000, M4IF_SIZE = 0x00001000, - /* wether board provides security extension */ - SECURITY_EXTENSION = 1, - /* CPU cache */ CACHE_LINE_SIZE_LOG2 = 6, }; }; -#endif /* _INCLUDE__SPEC__IMX53__DRIVERS__BOARD_BASE_SUPPORT_H_ */ +#endif /* _INCLUDE__DRIVERS__DEFS__IMX53_H_ */ diff --git a/repos/base/include/drivers/defs/imx53_qsb.h b/repos/base/include/drivers/defs/imx53_qsb.h new file mode 100644 index 0000000000..6fc0c3c69b --- /dev/null +++ b/repos/base/include/drivers/defs/imx53_qsb.h @@ -0,0 +1,32 @@ +/* + * \brief MMIO and IRQ definitions of the i.MX53 Quickstart board + * \author Stefan Kalkowski + * \date 2012-10-24 + */ + +/* + * Copyright (C) 2012-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 _INCLUDE__DRIVERS__DEFS__IMX53_QSB_H_ +#define _INCLUDE__DRIVERS__DEFS__IMX53_QSB_H_ + +/* Genode includes */ +#include + +namespace Imx53_qsb { + + using namespace Imx53; + + enum { + RAM0_BASE = RAM_BANK_0_BASE, + RAM0_SIZE = 0x20000000, + RAM1_BASE = RAM_BANK_1_BASE, + RAM1_SIZE = 0x20000000, + }; +}; + +#endif /* _INCLUDE__DRIVERS__DEFS__IMX53_QSB_H_ */ diff --git a/repos/base/include/spec/odroid_x2/drivers/board_base.h b/repos/base/include/drivers/defs/odroid_x2.h similarity index 78% rename from repos/base/include/spec/odroid_x2/drivers/board_base.h rename to repos/base/include/drivers/defs/odroid_x2.h index d4976c93a3..397d7a5627 100644 --- a/repos/base/include/spec/odroid_x2/drivers/board_base.h +++ b/repos/base/include/drivers/defs/odroid_x2.h @@ -1,5 +1,5 @@ /* - * \brief Driver base for Odroid-x2 board + * \brief MMIO and IRQ definitions of the Odroid-x2 board * \author Alexy Gallardo Segura * \author Humberto López León * \author Reinier Millo Sánchez @@ -13,20 +13,10 @@ * under the terms of the GNU Affero General Public License version 3. */ -#ifndef _INCLUDE__SPEC__ODROID_X2__DRIVERS__BOARD_BASE_H_ -#define _INCLUDE__SPEC__ODROID_X2__DRIVERS__BOARD_BASE_H_ +#ifndef _INCLUDE__DRIVERS__DEFS__ODROID_X2_H_ +#define _INCLUDE__DRIVERS__DEFS__ODROID_X2_H_ -/* Genode includes */ -#include - -namespace Genode { struct Board_base; } - - -/** - * Board driver base - */ -struct Genode::Board_base : Exynos4 -{ +namespace Odroid_x2 { enum { /* clock management unit */ @@ -89,11 +79,7 @@ struct Genode::Board_base : Exynos4 GPIO4_MMIO_BASE = 0x106E0000, GPIO4_MMIO_SIZE = 0x0F88, GPIO4_IRQ = 79, /* TODO Check the irq number */ - - - /* wether board provides security extension */ - SECURITY_EXTENSION = 0, /* TODO Check this value */ }; }; -#endif /* _INCLUDE__SPEC__ODROID_X2__DRIVERS__BOARD_BASE_H_ */ +#endif /* _INCLUDE__DRIVERS__DEFS__ODROID_X2_H_ */ diff --git a/repos/base/include/drivers/defs/odroid_xu.h b/repos/base/include/drivers/defs/odroid_xu.h new file mode 100644 index 0000000000..58943cc730 --- /dev/null +++ b/repos/base/include/drivers/defs/odroid_xu.h @@ -0,0 +1,30 @@ +/* + * \brief MMIO and IRQ definitions for the Odroid XU board + * \author Stefan Kalkowski + * \date 2013-11-25 + */ + +/* + * 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 _INCLUDE__DRIVERS__DEFS__ODROID_XU_H_ +#define _INCLUDE__DRIVERS__DEFS__ODROID_XU_H_ + +/* Genode includes */ +#include + +namespace Odroid_xu { + + using namespace Exynos5; + + enum { + /* UART */ + UART_2_CLOCK = 62668800, + }; +}; + +#endif /* _INCLUDE__DRIVERS__DEFS__ODROID_XU_H_ */ diff --git a/repos/base/include/spec/panda/drivers/board_base.h b/repos/base/include/drivers/defs/panda.h similarity index 84% rename from repos/base/include/spec/panda/drivers/board_base.h rename to repos/base/include/drivers/defs/panda.h index c5cb6bc850..e6a41cddf6 100644 --- a/repos/base/include/spec/panda/drivers/board_base.h +++ b/repos/base/include/drivers/defs/panda.h @@ -1,5 +1,5 @@ /* - * \brief Driver for the OMAP4 PandaBoard revision A2 + * \brief MMIO and IRQ definitions for the OMAP4 PandaBoard revision A2 * \author Martin stein * \date 2011-11-03 */ @@ -11,17 +11,10 @@ * under the terms of the GNU Affero General Public License version 3. */ -#ifndef _INCLUDE__SPEC__PANDA__DRIVERS__BOARD_BASE_H_ -#define _INCLUDE__SPEC__PANDA__DRIVERS__BOARD_BASE_H_ +#ifndef _INCLUDE__DRIVERS__DEFS__PANDA_H_ +#define _INCLUDE__DRIVERS__DEFS__PANDA_H_ -namespace Genode { struct Board_base; } - - -/** - * Driver for the OMAP4 PandaBoard revision A2 - */ -struct Genode::Board_base -{ +namespace Panda { enum { /* device IO memory */ @@ -100,10 +93,7 @@ struct Genode::Board_base /* CPU cache */ CACHE_LINE_SIZE_LOG2 = 2, /* FIXME get correct value from board spec */ - - /* wether board provides security extension */ - SECURITY_EXTENSION = 0, }; }; -#endif /* _INCLUDE__SPEC__PANDA__DRIVERS__BOARD_BASE_H_ */ +#endif /* _INCLUDE__DRIVERS__DEFS__PANDA_H_ */ diff --git a/repos/base/include/spec/pbxa9/drivers/board_base.h b/repos/base/include/drivers/defs/pbxa9.h similarity index 80% rename from repos/base/include/spec/pbxa9/drivers/board_base.h rename to repos/base/include/drivers/defs/pbxa9.h index 9cbfe2afcf..86bb12796a 100644 --- a/repos/base/include/spec/pbxa9/drivers/board_base.h +++ b/repos/base/include/drivers/defs/pbxa9.h @@ -1,5 +1,5 @@ /** - * \brief Driver for the Realview PBXA9 board + * \brief MMIO and IRQ definitions for the Realview PBXA9 board * \author Martin stein * \date 2011-11-03 */ @@ -11,17 +11,10 @@ * under the terms of the GNU Affero General Public License version 3. */ -#ifndef _INCLUDE__SPEC__PBXA9__DRIVERS__BOARD_BASE_H_ -#define _INCLUDE__SPEC__PBXA9__DRIVERS__BOARD_BASE_H_ +#ifndef _INCLUDE__DRIVERS__DEFS__PBXA9_H_ +#define _INCLUDE__DRIVERS__DEFS__PBXA9_H_ -namespace Genode { struct Board_base; } - - -/** - * Driver for the Realview PBXA9 board - */ -struct Genode::Board_base -{ +namespace Pbxa9 { enum { /* normal RAM */ @@ -87,10 +80,7 @@ struct Genode::Board_base /* CPU cache */ CACHE_LINE_SIZE_LOG2 = 2, /* FIXME get correct value from board spec */ - - /* wether board provides security extension */ - SECURITY_EXTENSION = 0, }; }; -#endif /* _INCLUDE__SPEC__PBXA9__DRIVERS__BOARD_BASE_H_ */ +#endif /* _INCLUDE__DRIVERS__DEFS__PBXA9_H_ */ diff --git a/repos/base/include/spec/rpi/drivers/board_base.h b/repos/base/include/drivers/defs/rpi.h similarity index 83% rename from repos/base/include/spec/rpi/drivers/board_base.h rename to repos/base/include/drivers/defs/rpi.h index 1732a1bf40..ef7594cde6 100644 --- a/repos/base/include/spec/rpi/drivers/board_base.h +++ b/repos/base/include/drivers/defs/rpi.h @@ -1,5 +1,5 @@ /* - * \brief Board definitions for the Raspberry Pi + * \brief MMIO and IRQ definitions for the Raspberry Pi * \author Norman Feske * \date 2013-04-05 */ @@ -11,17 +11,13 @@ * under the terms of the GNU Affero General Public License version 3. */ -#ifndef _INCLUDE__SPEC__RPI__DRIVERS__BOARD_BASE_H_ -#define _INCLUDE__SPEC__RPI__DRIVERS__BOARD_BASE_H_ +#ifndef _INCLUDE__DRIVERS__DEFS__RPI_H_ +#define _INCLUDE__DRIVERS__DEFS__RPI_H_ /* Genode includes */ #include -namespace Genode { struct Board_base; } - - -struct Genode::Board_base -{ +namespace Rpi { enum { RAM_0_BASE = 0x00000000, RAM_0_SIZE = 0x10000000, /* XXX ? */ @@ -61,8 +57,6 @@ struct Genode::Board_base /* USB host controller */ DWC_IRQ = 17, - SECURITY_EXTENSION = 0, - /* CPU cache */ CACHE_LINE_SIZE_LOG2 = 5, @@ -78,4 +72,4 @@ struct Genode::Board_base UNCACHED = 3 }; }; -#endif /* _INCLUDE__SPEC__RPI__DRIVERS__BOARD_BASE_H_ */ +#endif /* _INCLUDE__DRIVERS__DEFS__RPI_H_ */ diff --git a/repos/base/include/drivers/defs/usb_armory.h b/repos/base/include/drivers/defs/usb_armory.h new file mode 100644 index 0000000000..0b699c3368 --- /dev/null +++ b/repos/base/include/drivers/defs/usb_armory.h @@ -0,0 +1,30 @@ +/* + * \brief MMIO and IRQ definitions for the USB Armory + * \author Stefan Kalkowski + * \date 2012-10-24 + */ + +/* + * Copyright (C) 2012-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 _INCLUDE__DRIVERS__DEFS__USB_ARMORY_H_ +#define _INCLUDE__DRIVERS__DEFS__USB_ARMORY_H_ + +/* Genode includes */ +#include + +namespace Usb_armory { + + using namespace Imx53; + + enum { + RAM_BASE = RAM_BANK_0_BASE, + RAM_SIZE = 0x20000000, + }; +}; + +#endif /* _INCLUDE__DRIVERS__DEFS__USB_ARMORY_H_ */ diff --git a/repos/base/include/spec/imx6/drivers/board_base.h b/repos/base/include/drivers/defs/wand_quad.h similarity index 77% rename from repos/base/include/spec/imx6/drivers/board_base.h rename to repos/base/include/drivers/defs/wand_quad.h index 2d161f46eb..58eafdb132 100644 --- a/repos/base/include/spec/imx6/drivers/board_base.h +++ b/repos/base/include/drivers/defs/wand_quad.h @@ -1,5 +1,5 @@ /* - * \brief Board definitions for the Freescale i.MX6 + * \brief MMIO and IRQ definitions of the Wandboard Quad * \author Nikolay Golikov * \author Josef Soentgen * \author Martin Stein @@ -14,19 +14,10 @@ * under the terms of the GNU Affero General Public License version 3. */ -#ifndef _INCLUDE__SPEC__IMX6__DRIVERS__BOARD_BASE_H_ -#define _INCLUDE__SPEC__IMX6__DRIVERS__BOARD_BASE_H_ +#ifndef _INCLUDE__DRIVERS__DEFS__WAND_QUAD_H_ +#define _INCLUDE__DRIVERS__DEFS__WAND_QUAD_H_ -namespace Genode -{ - /** - * i.MX6 motherboard - */ - struct Board_base; -} - -struct Genode::Board_base -{ +namespace Wand_quad { enum { /* normal RAM */ RAM0_BASE = 0x10000000, @@ -71,10 +62,7 @@ struct Genode::Board_base /* CPU cache */ CACHE_LINE_SIZE_LOG2 = 5, - - /* wether board provides ARM security extension */ - SECURITY_EXTENSION = 1, }; }; -#endif /* _INCLUDE__SPEC__IMX6__DRIVERS__BOARD_BASE_H_ */ +#endif /* _INCLUDE__DRIVERS__DEFS__WAND_QUAD_H_ */ diff --git a/repos/base/include/spec/zynq/drivers/board_base_support.h b/repos/base/include/drivers/defs/zynq.h similarity index 78% rename from repos/base/include/spec/zynq/drivers/board_base_support.h rename to repos/base/include/drivers/defs/zynq.h index 6b78a1b725..6a9d721ed8 100644 --- a/repos/base/include/spec/zynq/drivers/board_base_support.h +++ b/repos/base/include/drivers/defs/zynq.h @@ -1,5 +1,5 @@ /* - * \brief Base driver for Xilinx Zynq platforms + * \brief MMIO and IRQ definitions common to Xilinx Zynq platforms * \author Mark Albers * \author Timo Wischer * \author Johannes Schlatow @@ -13,18 +13,11 @@ * under the terms of the GNU Affero General Public License version 3. */ -#ifndef _INCLUDE__SPEC__ZYNQ__DRIVERS__BOARD_BASE_SUPPORT_H_ -#define _INCLUDE__SPEC__ZYNQ__DRIVERS__BOARD_BASE_SUPPORT_H_ +#ifndef _INCLUDE__DRIVERS__DEFS__ZYNQ_H_ +#define _INCLUDE__DRIVERS__DEFS__ZYNQ_H_ -namespace Zynq { struct Board_base; } - -/** - * Base driver for the Zynq platform - */ -struct Zynq::Board_base -{ - enum - { +namespace Zynq { + enum { /* device IO memory */ MMIO_0_BASE = 0xe0000000, /* IOP devices */ MMIO_0_SIZE = 0x10000000, @@ -68,10 +61,7 @@ struct Zynq::Board_base EMAC_0_MMIO_BASE = 0xE000B000, EMAC_0_MMIO_SIZE = 0x1000, EMAC_0_IRQ = 54, - - /* wether board provides security extension */ - SECURITY_EXTENSION = 0, }; }; -#endif /* _INCLUDE__SPEC__ZYNQ__DRIVERS__BOARD_BASE_SUPPORT_H_ */ +#endif /* _INCLUDE__DRIVERS__DEFS__ZYNQ_H_ */ diff --git a/repos/base/include/spec/zynq_qemu/drivers/board_base.h b/repos/base/include/drivers/defs/zynq_qemu.h similarity index 52% rename from repos/base/include/spec/zynq_qemu/drivers/board_base.h rename to repos/base/include/drivers/defs/zynq_qemu.h index 94f917e018..04eeafda78 100644 --- a/repos/base/include/spec/zynq_qemu/drivers/board_base.h +++ b/repos/base/include/drivers/defs/zynq_qemu.h @@ -11,22 +11,19 @@ * under the terms of the GNU Affero General Public License version 3. */ -#ifndef _INCLUDE__SPEC__ZYNQ_QEMU__DRIVERS__BOARD_BASE_H_ -#define _INCLUDE__SPEC__ZYNQ_QEMU__DRIVERS__BOARD_BASE_H_ +#ifndef _INCLUDE__DRIVERS__DEFS__ZYNQ_QEMU_H_ +#define _INCLUDE__DRIVERS__DEFS__ZYNQ_QEMU_H_ -#include +#include -namespace Genode { struct Board_base; } +namespace Zynq_qemu { + + using namespace Zynq; -/** - * Base driver for the Zynq platform - */ -struct Genode::Board_base : Zynq::Board_base -{ enum { CORTEX_A9_PRIVATE_TIMER_CLK = 100000000, CORTEX_A9_PRIVATE_TIMER_DIV = 100, }; }; -#endif /* _INCLUDE__SPEC__ZYNQ_QEMU__DRIVERS__BOARD_BASE_H_ */ +#endif /* _INCLUDE__DRIVERS__DEFS__ZYNQ_QEMU_H_ */ diff --git a/repos/base/include/spec/exynos/drivers/uart_base.h b/repos/base/include/drivers/uart/exynos.h similarity index 93% rename from repos/base/include/spec/exynos/drivers/uart_base.h rename to repos/base/include/drivers/uart/exynos.h index 1c5b367236..11caafd5c2 100644 --- a/repos/base/include/spec/exynos/drivers/uart_base.h +++ b/repos/base/include/drivers/uart/exynos.h @@ -1,5 +1,5 @@ /* - * \brief Driver base for the Exynos UART + * \brief Driver for the Exynos UART * \author Martin stein * \date 2013-01-09 */ @@ -11,19 +11,19 @@ * under the terms of the GNU Affero General Public License version 3. */ -#ifndef _INCLUDE__SPEC__EXYNOS__DRIVERS__UART_BASE_H_ -#define _INCLUDE__SPEC__EXYNOS__DRIVERS__UART_BASE_H_ +#ifndef _INCLUDE__DRIVERS__UART__EXYNOS_H_ +#define _INCLUDE__DRIVERS__UART__EXYNOS_H_ /* Genode includes */ #include -namespace Genode { class Exynos_uart_base; } +namespace Genode { class Exynos_uart; } /** * Exynos UART driver base */ -class Genode::Exynos_uart_base : Mmio +class Genode::Exynos_uart: Mmio { protected: @@ -210,8 +210,8 @@ class Genode::Exynos_uart_base : Mmio * \param clock reference clock * \param baud_rate targeted baud rate */ - Exynos_uart_base(addr_t const base, unsigned const clock, - unsigned const baud_rate) : Mmio(base) + Exynos_uart(addr_t const base, unsigned const clock, + unsigned const baud_rate) : Mmio(base) { /* RX and TX FIFO reset */ write(1); @@ -242,4 +242,4 @@ class Genode::Exynos_uart_base : Mmio } }; -#endif /* _INCLUDE__SPEC__EXYNOS__DRIVERS__UART_BASE_H_ */ +#endif /* _INCLUDE__DRIVERS__UART__EXYNOS_H_ */ diff --git a/repos/base/include/spec/imx/drivers/uart_base.h b/repos/base/include/drivers/uart/imx.h similarity index 95% rename from repos/base/include/spec/imx/drivers/uart_base.h rename to repos/base/include/drivers/uart/imx.h index d15feb78f2..bc628b573d 100644 --- a/repos/base/include/spec/imx/drivers/uart_base.h +++ b/repos/base/include/drivers/uart/imx.h @@ -1,5 +1,5 @@ /* - * \brief Driver base for Freescale's i.MX UART-module + * \brief Driver for Freescale's i.MX UART * \author Norman Feske * \author Martin Stein * \date 2012-08-30 @@ -12,19 +12,19 @@ * under the terms of the GNU Affero General Public License version 3. */ -#ifndef _INCLUDE__SPEC__IMX__DRIVERS__UART_BASE_H_ -#define _INCLUDE__SPEC__IMX__DRIVERS__UART_BASE_H_ +#ifndef _INCLUDE__DRIVERS__UART__IMX_H_ +#define _INCLUDE__DRIVERS__UART__IMX_H_ /* Genode includes */ #include -namespace Genode { class Imx_uart_base; } +namespace Genode { class Imx_uart; } /** * Driver base for i.MX UART-module */ -class Genode::Imx_uart_base : Mmio +class Genode::Imx_uart: Mmio { /** * Control register 1 @@ -246,7 +246,7 @@ class Genode::Imx_uart_base : Mmio * * \param base device MMIO base */ - Imx_uart_base(addr_t base, uint32_t, uint32_t) : Mmio(base) + Imx_uart(addr_t base, uint32_t, uint32_t) : Mmio(base) { write(Cr1::init_value()); write(Cr2::init_value()); @@ -270,4 +270,4 @@ class Genode::Imx_uart_base : Mmio } }; -#endif /* _INCLUDE__SPEC__IMX__DRIVERS__UART_BASE_H_ */ +#endif /* _INCLUDE__DRIVERS__UART__IMX_H_ */ diff --git a/repos/base/include/spec/pl011/drivers/uart_base.h b/repos/base/include/drivers/uart/pl011.h similarity index 88% rename from repos/base/include/spec/pl011/drivers/uart_base.h rename to repos/base/include/drivers/uart/pl011.h index f65702f76f..0fe1201852 100644 --- a/repos/base/include/spec/pl011/drivers/uart_base.h +++ b/repos/base/include/drivers/uart/pl011.h @@ -1,5 +1,5 @@ /* - * \brief Driver base for the PrimeCell UART PL011 Revision r1p3 + * \brief Driver for the PrimeCell UART PL011 Revision r1p3 * \author Martin stein * \date 2011-10-17 */ @@ -11,19 +11,19 @@ * under the terms of the GNU Affero General Public License version 3. */ -#ifndef _INCLUDE__SPEC__PL011__DRIVERS__UART_BASE_H_ -#define _INCLUDE__SPEC__PL011__DRIVERS__UART_BASE_H_ +#ifndef _INCLUDE__DRIVERS__UART__PL011_H_ +#define _INCLUDE__DRIVERS__UART__PL011_H_ /* Genode includes */ #include -namespace Genode { class Pl011_base; } +namespace Genode { class Pl011_uart; } /** * Driver base for the PrimeCell UART PL011 Revision r1p3 */ -class Genode::Pl011_base : Mmio +class Genode::Pl011_uart : Mmio { protected: @@ -119,7 +119,7 @@ class Genode::Pl011_base : Mmio * \param clock device reference clock frequency * \param baud_rate targeted UART baud rate */ - inline Pl011_base(addr_t const base, uint32_t const clock, + inline Pl011_uart(addr_t const base, uint32_t const clock, uint32_t const baud_rate); /** @@ -129,7 +129,7 @@ class Genode::Pl011_base : Mmio }; -Genode::Pl011_base::Pl011_base(addr_t const base, uint32_t const clock, +Genode::Pl011_uart::Pl011_uart(addr_t const base, uint32_t const clock, uint32_t const baud_rate) : Mmio(base) { write(Uartcr::Uarten::bits(1) | @@ -165,7 +165,7 @@ Genode::Pl011_base::Pl011_base(addr_t const base, uint32_t const clock, } -void Genode::Pl011_base::put_char(char const c) +void Genode::Pl011_uart::put_char(char const c) { /* wait as long as the transmission buffer is full */ while (read()) ; @@ -176,4 +176,4 @@ void Genode::Pl011_base::put_char(char const c) } -#endif /* _INCLUDE__SPEC__PL011__DRIVERS__UART_BASE_H_ */ +#endif /* _INCLUDE__DRIVERS__UART__PL011_H_ */ diff --git a/repos/base/include/spec/tl16c750/drivers/uart_base.h b/repos/base/include/drivers/uart/tl16c750.h similarity index 93% rename from repos/base/include/spec/tl16c750/drivers/uart_base.h rename to repos/base/include/drivers/uart/tl16c750.h index 133f8a6a28..19169e6b77 100644 --- a/repos/base/include/spec/tl16c750/drivers/uart_base.h +++ b/repos/base/include/drivers/uart/tl16c750.h @@ -1,5 +1,5 @@ /* - * \brief Base UART driver for the Texas instruments TL16C750 module + * \brief UART driver for the Texas instruments TL16C750 module * \author Martin stein * \date 2011-10-17 */ @@ -11,13 +11,13 @@ * under the terms of the GNU Affero General Public License version 3. */ -#ifndef _INCLUDE__SPEC__TL16C750__DRIVERS__UART_BASE_H_ -#define _INCLUDE__SPEC__TL16C750__DRIVERS__UART_BASE_H_ +#ifndef _INCLUDE__DRIVERS__UART__TL16C750_H_ +#define _INCLUDE__DRIVERS__UART__TL16C750_H_ /* Genode includes */ #include -namespace Genode { class Tl16c750_base; } +namespace Genode { class Tl16c750_uart; } /** @@ -26,7 +26,7 @@ namespace Genode { class Tl16c750_base; } * In contrast to the abilities of the TL16C750, this driver targets only * the basic UART functionalities. */ -class Genode::Tl16c750_base : public Mmio +class Genode::Tl16c750_uart : public Mmio { protected: /** @@ -221,7 +221,7 @@ class Genode::Tl16c750_base : public Mmio * \param clock reference clock * \param baud_rate targeted baud rate */ - Tl16c750_base(addr_t const base, unsigned long const clock, + Tl16c750_uart(addr_t const base, unsigned long const clock, unsigned long const baud_rate) : Mmio(base) { /* reset and init UART */ @@ -243,4 +243,4 @@ class Genode::Tl16c750_base : public Mmio } }; -#endif /* _INCLUDE__SPEC__TL16C750__DRIVERS__UART_BASE_H_ */ +#endif /* _INCLUDE__DRIVERS__UART__TL16C750_H_ */ diff --git a/repos/base/include/spec/x86/drivers/uart_base.h b/repos/base/include/drivers/uart/x86_pc.h similarity index 85% rename from repos/base/include/spec/x86/drivers/uart_base.h rename to repos/base/include/drivers/uart/x86_pc.h index 91f2582f91..4b5466adef 100644 --- a/repos/base/include/spec/x86/drivers/uart_base.h +++ b/repos/base/include/drivers/uart/x86_pc.h @@ -1,5 +1,5 @@ /* - * \brief Console backend for NOVA + * \brief UART driver for the x86 PC * \author Norman Feske * \author Alexander Boettcher * \date 2009-12-28 @@ -12,15 +12,15 @@ * under the terms of the GNU Affero General Public License version 3. */ -#ifndef _INCLUDE__SPEC__X86__DRIVERS__UART_BASE_H_ -#define _INCLUDE__SPEC__X86__DRIVERS__UART_BASE_H_ +#ifndef _INCLUDE__DRIVERS__UART__X86_PC_H_ +#define _INCLUDE__DRIVERS__UART__X86_PC_H_ /* Genode includes */ #include -namespace Genode { class X86_uart_base; } +namespace Genode { class X86_uart; } -class Genode::X86_uart_base +class Genode::X86_uart { private: @@ -56,8 +56,8 @@ class Genode::X86_uart_base public: - X86_uart_base(addr_t const port, unsigned const clock, - unsigned const baud_rate) + X86_uart(addr_t const port, unsigned const clock, + unsigned const baud_rate) : _port(port) { @@ -111,4 +111,4 @@ class Genode::X86_uart_base } }; -#endif /* _INCLUDE__SPEC__X86__DRIVERS__UART_BASE_H_ */ +#endif /* _INCLUDE__DRIVERS__UART__X86_PC_H_ */ diff --git a/repos/base/include/spec/xilinx/drivers/uart_base.h b/repos/base/include/drivers/uart/xilinx.h similarity index 85% rename from repos/base/include/spec/xilinx/drivers/uart_base.h rename to repos/base/include/drivers/uart/xilinx.h index 010ec576e8..3db84c8fad 100644 --- a/repos/base/include/spec/xilinx/drivers/uart_base.h +++ b/repos/base/include/drivers/uart/xilinx.h @@ -11,18 +11,18 @@ * under the terms of the GNU Affero General Public License version 3. */ -#ifndef _INCLUDE__SPEC__XILINX__DRIVERS__UART_BASE_H_ -#define _INCLUDE__SPEC__XILINX__DRIVERS__UART_BASE_H_ +#ifndef _INCLUDE__DRIVERS__UART__XILINX_H_ +#define _INCLUDE__DRIVERS__UART__XILINX_H_ /* Genode includes */ #include -namespace Genode { class Xilinx_uartps_base; } +namespace Genode { class Xilinx_uart; } /** * Base driver Xilinx UART PS module */ -class Genode::Xilinx_uartps_base : public Mmio +class Genode::Xilinx_uart: public Mmio { protected: @@ -87,8 +87,8 @@ class Genode::Xilinx_uartps_base : public Mmio * \param clock reference clock * \param baud_rate targeted baud rate */ - Xilinx_uartps_base(addr_t const base, unsigned long const clock, - unsigned long const baud_rate) : Mmio(base) + Xilinx_uart(addr_t const base, unsigned long const clock, + unsigned long const baud_rate) : Mmio(base) { /* reset UART */ Uart_cr::access_t uart_cr = 0; @@ -126,4 +126,4 @@ class Genode::Xilinx_uartps_base : public Mmio } }; -#endif /* _INCLUDE__SPEC__XILINX__DRIVERS__UART_BASE_H_ */ +#endif /* _INCLUDE__DRIVERS__UART__XILINX_H_ */ diff --git a/repos/base/include/spec/exynos4/board_base.h b/repos/base/include/spec/exynos4/board_base.h deleted file mode 100644 index b3fb73f185..0000000000 --- a/repos/base/include/spec/exynos4/board_base.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * \brief Board-driver base - * \author Alexy Gallardo Segura - * \author Humberto López León - * \author Reinier Millo Sánchez - * \date 2015-04-28 - */ - -/* - * 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 _INCLUDE__SPEC__EXYNOS4__BOARD_BASE_H_ -#define _INCLUDE__SPEC__EXYNOS4__BOARD_BASE_H_ - -namespace Genode { struct Exynos4; } - - -/** - * Board-driver base - */ -struct Genode::Exynos4 -{ -}; - -#endif /* _INCLUDE__SPEC__EXYNOS4__BOARD_BASE_H_ */ diff --git a/repos/base/include/spec/imx53_qsb/drivers/board_base.h b/repos/base/include/spec/imx53_qsb/drivers/board_base.h deleted file mode 100644 index 5762a1d3f6..0000000000 --- a/repos/base/include/spec/imx53_qsb/drivers/board_base.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * \brief Board definitions for the i.MX53 starter board - * \author Stefan Kalkowski - * \date 2012-10-24 - */ - -/* - * Copyright (C) 2012-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 _INCLUDE__SPEC__IMX53_QSB__DRIVERS__BOARD_BASE_H_ -#define _INCLUDE__SPEC__IMX53_QSB__DRIVERS__BOARD_BASE_H_ - -/* Genode includes */ -#include - -namespace Genode { struct Board_base; } - - -/** - * i.MX53 starter board - */ -struct Genode::Board_base : Imx53::Board_base -{ - enum { - RAM0_BASE = 0x70000000, - RAM0_SIZE = 0x20000000, - RAM1_BASE = 0xb0000000, - RAM1_SIZE = 0x20000000, - }; -}; - -#endif /* _INCLUDE__SPEC__IMX53_QSB__DRIVERS__BOARD_BASE_H_ */ diff --git a/repos/base/include/spec/odroid_xu/drivers/board_base.h b/repos/base/include/spec/odroid_xu/drivers/board_base.h deleted file mode 100644 index afaa80310b..0000000000 --- a/repos/base/include/spec/odroid_xu/drivers/board_base.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * \brief Driver base for the Odroid XU board - * \author Stefan Kalkowski - * \date 2013-11-25 - */ - -/* - * 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 _INCLUDE__SPEC__ODROID_XU__DRIVERS__BOARD_BASE_H_ -#define _INCLUDE__SPEC__ODROID_XU__DRIVERS__BOARD_BASE_H_ - -/* Genode includes */ -#include - -namespace Genode { struct Board_base; } - - -/** - * Board driver base - */ -struct Genode::Board_base : Exynos5 -{ - enum - { - /* UART */ - UART_2_CLOCK = 62668800, - - /* wether board provides security extension */ - SECURITY_EXTENSION = 0, - }; -}; - -#endif /* _INCLUDE__SPEC__ODROID_XU__DRIVERS__BOARD_BASE_H_ */ diff --git a/repos/base/include/spec/usb_armory/drivers/board_base.h b/repos/base/include/spec/usb_armory/drivers/board_base.h deleted file mode 100644 index 7d359cd97a..0000000000 --- a/repos/base/include/spec/usb_armory/drivers/board_base.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * \brief Board definitions for the i.MX53 starter board - * \author Stefan Kalkowski - * \date 2012-10-24 - */ - -/* - * Copyright (C) 2012-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 _INCLUDE__SPEC__USB_ARMORY__DRIVERS__BOARD_BASE_H_ -#define _INCLUDE__SPEC__USB_ARMORY__DRIVERS__BOARD_BASE_H_ - -/* Genode includes */ -#include - -namespace Genode { struct Board_base; } - - -/** - * i.MX53 starter board - */ -struct Genode::Board_base : Imx53::Board_base -{ - enum { - /* - * These two regions are physically one RAM region but we split it - * to keep the enum names compliant with other i.MX53 boards. This - * way, more files can be shared between the platforms. - */ - RAM0_BASE = 0x70000000, - RAM0_SIZE = 0x10000000, - RAM1_BASE = 0x80000000, - RAM1_SIZE = 0x10000000, - }; -}; - -#endif /* _INCLUDE__SPEC__USB_ARMORY__DRIVERS__BOARD_BASE_H_ */ diff --git a/repos/dde_linux/src/lib/usb/spec/arndale/platform.cc b/repos/dde_linux/src/lib/usb/spec/arndale/platform.cc index 2deb95e4c0..509054ddae 100644 --- a/repos/dde_linux/src/lib/usb/spec/arndale/platform.cc +++ b/repos/dde_linux/src/lib/usb/spec/arndale/platform.cc @@ -12,7 +12,7 @@ */ /* Genode */ -#include +#include #include #include #include @@ -32,8 +32,8 @@ enum { DWC3_BASE = 0x12000000, DWC3_PHY_BASE = 0x12100000, GPIO_BASE = 0x11400000, - EHCI_IRQ = Board_base::USB_HOST20_IRQ, - DWC3_IRQ = Board_base::USB_DRD30_IRQ, + EHCI_IRQ = Arndale::USB_HOST20_IRQ, + DWC3_IRQ = Arndale::USB_DRD30_IRQ, }; static resource _ehci[] = diff --git a/repos/dde_linux/src/lib/usb/spec/odroid_x2/platform.cc b/repos/dde_linux/src/lib/usb/spec/odroid_x2/platform.cc index 4c3deb467a..85eaf85123 100644 --- a/repos/dde_linux/src/lib/usb/spec/odroid_x2/platform.cc +++ b/repos/dde_linux/src/lib/usb/spec/odroid_x2/platform.cc @@ -15,7 +15,7 @@ */ /* Genode */ -#include +#include #include #include #include @@ -37,7 +37,7 @@ enum { EHCI_BASE = 0x12580000, GPIO_BASE = 0x11000000, USBOTG = 0x125B0000, - EHCI_IRQ = Board_base::USB_HOST20_IRQ, + EHCI_IRQ = Odroid_x2::USB_HOST20_IRQ, }; static resource _ehci[] = diff --git a/repos/dde_linux/src/lib/usb/spec/panda/platform.cc b/repos/dde_linux/src/lib/usb/spec/panda/platform.cc index 84d639667c..de3e20b197 100644 --- a/repos/dde_linux/src/lib/usb/spec/panda/platform.cc +++ b/repos/dde_linux/src/lib/usb/spec/panda/platform.cc @@ -13,7 +13,7 @@ #include -#include +#include #include #include #include @@ -39,7 +39,7 @@ enum { /** * Inerrupt numbers */ -enum { IRQ_EHCI = Board_base::HSUSB_EHCI_IRQ }; +enum { IRQ_EHCI = Panda::HSUSB_EHCI_IRQ }; /** diff --git a/repos/os/include/spec/pbxa9/lan9118_defs.h b/repos/os/include/spec/pbxa9/lan9118_defs.h deleted file mode 100644 index fb1d1d1ba0..0000000000 --- a/repos/os/include/spec/pbxa9/lan9118_defs.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * \brief LAN 9118 NIC controller definitions for the RealView platform - * \author Norman Feske - * \date 2010-03-23 - */ - -/* - * Copyright (C) 2010-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 _INCLUDE__SPEC__PBXA9__LAN9118_DEFS_H_ -#define _INCLUDE__SPEC__PBXA9__LAN9118_DEFS_H_ - -#include - -enum { - - /** - * Base address of MMIO resource - */ - LAN9118_PHYS = 0x4e000000, - - /** - * Size of MMIO resource - * - * On the RealView platform, the device spans actually a much larger - * resource. However, only the first page is used. - */ - LAN9118_SIZE = 0x1000, - - /** - * Interrupt line - */ - LAN9118_IRQ = Genode::Board_base::ETHERNET_IRQ, -}; - -#endif /* _INCLUDE__SPEC__PBXA9__LAN9118_DEFS_H_ */ diff --git a/repos/os/include/spec/pbxa9/pl050_defs.h b/repos/os/include/spec/pbxa9/pl050_defs.h deleted file mode 100644 index 2c2d11b67d..0000000000 --- a/repos/os/include/spec/pbxa9/pl050_defs.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * \brief PL050 PS/2 controller definitions for the RealView platform - * \author Norman Feske - * \date 2010-03-23 - */ - -/* - * Copyright (C) 2010-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 _INCLUDE__SPEC__PBXA9__PL050_DEFS_H_ -#define _INCLUDE__SPEC__PBXA9__PL050_DEFS_H_ - -#include - -enum { - PL050_KEYBD_PHYS = 0x10006000, PL050_KEYBD_SIZE = 0x1000, - PL050_MOUSE_PHYS = 0x10007000, PL050_MOUSE_SIZE = 0x1000, - - /** - * Interrupt lines - */ - PL050_KEYBD_IRQ = Genode::Board_base::KMI_0_IRQ, - PL050_MOUSE_IRQ = Genode::Board_base::KMI_1_IRQ, -}; - -#endif /* _INCLUDE__SPEC__PBXA9__PL050_DEFS_H_ */ diff --git a/repos/os/include/spec/rpi/platform/property_message.h b/repos/os/include/spec/rpi/platform/property_message.h index eb74fea264..f9fa1f6683 100644 --- a/repos/os/include/spec/rpi/platform/property_message.h +++ b/repos/os/include/spec/rpi/platform/property_message.h @@ -19,7 +19,7 @@ #include /* board-specific includes */ -#include +#include namespace Platform { using namespace Genode; @@ -199,9 +199,9 @@ struct Platform::Property_message static unsigned channel() { return 8; } - static Board_base::Videocore_cache_policy cache_policy() + static Rpi::Videocore_cache_policy cache_policy() { - return Board_base::NON_COHERENT; /* for channel 8 only */ + return Rpi::NON_COHERENT; /* for channel 8 only */ } void dump(char const *label) diff --git a/repos/os/lib/mk/spec/pl180/sd_card_bench.mk b/repos/os/lib/mk/spec/pbxa9/sd_card_bench.mk similarity index 50% rename from repos/os/lib/mk/spec/pl180/sd_card_bench.mk rename to repos/os/lib/mk/spec/pbxa9/sd_card_bench.mk index bad767bbe3..4fbb7b1900 100644 --- a/repos/os/lib/mk/spec/pl180/sd_card_bench.mk +++ b/repos/os/lib/mk/spec/pbxa9/sd_card_bench.mk @@ -1,5 +1,5 @@ -INC_DIR += $(REP_DIR)/src/drivers/sd_card/spec/pl180 -SRC_CC += spec/pl180/driver.cc +INC_DIR += $(REP_DIR)/src/drivers/sd_card/spec/pbxa9 +SRC_CC += spec/pbxa9/driver.cc vpath main.cc $(REP_DIR)/src/test/sd_card_bench diff --git a/repos/os/lib/mk/spec/pbxa9/sd_card_drv.mk b/repos/os/lib/mk/spec/pbxa9/sd_card_drv.mk new file mode 100644 index 0000000000..662320a499 --- /dev/null +++ b/repos/os/lib/mk/spec/pbxa9/sd_card_drv.mk @@ -0,0 +1,4 @@ +INC_DIR += $(REP_DIR)/src/drivers/sd_card/spec/pbxa9 +SRC_CC += spec/pbxa9/driver.cc + +include $(REP_DIR)/lib/mk/sd_card.inc diff --git a/repos/os/lib/mk/spec/pl180/sd_card_drv.mk b/repos/os/lib/mk/spec/pl180/sd_card_drv.mk deleted file mode 100644 index 401fc7c825..0000000000 --- a/repos/os/lib/mk/spec/pl180/sd_card_drv.mk +++ /dev/null @@ -1,4 +0,0 @@ -INC_DIR += $(REP_DIR)/src/drivers/sd_card/spec/pl180 -SRC_CC += spec/pl180/driver.cc - -include $(REP_DIR)/lib/mk/sd_card.inc diff --git a/repos/os/src/drivers/ahci/spec/exynos5/platform.cc b/repos/os/src/drivers/ahci/spec/exynos5/platform.cc index d9f1d95ceb..b713b6ee7a 100644 --- a/repos/os/src/drivers/ahci/spec/exynos5/platform.cc +++ b/repos/os/src/drivers/ahci/spec/exynos5/platform.cc @@ -12,7 +12,7 @@ * under the terms of the GNU Affero General Public License version 3. */ -#include +#include #include #include #include @@ -326,7 +326,7 @@ struct Exynos5_hba : Platform::Hba { Genode::Env &env; - Irq_connection irq { env, Board_base::SATA_IRQ }; + Irq_connection irq { env, Exynos5::SATA_IRQ }; Regulator::Connection clock_src { env, Regulator::CLK_SATA }; Regulator::Connection power_src { env, Regulator::PWR_SATA }; diff --git a/repos/os/src/drivers/framebuffer/spec/exynos/driver.cc b/repos/os/src/drivers/framebuffer/spec/exynos5/driver.cc similarity index 99% rename from repos/os/src/drivers/framebuffer/spec/exynos/driver.cc rename to repos/os/src/drivers/framebuffer/spec/exynos5/driver.cc index 1fec661753..52836ef71c 100644 --- a/repos/os/src/drivers/framebuffer/spec/exynos/driver.cc +++ b/repos/os/src/drivers/framebuffer/spec/exynos5/driver.cc @@ -19,7 +19,7 @@ #include #include #include -#include +#include using namespace Genode; @@ -357,7 +357,7 @@ class Video_mixer : public Attached_mmio * Constructor */ Video_mixer(Genode::Env &env) - : Attached_mmio(env, Genode::Board_base::MIXER_BASE, 0x10000) { } + : Attached_mmio(env, Exynos5::MIXER_BASE, 0x10000) { } /** * Initialize mixer for displaying one graphical input fullscreen @@ -513,8 +513,8 @@ class I2c_hdmi : public I2c_interface * Constructor */ I2c_hdmi(Genode::Env &env, Mmio::Delayer &delayer) - : I2c_interface(env, Genode::Board_base::I2C_BASE, - Genode::Board_base::I2C_HDMI_IRQ, delayer), + : I2c_interface(env, Exynos5::I2C_BASE, + Exynos5::I2C_HDMI_IRQ, delayer), _delayer(delayer) { } @@ -901,7 +901,7 @@ class Hdmi : public Attached_mmio * Constructor */ Hdmi(Genode::Env &env, Mmio::Delayer &delayer) - : Attached_mmio(env, Genode::Board_base::HDMI_BASE, 0xa0000), + : Attached_mmio(env, Exynos5::HDMI_BASE, 0xa0000), _i2c_hdmi(env, delayer), _delayer(delayer) { } diff --git a/repos/os/src/drivers/framebuffer/spec/exynos/driver.h b/repos/os/src/drivers/framebuffer/spec/exynos5/driver.h similarity index 100% rename from repos/os/src/drivers/framebuffer/spec/exynos/driver.h rename to repos/os/src/drivers/framebuffer/spec/exynos5/driver.h diff --git a/repos/os/src/drivers/framebuffer/spec/exynos/main.cc b/repos/os/src/drivers/framebuffer/spec/exynos5/main.cc similarity index 100% rename from repos/os/src/drivers/framebuffer/spec/exynos/main.cc rename to repos/os/src/drivers/framebuffer/spec/exynos5/main.cc diff --git a/repos/os/src/drivers/framebuffer/spec/exynos/target.mk b/repos/os/src/drivers/framebuffer/spec/exynos5/target.mk similarity index 81% rename from repos/os/src/drivers/framebuffer/spec/exynos/target.mk rename to repos/os/src/drivers/framebuffer/spec/exynos5/target.mk index e755543775..2529ff1b4c 100644 --- a/repos/os/src/drivers/framebuffer/spec/exynos/target.mk +++ b/repos/os/src/drivers/framebuffer/spec/exynos5/target.mk @@ -1,5 +1,5 @@ TARGET = fb_drv -REQUIRES = exynos +REQUIRES = exynos5 SRC_CC += main.cc driver.cc LIBS += base INC_DIR += $(PRG_DIR) diff --git a/repos/os/src/drivers/framebuffer/spec/imx53/driver.h b/repos/os/src/drivers/framebuffer/spec/imx53/driver.h index 12dbbdbafa..96cb4f2972 100644 --- a/repos/os/src/drivers/framebuffer/spec/imx53/driver.h +++ b/repos/os/src/drivers/framebuffer/spec/imx53/driver.h @@ -15,7 +15,7 @@ #define _DRIVERS__FRAMEBUFFER__SPEC__IMX53__DRIVER_H_ /* Genode includes */ -#include +#include #include #include #include @@ -66,9 +66,9 @@ class Framebuffer::Driver Driver(Genode::Env &env) : _env(env), _platform(_env), - _ipu_mmio(_env, Board_base::IPU_BASE, Board_base::IPU_SIZE), + _ipu_mmio(_env, Imx53::IPU_BASE, Imx53::IPU_SIZE), _ipu((addr_t)_ipu_mmio.local_addr()), - _pwm_mmio(_env, Board_base::PWM2_BASE, Board_base::PWM2_SIZE), + _pwm_mmio(_env, Imx53::PWM2_BASE, Imx53::PWM2_SIZE), _pwm((addr_t)_pwm_mmio.local_addr()), _board(_platform.revision()), _width(_board == Platform::Session::QSB ? QSB_WIDTH : SMD_WIDTH), diff --git a/repos/os/src/drivers/framebuffer/spec/imx53/ipu.h b/repos/os/src/drivers/framebuffer/spec/imx53/ipu.h index e8d0c6b688..e994579c54 100644 --- a/repos/os/src/drivers/framebuffer/spec/imx53/ipu.h +++ b/repos/os/src/drivers/framebuffer/spec/imx53/ipu.h @@ -18,7 +18,6 @@ /* Genode includes */ #include #include -#include #include diff --git a/repos/os/src/drivers/framebuffer/spec/omap4/driver.h b/repos/os/src/drivers/framebuffer/spec/omap4/driver.h index b91b690931..c15a6c0823 100644 --- a/repos/os/src/drivers/framebuffer/spec/omap4/driver.h +++ b/repos/os/src/drivers/framebuffer/spec/omap4/driver.h @@ -13,7 +13,7 @@ */ /* Genode includes */ -#include +#include #include #include #include @@ -99,13 +99,13 @@ class Framebuffer::Driver Framebuffer::Driver::Driver(Genode::Env &env) : _env(env), - _dss_mmio(_env, Board_base::DSS_MMIO_BASE, Board_base::DSS_MMIO_SIZE), + _dss_mmio(_env, Panda::DSS_MMIO_BASE, Panda::DSS_MMIO_SIZE), _dss((addr_t)_dss_mmio.local_addr()), - _dispc_mmio(_env, Board_base::DISPC_MMIO_BASE, Board_base::DISPC_MMIO_SIZE), + _dispc_mmio(_env, Panda::DISPC_MMIO_BASE, Panda::DISPC_MMIO_SIZE), _dispc((addr_t)_dispc_mmio.local_addr()), - _hdmi_mmio(_env, Board_base::HDMI_MMIO_BASE, Board_base::HDMI_MMIO_SIZE), + _hdmi_mmio(_env, Panda::HDMI_MMIO_BASE, Panda::HDMI_MMIO_SIZE), _hdmi((addr_t)_hdmi_mmio.local_addr()), _fb_width(0), diff --git a/repos/os/src/drivers/gpio/spec/exynos4/driver.h b/repos/os/src/drivers/gpio/spec/exynos4/driver.h index e6fef50bdb..26fe3737d5 100644 --- a/repos/os/src/drivers/gpio/spec/exynos4/driver.h +++ b/repos/os/src/drivers/gpio/spec/exynos4/driver.h @@ -18,7 +18,6 @@ #define _DRIVER_H_ /* Genode includes */ -#include #include #include #include diff --git a/repos/os/src/drivers/gpio/spec/imx53/driver.h b/repos/os/src/drivers/gpio/spec/imx53/driver.h index cc601f8e16..60c549a80a 100644 --- a/repos/os/src/drivers/gpio/spec/imx53/driver.h +++ b/repos/os/src/drivers/gpio/spec/imx53/driver.h @@ -18,7 +18,7 @@ #define _DRIVERS__GPIO__SPEC__IMX53__DRIVER_H_ /* Genode includes */ -#include +#include #include #include #include @@ -149,20 +149,20 @@ class Imx53_driver : public Gpio::Driver Imx53_driver(Genode::Env &env) : - _gpio_bank_0(env, Genode::Board_base::GPIO1_MMIO_BASE, Genode::Board_base::GPIO1_MMIO_SIZE, - Genode::Board_base::GPIO1_IRQL, Genode::Board_base::GPIO1_IRQH), - _gpio_bank_1(env, Genode::Board_base::GPIO2_MMIO_BASE, Genode::Board_base::GPIO2_MMIO_SIZE, - Genode::Board_base::GPIO2_IRQL, Genode::Board_base::GPIO2_IRQH), - _gpio_bank_2(env, Genode::Board_base::GPIO3_MMIO_BASE, Genode::Board_base::GPIO3_MMIO_SIZE, - Genode::Board_base::GPIO3_IRQL, Genode::Board_base::GPIO3_IRQH), - _gpio_bank_3(env, Genode::Board_base::GPIO4_MMIO_BASE, Genode::Board_base::GPIO4_MMIO_SIZE, - Genode::Board_base::GPIO4_IRQL, Genode::Board_base::GPIO4_IRQH), - _gpio_bank_4(env, Genode::Board_base::GPIO5_MMIO_BASE, Genode::Board_base::GPIO5_MMIO_SIZE, - Genode::Board_base::GPIO5_IRQL, Genode::Board_base::GPIO5_IRQH), - _gpio_bank_5(env, Genode::Board_base::GPIO6_MMIO_BASE, Genode::Board_base::GPIO6_MMIO_SIZE, - Genode::Board_base::GPIO6_IRQL, Genode::Board_base::GPIO6_IRQH), - _gpio_bank_6(env, Genode::Board_base::GPIO7_MMIO_BASE, Genode::Board_base::GPIO7_MMIO_SIZE, - Genode::Board_base::GPIO7_IRQL, Genode::Board_base::GPIO7_IRQH) + _gpio_bank_0(env, Imx53::GPIO1_MMIO_BASE, Imx53::GPIO1_MMIO_SIZE, + Imx53::GPIO1_IRQL, Imx53::GPIO1_IRQH), + _gpio_bank_1(env, Imx53::GPIO2_MMIO_BASE, Imx53::GPIO2_MMIO_SIZE, + Imx53::GPIO2_IRQL, Imx53::GPIO2_IRQH), + _gpio_bank_2(env, Imx53::GPIO3_MMIO_BASE, Imx53::GPIO3_MMIO_SIZE, + Imx53::GPIO3_IRQL, Imx53::GPIO3_IRQH), + _gpio_bank_3(env, Imx53::GPIO4_MMIO_BASE, Imx53::GPIO4_MMIO_SIZE, + Imx53::GPIO4_IRQL, Imx53::GPIO4_IRQH), + _gpio_bank_4(env, Imx53::GPIO5_MMIO_BASE, Imx53::GPIO5_MMIO_SIZE, + Imx53::GPIO5_IRQL, Imx53::GPIO5_IRQH), + _gpio_bank_5(env, Imx53::GPIO6_MMIO_BASE, Imx53::GPIO6_MMIO_SIZE, + Imx53::GPIO6_IRQL, Imx53::GPIO6_IRQH), + _gpio_bank_6(env, Imx53::GPIO7_MMIO_BASE, Imx53::GPIO7_MMIO_SIZE, + Imx53::GPIO7_IRQL, Imx53::GPIO7_IRQH) { for (unsigned i = 0; i < MAX_BANKS; ++i) { Gpio_reg *regs = _gpio_bank(i << PIN_SHIFT)->regs(); diff --git a/repos/os/src/drivers/gpio/spec/omap4/driver.h b/repos/os/src/drivers/gpio/spec/omap4/driver.h index a735fafc7a..494ba0e7de 100644 --- a/repos/os/src/drivers/gpio/spec/omap4/driver.h +++ b/repos/os/src/drivers/gpio/spec/omap4/driver.h @@ -17,7 +17,7 @@ #define _DRIVERS__GPIO__SPEC__OMAP4__DRIVER_H_ /* Genode includes */ -#include +#include #include #include #include @@ -129,18 +129,18 @@ class Omap4_driver : public Gpio::Driver Omap4_driver(Genode::Env &env) : - _gpio_bank_0(env, Genode::Board_base::GPIO1_MMIO_BASE, Genode::Board_base::GPIO1_MMIO_SIZE, - Genode::Board_base::GPIO1_IRQ), - _gpio_bank_1(env, Genode::Board_base::GPIO2_MMIO_BASE, Genode::Board_base::GPIO2_MMIO_SIZE, - Genode::Board_base::GPIO2_IRQ), - _gpio_bank_2(env, Genode::Board_base::GPIO3_MMIO_BASE, Genode::Board_base::GPIO3_MMIO_SIZE, - Genode::Board_base::GPIO3_IRQ), - _gpio_bank_3(env, Genode::Board_base::GPIO4_MMIO_BASE, Genode::Board_base::GPIO4_MMIO_SIZE, - Genode::Board_base::GPIO4_IRQ), - _gpio_bank_4(env, Genode::Board_base::GPIO5_MMIO_BASE, Genode::Board_base::GPIO5_MMIO_SIZE, - Genode::Board_base::GPIO5_IRQ), - _gpio_bank_5(env, Genode::Board_base::GPIO6_MMIO_BASE, Genode::Board_base::GPIO6_MMIO_SIZE, - Genode::Board_base::GPIO6_IRQ) + _gpio_bank_0(env, Panda::GPIO1_MMIO_BASE, Panda::GPIO1_MMIO_SIZE, + Panda::GPIO1_IRQ), + _gpio_bank_1(env, Panda::GPIO2_MMIO_BASE, Panda::GPIO2_MMIO_SIZE, + Panda::GPIO2_IRQ), + _gpio_bank_2(env, Panda::GPIO3_MMIO_BASE, Panda::GPIO3_MMIO_SIZE, + Panda::GPIO3_IRQ), + _gpio_bank_3(env, Panda::GPIO4_MMIO_BASE, Panda::GPIO4_MMIO_SIZE, + Panda::GPIO4_IRQ), + _gpio_bank_4(env, Panda::GPIO5_MMIO_BASE, Panda::GPIO5_MMIO_SIZE, + Panda::GPIO5_IRQ), + _gpio_bank_5(env, Panda::GPIO6_MMIO_BASE, Panda::GPIO6_MMIO_SIZE, + Panda::GPIO6_IRQ) { } public: diff --git a/repos/os/src/drivers/gpio/spec/rpi/driver.h b/repos/os/src/drivers/gpio/spec/rpi/driver.h index 2caddcfc17..9032232c03 100644 --- a/repos/os/src/drivers/gpio/spec/rpi/driver.h +++ b/repos/os/src/drivers/gpio/spec/rpi/driver.h @@ -19,7 +19,7 @@ /* Genode includes */ #include -#include +#include #include #include @@ -54,8 +54,7 @@ class Gpio::Rpi_driver : public Driver Rpi_driver(Genode::Env &env) : - _reg(env, Genode::Board_base::GPIO_CONTROLLER_BASE, - 0, Genode::Board_base::GPIO_CONTROLLER_SIZE), + _reg(env, Rpi::GPIO_CONTROLLER_BASE, 0, Rpi::GPIO_CONTROLLER_SIZE), _irq(env, IRQ), _dispatcher(env.ep(), *this, &Rpi_driver::_handle), _async(false) diff --git a/repos/os/src/drivers/gpio/spec/rpi/foc/irq.h b/repos/os/src/drivers/gpio/spec/rpi/foc/irq.h index e6ca9c5a59..9a2774a6de 100644 --- a/repos/os/src/drivers/gpio/spec/rpi/foc/irq.h +++ b/repos/os/src/drivers/gpio/spec/rpi/foc/irq.h @@ -14,12 +14,6 @@ #ifndef _DRIVERS__GPIO__SPEC__RPI__SPEC__FOC__IRQ_H_ #define _DRIVERS__GPIO__SPEC__RPI__SPEC__FOC__IRQ_H_ -/* Genode includes */ -#include - -namespace Gpio -{ - enum { IRQ = 49 }; -} +namespace Gpio { enum { IRQ = 49 }; } #endif /* _DRIVERS__GPIO__SPEC__RPI__SPEC__FOC__IRQ_H_ */ diff --git a/repos/os/src/drivers/gpio/spec/rpi/hw/irq.h b/repos/os/src/drivers/gpio/spec/rpi/hw/irq.h index 6382a8aea4..8d05ce43b7 100644 --- a/repos/os/src/drivers/gpio/spec/rpi/hw/irq.h +++ b/repos/os/src/drivers/gpio/spec/rpi/hw/irq.h @@ -15,11 +15,11 @@ #define _DRIVERS__GPIO__SPEC__RPI__SPEC__HW__IRQ_H_ /* Genode includes */ -#include +#include namespace Gpio { - enum { IRQ = Genode::Board_base::GPU_IRQ_BASE + 49 }; + enum { IRQ = Rpi::GPU_IRQ_BASE + 49 }; } #endif /* _DRIVERS__GPIO__SPEC__RPI__SPEC__HW__IRQ_H_ */ diff --git a/repos/os/src/drivers/input/spec/imx53/egalax_ts.h b/repos/os/src/drivers/input/spec/imx53/egalax_ts.h index c05626db9e..7b447ce15b 100644 --- a/repos/os/src/drivers/input/spec/imx53/egalax_ts.h +++ b/repos/os/src/drivers/input/spec/imx53/egalax_ts.h @@ -15,7 +15,7 @@ #define _DRIVERS__INPUT__SPEC__IMX53__EGALAX_TS_H_ /* Genode includes */ -#include +#include #include #include #include @@ -46,10 +46,8 @@ class Input::Touchscreen { Touchscreen(Genode::Env &env, Timer::Connection &timer) : - _irq_handler(env, Genode::Board_base::I2C_3_IRQ), - _i2c_ds(env, - Genode::Board_base::I2C_3_BASE, - Genode::Board_base::I2C_3_SIZE), + _irq_handler(env, Imx53::I2C_3_IRQ), + _i2c_ds(env, Imx53::I2C_3_BASE, Imx53::I2C_3_SIZE), _i2c(timer, (Genode::addr_t)_i2c_ds.local_addr(), _irq_handler), diff --git a/repos/os/src/drivers/input/spec/imx53/mpr121.h b/repos/os/src/drivers/input/spec/imx53/mpr121.h index 81fd29a816..998140ac5d 100644 --- a/repos/os/src/drivers/input/spec/imx53/mpr121.h +++ b/repos/os/src/drivers/input/spec/imx53/mpr121.h @@ -15,7 +15,7 @@ #define _DRIVERS__INPUT__SPEC__IMX53__MPR121_H_ /* Genode includes */ -#include +#include #include #include #include @@ -54,10 +54,8 @@ class Input::Buttons { Buttons(Genode::Env &env, Timer::Connection &timer) : - _irq_handler(env, Genode::Board_base::I2C_2_IRQ), - _i2c_ds(env, - Genode::Board_base::I2C_2_BASE, - Genode::Board_base::I2C_2_SIZE), + _irq_handler(env, Imx53::I2C_2_IRQ), + _i2c_ds(env, Imx53::I2C_2_BASE, Imx53::I2C_2_SIZE), _i2c(timer, (Genode::addr_t)_i2c_ds.local_addr(), _irq_handler), diff --git a/repos/os/src/drivers/input/spec/ps2/pl050/irq_handler.h b/repos/os/src/drivers/input/spec/ps2/pbxa9/irq_handler.h similarity index 100% rename from repos/os/src/drivers/input/spec/ps2/pl050/irq_handler.h rename to repos/os/src/drivers/input/spec/ps2/pbxa9/irq_handler.h diff --git a/repos/os/src/drivers/input/spec/ps2/pl050/main.cc b/repos/os/src/drivers/input/spec/ps2/pbxa9/main.cc similarity index 77% rename from repos/os/src/drivers/input/spec/ps2/pl050/main.cc rename to repos/os/src/drivers/input/spec/ps2/pbxa9/main.cc index d06cfc9800..0fb41a1287 100644 --- a/repos/os/src/drivers/input/spec/ps2/pl050/main.cc +++ b/repos/os/src/drivers/input/spec/ps2/pbxa9/main.cc @@ -14,6 +14,7 @@ /* Genode includes */ #include #include +#include #include #include @@ -30,7 +31,17 @@ struct Ps2::Main { Genode::Env &_env; - Pl050 _pl050 { _env }; + enum { + PL050_KEYBD_PHYS = 0x10006000, + PL050_KEYBD_SIZE = 0x1000, + PL050_MOUSE_PHYS = 0x10007000, + PL050_MOUSE_SIZE = 0x1000, + PL050_KEYBD_IRQ = Pbxa9::KMI_0_IRQ, + PL050_MOUSE_IRQ = Pbxa9::KMI_1_IRQ, + }; + + Pl050 _pl050 { _env, PL050_KEYBD_PHYS, PL050_KEYBD_SIZE, + PL050_MOUSE_PHYS, PL050_MOUSE_SIZE }; Input::Session_component _session { _env, _env.ram() }; Input::Root_component _root { _env.ep().rpc_ep(), _session }; diff --git a/repos/os/src/drivers/input/spec/ps2/pl050/pl050.h b/repos/os/src/drivers/input/spec/ps2/pbxa9/pl050.h similarity index 91% rename from repos/os/src/drivers/input/spec/ps2/pl050/pl050.h rename to repos/os/src/drivers/input/spec/ps2/pbxa9/pl050.h index e19902a5e6..13f733ea20 100644 --- a/repos/os/src/drivers/input/spec/ps2/pl050/pl050.h +++ b/repos/os/src/drivers/input/spec/ps2/pbxa9/pl050.h @@ -14,9 +14,6 @@ #ifndef _DRIVERS__INPUT__SPEC__PS2__PL050__PL050_H_ #define _DRIVERS__INPUT__SPEC__PS2__PL050__PL050_H_ -/* platform includes */ -#include - /* Genode includes */ #include #include @@ -126,12 +123,13 @@ class Pl050 public: - /** - * Constructor - */ - Pl050(Genode::Env &env) : - _kbd(env, PL050_KEYBD_PHYS, PL050_KEYBD_SIZE), - _aux(env, PL050_MOUSE_PHYS, PL050_MOUSE_SIZE) + Pl050(Genode::Env &env, + Genode::addr_t keyb_mmio_base, + Genode::size_t keyb_mmio_size, + Genode::addr_t mouse_mmio_base, + Genode::size_t mouse_mmio_size) : + _kbd(env, keyb_mmio_base, keyb_mmio_size), + _aux(env, mouse_mmio_base, mouse_mmio_size) { _kbd.enable_irq(); _aux.enable_irq(); diff --git a/repos/os/src/drivers/input/spec/ps2/pl050/target.mk b/repos/os/src/drivers/input/spec/ps2/pbxa9/target.mk similarity index 84% rename from repos/os/src/drivers/input/spec/ps2/pl050/target.mk rename to repos/os/src/drivers/input/spec/ps2/pbxa9/target.mk index 3311bd4044..34543bdfb6 100644 --- a/repos/os/src/drivers/input/spec/ps2/pl050/target.mk +++ b/repos/os/src/drivers/input/spec/ps2/pbxa9/target.mk @@ -1,5 +1,5 @@ TARGET = ps2_drv -REQUIRES = pl050 +REQUIRES = pbxa9 SRC_CC = main.cc LIBS = base diff --git a/repos/os/src/drivers/nic/spec/gem/main.cc b/repos/os/src/drivers/nic/spec/gem/main.cc index c32075f2a1..11d340cbc7 100644 --- a/repos/os/src/drivers/nic/spec/gem/main.cc +++ b/repos/os/src/drivers/nic/spec/gem/main.cc @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include "cadence_gem.h" @@ -48,9 +48,9 @@ class Server::Gem_session_component : public Cadence_gem Genode::Env &env) : Cadence_gem(tx_buf_size, rx_buf_size, rx_block_md_alloc, env, - Board_base::EMAC_0_MMIO_BASE, - Board_base::EMAC_0_MMIO_SIZE, - Board_base::EMAC_0_IRQ), + Zynq::EMAC_0_MMIO_BASE, + Zynq::EMAC_0_MMIO_SIZE, + Zynq::EMAC_0_IRQ), _config_rom(env, "config") { Nic::Mac_address mac_addr; diff --git a/repos/os/src/drivers/nic/spec/gem/system_control.h b/repos/os/src/drivers/nic/spec/gem/system_control.h index 5913e74f8f..7947b21692 100644 --- a/repos/os/src/drivers/nic/spec/gem/system_control.h +++ b/repos/os/src/drivers/nic/spec/gem/system_control.h @@ -18,7 +18,7 @@ #include #include -#include +#include using namespace Genode; @@ -113,7 +113,7 @@ class System_control : private Genode::Attached_mmio public: System_control(Genode::Env &env, Timer::Connection &timer) : - Attached_mmio(env, Board_base::MMIO_1_BASE, 0xB80), + Attached_mmio(env, Zynq::MMIO_1_BASE, 0xB80), _timer(timer) { Lock_guard lock(*this); diff --git a/repos/os/src/drivers/nic/spec/lan9118/lan9118.h b/repos/os/src/drivers/nic/spec/pbxa9/lan9118.h similarity index 100% rename from repos/os/src/drivers/nic/spec/lan9118/lan9118.h rename to repos/os/src/drivers/nic/spec/pbxa9/lan9118.h diff --git a/repos/os/src/drivers/nic/spec/lan9118/main.cc b/repos/os/src/drivers/nic/spec/pbxa9/main.cc similarity index 85% rename from repos/os/src/drivers/nic/spec/lan9118/main.cc rename to repos/os/src/drivers/nic/spec/pbxa9/main.cc index 13810c6ff2..78b019e9aa 100644 --- a/repos/os/src/drivers/nic/spec/lan9118/main.cc +++ b/repos/os/src/drivers/nic/spec/pbxa9/main.cc @@ -21,9 +21,7 @@ #include #include #include - -/* device definitions */ -#include +#include /* driver code */ #include @@ -32,6 +30,27 @@ class Root : public Genode::Root_component { private: + enum { + + /** + * Base address of MMIO resource + */ + LAN9118_PHYS = 0x4e000000, + + /** + * Size of MMIO resource + * + * On the RealView platform, the device spans actually a much larger + * resource. However, only the first page is used. + */ + LAN9118_SIZE = 0x1000, + + /** + * Interrupt line + */ + LAN9118_IRQ = Pbxa9::ETHERNET_IRQ, + }; + Genode::Env &_env; protected: @@ -81,4 +100,3 @@ void Component::construct(Genode::Env &env) Genode::log("--- LAN9118 NIC driver started ---"); env.parent().announce(env.ep().manage(nic_root)); } - diff --git a/repos/os/src/drivers/nic/spec/lan9118/target.mk b/repos/os/src/drivers/nic/spec/pbxa9/target.mk similarity index 80% rename from repos/os/src/drivers/nic/spec/lan9118/target.mk rename to repos/os/src/drivers/nic/spec/pbxa9/target.mk index 5e8635fe9c..8f14e68cea 100644 --- a/repos/os/src/drivers/nic/spec/lan9118/target.mk +++ b/repos/os/src/drivers/nic/spec/pbxa9/target.mk @@ -1,4 +1,4 @@ -REQUIRES = lan9118 +REQUIRES = pbxa9 TARGET = nic_drv SRC_CC = main.cc LIBS = base diff --git a/repos/os/src/drivers/platform/spec/arndale/cmu.h b/repos/os/src/drivers/platform/spec/arndale/cmu.h index 2dcd7fcd43..874b263ae8 100644 --- a/repos/os/src/drivers/platform/spec/arndale/cmu.h +++ b/repos/os/src/drivers/platform/spec/arndale/cmu.h @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include using namespace Regulator; @@ -434,8 +434,8 @@ class Cmu : public Regulator::Driver, * Constructor */ Cmu(Genode::Env &env) - : Genode::Attached_mmio(env, Genode::Board_base::CMU_MMIO_BASE, - Genode::Board_base::CMU_MMIO_SIZE), + : Genode::Attached_mmio(env, Arndale::CMU_MMIO_BASE, + Arndale::CMU_MMIO_SIZE), _cpu_freq(CPU_FREQ_1600) { /** diff --git a/repos/os/src/drivers/platform/spec/arndale/pmu.h b/repos/os/src/drivers/platform/spec/arndale/pmu.h index fbc67b228a..a153d4f3eb 100644 --- a/repos/os/src/drivers/platform/spec/arndale/pmu.h +++ b/repos/os/src/drivers/platform/spec/arndale/pmu.h @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include using namespace Regulator; @@ -160,8 +160,8 @@ class Pmu : public Regulator::Driver, * Constructor */ Pmu(Genode::Env &env) - : Genode::Attached_mmio(env, Genode::Board_base::PMU_MMIO_BASE, - Genode::Board_base::PMU_MMIO_SIZE) + : Genode::Attached_mmio(env, Arndale::PMU_MMIO_BASE, + Arndale::PMU_MMIO_SIZE) { write(0); write(0); diff --git a/repos/os/src/drivers/platform/spec/imx53/ccm.h b/repos/os/src/drivers/platform/spec/imx53/ccm.h index 0d7d8d51bb..c8783a4579 100644 --- a/repos/os/src/drivers/platform/spec/imx53/ccm.h +++ b/repos/os/src/drivers/platform/spec/imx53/ccm.h @@ -17,7 +17,7 @@ /* Genode includes */ #include -#include +#include #include class Ccm : public Genode::Attached_io_mem_dataspace, @@ -66,8 +66,8 @@ class Ccm : public Genode::Attached_io_mem_dataspace, public: Ccm(Genode::Env &env) - : Genode::Attached_io_mem_dataspace(env, Genode::Board_base::CCM_BASE, - Genode::Board_base::CCM_SIZE), + : Genode::Attached_io_mem_dataspace(env, Imx53::CCM_BASE, + Imx53::CCM_SIZE), Genode::Mmio((Genode::addr_t)local_addr()) { } void i2c_1_enable(void) { write(3); } diff --git a/repos/os/src/drivers/platform/spec/imx53/iim.h b/repos/os/src/drivers/platform/spec/imx53/iim.h index 94be6cf63e..11c3e24015 100644 --- a/repos/os/src/drivers/platform/spec/imx53/iim.h +++ b/repos/os/src/drivers/platform/spec/imx53/iim.h @@ -16,7 +16,7 @@ /* Genode includes */ #include -#include +#include #include class Iim : public Genode::Attached_io_mem_dataspace, @@ -29,8 +29,8 @@ class Iim : public Genode::Attached_io_mem_dataspace, public: Iim(Genode::Env &env) - : Genode::Attached_io_mem_dataspace(env, Genode::Board_base::IIM_BASE, - Genode::Board_base::IIM_SIZE), + : Genode::Attached_io_mem_dataspace(env, Imx53::IIM_BASE, + Imx53::IIM_SIZE), Genode::Mmio((Genode::addr_t)local_addr()) {} unsigned long revision() { return read() & 0xf; } diff --git a/repos/os/src/drivers/platform/spec/imx53/iomux.h b/repos/os/src/drivers/platform/spec/imx53/iomux.h index 726fd5f2d7..a8d01ffcda 100644 --- a/repos/os/src/drivers/platform/spec/imx53/iomux.h +++ b/repos/os/src/drivers/platform/spec/imx53/iomux.h @@ -16,7 +16,7 @@ /* Genode includes */ #include -#include +#include #include class Iomux : public Genode::Attached_io_mem_dataspace, @@ -59,8 +59,8 @@ class Iomux : public Genode::Attached_io_mem_dataspace, public: Iomux(Genode::Env &env) - : Genode::Attached_io_mem_dataspace(env, Genode::Board_base::IOMUXC_BASE, - Genode::Board_base::IOMUXC_SIZE), + : Genode::Attached_io_mem_dataspace(env, Imx53::IOMUXC_BASE, + Imx53::IOMUXC_SIZE), Genode::Mmio((Genode::addr_t)local_addr()) { } diff --git a/repos/os/src/drivers/platform/spec/imx53/src.h b/repos/os/src/drivers/platform/spec/imx53/src.h index d943213424..c3ad8cd1a6 100644 --- a/repos/os/src/drivers/platform/spec/imx53/src.h +++ b/repos/os/src/drivers/platform/spec/imx53/src.h @@ -17,7 +17,7 @@ /* Genode includes */ #include -#include +#include #include class Src : public Genode::Attached_io_mem_dataspace, @@ -33,8 +33,8 @@ class Src : public Genode::Attached_io_mem_dataspace, public: Src(Genode::Env &env) - : Genode::Attached_io_mem_dataspace(env, Genode::Board_base::SRC_BASE, - Genode::Board_base::SRC_SIZE), + : Genode::Attached_io_mem_dataspace(env, Imx53::SRC_BASE, + Imx53::SRC_SIZE), Genode::Mmio((Genode::addr_t)local_addr()) {} void reset_ipu() { write(1); } diff --git a/repos/os/src/drivers/platform/spec/odroid_x2/cmu.h b/repos/os/src/drivers/platform/spec/odroid_x2/cmu.h index eab7d101cd..40276f6826 100644 --- a/repos/os/src/drivers/platform/spec/odroid_x2/cmu.h +++ b/repos/os/src/drivers/platform/spec/odroid_x2/cmu.h @@ -18,7 +18,7 @@ #include #include -#include +#include #include #include @@ -312,8 +312,8 @@ class Cmu : public Regulator::Driver, * Constructor */ Cmu(Genode::Env &env) - : Genode::Attached_mmio(env, Genode::Board_base::CMU_MMIO_BASE, - Genode::Board_base::CMU_MMIO_SIZE), + : Genode::Attached_mmio(env, Odroid_x2::CMU_MMIO_BASE, + Odroid_x2::CMU_MMIO_SIZE), _cpu_freq(CPU_FREQ_1400) { /** diff --git a/repos/os/src/drivers/platform/spec/odroid_x2/pmu.h b/repos/os/src/drivers/platform/spec/odroid_x2/pmu.h index 9cb342bc62..a6564188f9 100644 --- a/repos/os/src/drivers/platform/spec/odroid_x2/pmu.h +++ b/repos/os/src/drivers/platform/spec/odroid_x2/pmu.h @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include using Genode::warning; @@ -113,8 +113,8 @@ class Pmu : public Regulator::Driver, * Constructor */ Pmu(Genode::Env &env) - : Genode::Attached_mmio(env, Genode::Board_base::PMU_MMIO_BASE, - Genode::Board_base::PMU_MMIO_SIZE) + : Genode::Attached_mmio(env, Odroid_x2::PMU_MMIO_BASE, + Odroid_x2::PMU_MMIO_SIZE) { write(0); write(0); diff --git a/repos/os/src/drivers/platform/spec/rpi/framebuffer_message.h b/repos/os/src/drivers/platform/spec/rpi/framebuffer_message.h index 511a09a9df..fb4ef36a75 100644 --- a/repos/os/src/drivers/platform/spec/rpi/framebuffer_message.h +++ b/repos/os/src/drivers/platform/spec/rpi/framebuffer_message.h @@ -19,7 +19,7 @@ #include /* board-specific includes */ -#include +#include #include namespace Platform { struct Framebuffer_message; } @@ -36,9 +36,8 @@ struct Platform::Framebuffer_message : Framebuffer_info static unsigned channel() { return 1; } - static Genode::Board_base::Videocore_cache_policy cache_policy() - { - return Genode::Board_base::COHERENT; + static Rpi::Videocore_cache_policy cache_policy() { + return Rpi::COHERENT; } void dump(char const *label) diff --git a/repos/os/src/drivers/sd_card/spec/exynos5/driver.h b/repos/os/src/drivers/sd_card/spec/exynos5/driver.h index 1aaab219e8..2129c5e06e 100644 --- a/repos/os/src/drivers/sd_card/spec/exynos5/driver.h +++ b/repos/os/src/drivers/sd_card/spec/exynos5/driver.h @@ -18,7 +18,7 @@ /* Genode includes */ #include #include -#include +#include #include #include #include @@ -175,7 +175,7 @@ class Sd_card::Driver : public Driver_base, Block_transfer _block_transfer; Clock_regulator _clock_regulator { _env }; Signal_handler _irq_handler { _env.ep(), *this, &Driver::_handle_irq }; - Irq_connection _irq { Board_base::SDMMC0_IRQ }; + Irq_connection _irq { Exynos5::SDMMC0_IRQ }; Attached_ram_dataspace _idmac_desc_ds { &_env.ram(), IDMAC_DESC_MAX_ENTRIES * sizeof(Idmac_desc), UNCACHED }; diff --git a/repos/os/src/drivers/sd_card/spec/imx/driver.cc b/repos/os/src/drivers/sd_card/spec/imx/driver.cc index 533bcf72bf..4dadb12cc6 100644 --- a/repos/os/src/drivers/sd_card/spec/imx/driver.cc +++ b/repos/os/src/drivers/sd_card/spec/imx/driver.cc @@ -237,7 +237,7 @@ void Driver::write_dma(Block::sector_t blk_nr, Driver::Driver(Env &env) : Driver_base(env.ram()), - Attached_mmio(env, Board_base::SDHC_MMIO_BASE, Board_base::SDHC_MMIO_SIZE), + Attached_mmio(env, Imx53::SDHC_MMIO_BASE, Imx53::SDHC_MMIO_SIZE), _env(env) { log("SD card detected"); diff --git a/repos/os/src/drivers/sd_card/spec/imx/driver.h b/repos/os/src/drivers/sd_card/spec/imx/driver.h index 62cea2b78a..7d9502b49a 100644 --- a/repos/os/src/drivers/sd_card/spec/imx/driver.h +++ b/repos/os/src/drivers/sd_card/spec/imx/driver.h @@ -15,7 +15,7 @@ #define _DRIVER_H_ /* Genode includes */ -#include +#include #include #include #include @@ -216,7 +216,7 @@ class Sd_card::Driver : public Driver_base, Timer_delayer _delayer; Signal_handler _irq_handler { _env.ep(), *this, &Driver::_handle_irq }; - Irq_connection _irq { Board_base::SDHC_IRQ }; + Irq_connection _irq { Imx53::SDHC_IRQ }; Card_info _card_info { _init() }; Adma2::Table _adma2_table { _env.ram() }; diff --git a/repos/os/src/drivers/sd_card/spec/omap4/driver.h b/repos/os/src/drivers/sd_card/spec/omap4/driver.h index d2d04fd1ef..84d5c1c6a6 100644 --- a/repos/os/src/drivers/sd_card/spec/omap4/driver.h +++ b/repos/os/src/drivers/sd_card/spec/omap4/driver.h @@ -16,7 +16,7 @@ /* Genode includes */ #include -#include +#include #include #include @@ -167,7 +167,7 @@ class Sd_card::Driver : public Driver_base, Block_transfer _block_transfer; Timer_delayer _delayer; Signal_handler _irq_handler { _ep, *this, &Driver::_handle_irq }; - Irq_connection _irq { Board_base::HSMMC_IRQ }; + Irq_connection _irq { Panda::HSMMC_IRQ }; Card_info _card_info { _init() }; Card_info _init(); diff --git a/repos/os/include/spec/pbxa9/pl180_defs.h b/repos/os/src/drivers/sd_card/spec/pbxa9/board.h similarity index 81% rename from repos/os/include/spec/pbxa9/pl180_defs.h rename to repos/os/src/drivers/sd_card/spec/pbxa9/board.h index 87395e93c6..bbebddae55 100644 --- a/repos/os/include/spec/pbxa9/pl180_defs.h +++ b/repos/os/src/drivers/sd_card/spec/pbxa9/board.h @@ -14,7 +14,7 @@ #ifndef _INCLUDE__SPEC__PBXA9__PL180_DEFS_H_ #define _INCLUDE__SPEC__PBXA9__PL180_DEFS_H_ -#include +#include enum { PL180_PHYS = 0x10005000, PL180_SIZE = 0x1000, @@ -22,8 +22,8 @@ enum { /** * Interrupt lines */ - PL180_IRQ0 = Genode::Board_base::PL180_IRQ_0, - PL180_IRQ1 = Genode::Board_base::PL180_IRQ_1, + PL180_IRQ0 = Pbxa9::PL180_IRQ_0, + PL180_IRQ1 = Pbxa9::PL180_IRQ_1, }; #endif /* _INCLUDE__SPEC__PBXA9__PL180_DEFS_H_ */ diff --git a/repos/os/src/drivers/sd_card/spec/pl180/driver.cc b/repos/os/src/drivers/sd_card/spec/pbxa9/driver.cc similarity index 100% rename from repos/os/src/drivers/sd_card/spec/pl180/driver.cc rename to repos/os/src/drivers/sd_card/spec/pbxa9/driver.cc diff --git a/repos/os/src/drivers/sd_card/spec/pl180/driver.h b/repos/os/src/drivers/sd_card/spec/pbxa9/driver.h similarity index 99% rename from repos/os/src/drivers/sd_card/spec/pl180/driver.h rename to repos/os/src/drivers/sd_card/spec/pbxa9/driver.h index d0382f5860..fc8593d9f6 100644 --- a/repos/os/src/drivers/sd_card/spec/pl180/driver.h +++ b/repos/os/src/drivers/sd_card/spec/pbxa9/driver.h @@ -18,9 +18,10 @@ /* local includes */ #include #include -#include #include +#include "board.h" + namespace Sd_card { using namespace Genode; diff --git a/repos/os/src/drivers/sd_card/spec/rpi/driver.cc b/repos/os/src/drivers/sd_card/spec/rpi/driver.cc index 935374e6a1..d04772635c 100644 --- a/repos/os/src/drivers/sd_card/spec/rpi/driver.cc +++ b/repos/os/src/drivers/sd_card/spec/rpi/driver.cc @@ -24,7 +24,7 @@ using namespace Sd_card; Driver::Driver(Env &env) : Driver_base(env.ram()), - Attached_mmio(env, Board_base::SDHCI_BASE, Board_base::SDHCI_SIZE), + Attached_mmio(env, Rpi::SDHCI_BASE, Rpi::SDHCI_SIZE), _ram(env.ram()) { log("SD card detected"); diff --git a/repos/os/src/drivers/sd_card/spec/rpi/driver.h b/repos/os/src/drivers/sd_card/spec/rpi/driver.h index 8ea315da07..dfe59a7d55 100644 --- a/repos/os/src/drivers/sd_card/spec/rpi/driver.h +++ b/repos/os/src/drivers/sd_card/spec/rpi/driver.h @@ -18,7 +18,7 @@ /* Genode includes */ #include -#include +#include #include #include @@ -155,7 +155,7 @@ class Sd_card::Driver : public Driver_base, Ram_session &_ram; Timer_delayer _delayer; - Irq_connection _irq { Board_base::SDHCI_IRQ }; + Irq_connection _irq { Rpi::SDHCI_IRQ }; Card_info _card_info { _init() }; template diff --git a/repos/os/src/drivers/uart/spec/exynos5/target.mk b/repos/os/src/drivers/uart/spec/arndale/target.mk similarity index 71% rename from repos/os/src/drivers/uart/spec/exynos5/target.mk rename to repos/os/src/drivers/uart/spec/arndale/target.mk index 2d98a508bd..daa5ce4ae7 100644 --- a/repos/os/src/drivers/uart/spec/exynos5/target.mk +++ b/repos/os/src/drivers/uart/spec/arndale/target.mk @@ -1,3 +1,3 @@ -REQUIRES = exynos5 +REQUIRES = arndale include $(REP_DIR)/src/drivers/uart/target.inc diff --git a/repos/os/src/drivers/uart/spec/exynos5/uart_driver.h b/repos/os/src/drivers/uart/spec/arndale/uart_driver.h similarity index 80% rename from repos/os/src/drivers/uart/spec/exynos5/uart_driver.h rename to repos/os/src/drivers/uart/spec/arndale/uart_driver.h index 9628fd5eee..aefbe10ee3 100644 --- a/repos/os/src/drivers/uart/spec/exynos5/uart_driver.h +++ b/repos/os/src/drivers/uart/spec/arndale/uart_driver.h @@ -18,8 +18,8 @@ /* Genode includes */ #include #include -#include -#include +#include +#include enum { UARTS_NUM = 2 }; /* needed by base class definitions */ @@ -28,7 +28,7 @@ enum { UARTS_NUM = 2 }; /* needed by base class definitions */ class Uart::Driver : public Genode::Attached_io_mem_dataspace, - public Genode::Exynos_uart_base, + public Genode::Exynos_uart, public Uart::Driver_base { private: @@ -50,8 +50,8 @@ class Uart::Driver : public Genode::Attached_io_mem_dataspace, * temporary workaround having first UART twice * (most run-scripts have first UART reserved for the kernel) */ - { Board_base::UART_2_MMIO_BASE, 4096, Board_base::UART_2_IRQ }, - { Board_base::UART_2_MMIO_BASE, 4096, Board_base::UART_2_IRQ }, + { Exynos5::UART_2_MMIO_BASE, 4096, Exynos5::UART_2_IRQ }, + { Exynos5::UART_2_MMIO_BASE, 4096, Exynos5::UART_2_IRQ }, }; return cfg[index]; } @@ -70,9 +70,8 @@ class Uart::Driver : public Genode::Attached_io_mem_dataspace, unsigned baud_rate, Char_avail_functor &func) : Genode::Attached_io_mem_dataspace(env, _config(index).mmio_base, _config(index).mmio_size), - Exynos_uart_base((Genode::addr_t)local_addr(), - Genode::Board_base::UART_2_CLOCK, - _baud_rate(baud_rate)), + Exynos_uart((Genode::addr_t)local_addr(), + Arndale::UART_2_CLOCK, _baud_rate(baud_rate)), Driver_base(env, _config(index).irq_number, func) { _rx_enable(); } @@ -81,7 +80,7 @@ class Uart::Driver : public Genode::Attached_io_mem_dataspace, ** UART driver interface ** ***************************/ - void put_char(char c) override { Exynos_uart_base::put_char(c); } + void put_char(char c) override { Exynos_uart::put_char(c); } bool char_avail() override { return _rx_avail(); } char get_char() override { return _rx_char(); } }; diff --git a/repos/os/src/drivers/uart/spec/panda/uart_driver.h b/repos/os/src/drivers/uart/spec/panda/uart_driver.h index ac30081c26..8cd7f28b80 100644 --- a/repos/os/src/drivers/uart/spec/panda/uart_driver.h +++ b/repos/os/src/drivers/uart/spec/panda/uart_driver.h @@ -19,8 +19,8 @@ /* Genode includes */ #include #include -#include -#include +#include +#include enum { UARTS_NUM = 4 }; /* needed by base class definitions */ @@ -28,7 +28,7 @@ enum { UARTS_NUM = 4 }; /* needed by base class definitions */ #include class Uart::Driver : public Genode::Attached_io_mem_dataspace, - public Genode::Tl16c750_base, + public Genode::Tl16c750_uart, public Uart::Driver_base { private: @@ -71,14 +71,14 @@ class Uart::Driver : public Genode::Attached_io_mem_dataspace, using namespace Genode; static Uart cfg[UARTS_NUM] = { - { Board_base::TL16C750_1_MMIO_BASE, Board_base::TL16C750_MMIO_SIZE, - Board_base::TL16C750_1_IRQ }, - { Board_base::TL16C750_2_MMIO_BASE, Board_base::TL16C750_MMIO_SIZE, - Board_base::TL16C750_2_IRQ }, - { Board_base::TL16C750_3_MMIO_BASE, Board_base::TL16C750_MMIO_SIZE, - Board_base::TL16C750_3_IRQ }, - { Board_base::TL16C750_4_MMIO_BASE, Board_base::TL16C750_MMIO_SIZE, - Board_base::TL16C750_4_IRQ }, + { Panda::TL16C750_1_MMIO_BASE, Panda::TL16C750_MMIO_SIZE, + Panda::TL16C750_1_IRQ }, + { Panda::TL16C750_2_MMIO_BASE, Panda::TL16C750_MMIO_SIZE, + Panda::TL16C750_2_IRQ }, + { Panda::TL16C750_3_MMIO_BASE, Panda::TL16C750_MMIO_SIZE, + Panda::TL16C750_3_IRQ }, + { Panda::TL16C750_4_MMIO_BASE, Panda::TL16C750_MMIO_SIZE, + Panda::TL16C750_4_IRQ }, }; return cfg[index]; } @@ -98,8 +98,8 @@ class Uart::Driver : public Genode::Attached_io_mem_dataspace, unsigned baud_rate, Char_avail_functor &func) : Genode::Attached_io_mem_dataspace(env, _config(index).mmio_base, _config(index).mmio_size), - Tl16c750_base((Genode::addr_t)local_addr(), - Genode::Board_base::TL16C750_CLOCK, + Tl16c750_uart((Genode::addr_t)local_addr(), + Panda::TL16C750_CLOCK, _baud_rate(baud_rate)), Driver_base(env, _config(index).irq_number, func) { _enable_rx_interrupt(); } @@ -119,7 +119,7 @@ class Uart::Driver : public Genode::Attached_io_mem_dataspace, Driver_base::handle_irq(); } - void put_char(char c) override { Tl16c750_base::put_char(c); } + void put_char(char c) override { Tl16c750_uart::put_char(c); } bool char_avail() override { return read(); } @@ -127,7 +127,7 @@ class Uart::Driver : public Genode::Attached_io_mem_dataspace, void baud_rate(int bits_per_second) override { - _init(Genode::Board_base::TL16C750_CLOCK, bits_per_second); + _init(Panda::TL16C750_CLOCK, bits_per_second); _enable_rx_interrupt(); } }; diff --git a/repos/os/src/drivers/uart/spec/pbxa9/uart_driver.h b/repos/os/src/drivers/uart/spec/pbxa9/uart_driver.h index 4ddfb41982..5b7e84f019 100644 --- a/repos/os/src/drivers/uart/spec/pbxa9/uart_driver.h +++ b/repos/os/src/drivers/uart/spec/pbxa9/uart_driver.h @@ -18,7 +18,7 @@ /* Genode includes */ #include #include -#include +#include enum { UARTS_NUM = 4 }; /* needed by base class definitions */ @@ -44,10 +44,10 @@ class Uart::Driver : public Genode::Attached_io_mem_dataspace, /** * Interrupt lines */ - PL011_IRQ0 = Genode::Board_base::PL011_0_IRQ, /* UART 0 */ - PL011_IRQ1 = Genode::Board_base::PL011_1_IRQ, /* UART 1 */ - PL011_IRQ2 = Genode::Board_base::PL011_2_IRQ, /* UART 2 */ - PL011_IRQ3 = Genode::Board_base::PL011_3_IRQ, /* UART 3 */ + PL011_IRQ0 = Pbxa9::PL011_0_IRQ, /* UART 0 */ + PL011_IRQ1 = Pbxa9::PL011_1_IRQ, /* UART 1 */ + PL011_IRQ2 = Pbxa9::PL011_2_IRQ, /* UART 2 */ + PL011_IRQ3 = Pbxa9::PL011_3_IRQ, /* UART 3 */ /** * UART baud rate configuration (precalculated) diff --git a/repos/os/src/server/tz_vmm/spec/imx53/main.cc b/repos/os/src/server/tz_vmm/spec/imx53/main.cc index 4dacccf223..8c38874238 100644 --- a/repos/os/src/server/tz_vmm/spec/imx53/main.cc +++ b/repos/os/src/server/tz_vmm/spec/imx53/main.cc @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include /* local includes */ @@ -53,7 +53,7 @@ class Main Trustzone::NONSECURE_RAM_SIZE, KERNEL_OFFSET, Machine_type(MACHINE_QSB), Board_revision(BOARD_QSB) }; - M4if _m4if { _env, Board_base::M4IF_BASE, Board_base::M4IF_SIZE }; + M4if _m4if { _env, Imx53::M4IF_BASE, Imx53::M4IF_SIZE }; Serial_driver _serial { _env.ram() }; Block_driver _block { _env.ep(), _config.xml(), _heap, _vm }; diff --git a/repos/os/src/server/vmm/board.h b/repos/os/src/server/vmm/board.h index 573efb2fce..bf2ca24684 100644 --- a/repos/os/src/server/vmm/board.h +++ b/repos/os/src/server/vmm/board.h @@ -71,9 +71,6 @@ struct Vea9x4::Board CORTEX_A9_PRIVATE_MEM_SIZE = 0x2000, CORTEX_A9_PRIVATE_TIMER_CLK = 200010000, - /* wether board provides security extension */ - SECURITY_EXTENSION = 1, - /* CPU cache */ CACHE_LINE_SIZE_LOG2 = 2, /* FIXME get correct value from board spec */ }; diff --git a/repos/os/src/server/vmm/main.cc b/repos/os/src/server/vmm/main.cc index 40a233d6d4..46f5aa1bc3 100644 --- a/repos/os/src/server/vmm/main.cc +++ b/repos/os/src/server/vmm/main.cc @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include #include @@ -620,7 +620,7 @@ class Vmm enum Irqs { SGI_MAX = 15, - TIMER = Genode::Board_base::VT_TIMER_IRQ, + TIMER = Exynos5::VT_TIMER_IRQ, MAX_IRQ = 256, }; @@ -859,7 +859,7 @@ class Vmm void irq_occured() { switch(_vm.state().gic_irq) { - case Genode::Board_base::VT_MAINTAINANCE_IRQ: + case Exynos5::VT_MAINTAINANCE_IRQ: _handle_eoi(); return; case TIMER: @@ -877,8 +877,6 @@ class Vmm { private: - using Board = Genode::Board_base; - Timer::Connection _timer; Signal_handler _handler; Gic &_gic; @@ -887,7 +885,7 @@ class Vmm { _vm.state().timer_ctrl = 5; _vm.state().timer_val = 0xffffffff; - _gic.inject_irq(Board::VT_TIMER_IRQ); + _gic.inject_irq(Exynos5::VT_TIMER_IRQ); } public: @@ -904,7 +902,7 @@ class Vmm _gic(gic) { _timer.sigh(_handler); - _gic.register_irq(Board::VT_TIMER_IRQ, this, true); + _gic.register_irq(Exynos5::VT_TIMER_IRQ, this, true); } void schedule_timeout()