diff --git a/repos/base-hw/src/bootstrap/spec/arndale/board.h b/repos/base-hw/src/bootstrap/spec/arndale/board.h index aa86cf561..318babade 100644 --- a/repos/base-hw/src/bootstrap/spec/arndale/board.h +++ b/repos/base-hw/src/bootstrap/spec/arndale/board.h @@ -14,24 +14,11 @@ #ifndef _SRC__BOOTSTRAP__SPEC__ARNDALE__BOARD_H_ #define _SRC__BOOTSTRAP__SPEC__ARNDALE__BOARD_H_ -#include -#include - -#include +#include #include #include #include -namespace Board { - - using namespace Arndale; - using Cpu_mmio = Hw::Cortex_a15_mmio; - using Serial = Genode::Exynos_uart; - - enum { - UART_BASE = UART_2_MMIO_BASE, - UART_CLOCK = UART_2_CLOCK, - }; -} +namespace Board { using namespace Hw::Arndale_board; } #endif /* _SRC__BOOTSTRAP__SPEC__ARNDALE__BOARD_H_ */ 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 c64cad532..dc60a225a 100644 --- a/repos/base-hw/src/bootstrap/spec/imx53_qsb/board.h +++ b/repos/base-hw/src/bootstrap/spec/imx53_qsb/board.h @@ -14,21 +14,14 @@ #ifndef _SRC__BOOTSTRAP__SPEC__IMX53_QSB__BOARD_H_ #define _SRC__BOOTSTRAP__SPEC__IMX53_QSB__BOARD_H_ -#include -#include +#include #include #include #include namespace Board { - using namespace Imx53_qsb; - using Serial = Genode::Imx_uart; - - enum { - UART_BASE = UART_1_MMIO_BASE, - UART_CLOCK = 0, /* ignored value */ - }; + using namespace Hw::Imx53_qsb_board; bool secure_irq(unsigned irq); } diff --git a/repos/base-hw/src/bootstrap/spec/imx6q_sabrelite/board.h b/repos/base-hw/src/bootstrap/spec/imx6q_sabrelite/board.h index d1a7827e2..a8c9acfaa 100644 --- a/repos/base-hw/src/bootstrap/spec/imx6q_sabrelite/board.h +++ b/repos/base-hw/src/bootstrap/spec/imx6q_sabrelite/board.h @@ -14,29 +14,16 @@ #ifndef _SRC__BOOTSTRAP__SPEC__IMX6Q_SABRELITE__BOARD_H_ #define _SRC__BOOTSTRAP__SPEC__IMX6Q_SABRELITE__BOARD_H_ -#include -#include -#include -#include - +#include #include #include #include #include namespace Board { - - using namespace Imx6q_sabrelite; + using namespace Hw::Imx6q_sabrelite_board; struct L2_cache; - using Cpu_mmio = Hw::Cortex_a9_mmio; - using Serial = Genode::Imx_uart; - - enum { - UART_BASE = UART_2_MMIO_BASE, - UART_SIZE = UART_2_MMIO_SIZE, - UART_CLOCK = 0, /* dummy value, not used */ - }; static volatile unsigned long initial_values[][2] { // (IOMUX Controller) diff --git a/repos/base-hw/src/bootstrap/spec/imx7d_sabre/board.h b/repos/base-hw/src/bootstrap/spec/imx7d_sabre/board.h index e17bd0578..2d1fa7a4e 100644 --- a/repos/base-hw/src/bootstrap/spec/imx7d_sabre/board.h +++ b/repos/base-hw/src/bootstrap/spec/imx7d_sabre/board.h @@ -14,25 +14,13 @@ #ifndef _SRC__BOOTSTRAP__SPEC__IMX7_SABRELITE__BOARD_H_ #define _SRC__BOOTSTRAP__SPEC__IMX7_SABRELITE__BOARD_H_ -#include -#include - -#include +#include #include #include #include namespace Board { - - using namespace Imx7d_sabre; - - using Cpu_mmio = Hw::Cortex_a15_mmio; - using Serial = Genode::Imx_uart; - - enum { - UART_BASE = UART_1_MMIO_BASE, - UART_CLOCK = 0, /* unsued value */ - }; + using namespace Hw::Imx7d_sabre_board; } #endif /* _SRC__BOOTSTRAP__SPEC__IMX&_SABRELITE__BOARD_H_ */ diff --git a/repos/base-hw/src/bootstrap/spec/nit6_solox/board.h b/repos/base-hw/src/bootstrap/spec/nit6_solox/board.h index 7be2563e5..f3d84cce3 100644 --- a/repos/base-hw/src/bootstrap/spec/nit6_solox/board.h +++ b/repos/base-hw/src/bootstrap/spec/nit6_solox/board.h @@ -14,32 +14,18 @@ #ifndef _SRC__BOOTSTRAP__SPEC__NIT6_SOLOX__BOARD_H_ #define _SRC__BOOTSTRAP__SPEC__NIT6_SOLOX__BOARD_H_ -#include -#include -#include -#include - +#include #include #include #include #include namespace Board { - - using namespace Nit6_solox; + using namespace Hw::Nit6_solox_board; struct L2_cache; - using Cpu_mmio = Hw::Cortex_a9_mmio; - using Serial = Genode::Imx_uart; - - enum { - UART_BASE = UART_1_MMIO_BASE, - UART_SIZE = UART_1_MMIO_SIZE, - UART_CLOCK = 0, /* dummy value, not used */ - }; static volatile unsigned long initial_values[][2] { - // (IOMUX Controller) { 0x20E006C, 0x0}, { 0x20E00CC, 0x10}, @@ -243,7 +229,6 @@ namespace Board { }; } - struct Board::L2_cache : Hw::Pl310 { L2_cache(Genode::addr_t mmio) : Hw::Pl310(mmio) 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 130ed639d..688d6a229 100644 --- a/repos/base-hw/src/bootstrap/spec/odroid_xu/board.h +++ b/repos/base-hw/src/bootstrap/spec/odroid_xu/board.h @@ -14,24 +14,13 @@ #ifndef _SRC__BOOTSTRAP__SPEC__ODROID_XU__BOARD_H_ #define _SRC__BOOTSTRAP__SPEC__ODROID_XU__BOARD_H_ -#include -#include - -#include +#include #include #include #include namespace Board { - - using namespace Odroid_xu; - using Cpu_mmio = Hw::Cortex_a15_mmio; - using Serial = Genode::Exynos_uart; - - enum { - UART_BASE = UART_2_MMIO_BASE, - UART_CLOCK = UART_2_CLOCK, - }; + using namespace Hw::Odroid_xu_board; } #endif /* _SRC__BOOTSTRAP__SPEC__ODROID_XU__BOARD_H_ */ diff --git a/repos/base-hw/src/bootstrap/spec/panda/board.h b/repos/base-hw/src/bootstrap/spec/panda/board.h index 4f0b83189..db356ab77 100644 --- a/repos/base-hw/src/bootstrap/spec/panda/board.h +++ b/repos/base-hw/src/bootstrap/spec/panda/board.h @@ -1,5 +1,5 @@ /* - * \brief Pbxa9 specific board definitions + * \brief Pandaboard specific definitions * \author Stefan Kalkowski * \date 2017-02-20 */ @@ -14,27 +14,15 @@ #ifndef _SRC__BOOTSTRAP__SPEC__PANDA__BOARD_H_ #define _SRC__BOOTSTRAP__SPEC__PANDA__BOARD_H_ -#include -#include -#include -#include -#include - +#include #include #include #include namespace Board { + using namespace Hw::Panda_board; + class L2_cache; - - using namespace Panda; - using Cpu_mmio = Hw::Cortex_a9_mmio; - using Serial = Genode::Tl16c750_uart; - - enum { - UART_BASE = TL16C750_3_MMIO_BASE, - UART_CLOCK = TL16C750_CLOCK, - }; } namespace Bootstrap { struct Actlr; } @@ -42,8 +30,11 @@ namespace Bootstrap { struct Actlr; } struct Bootstrap::Actlr { - static void enable_smp() { - Hw::call_panda_firmware(Hw::CPU_ACTLR_SMP_BIT_RAISE, 0); } + static void enable_smp() + { + using namespace Board; + call_panda_firmware(CPU_ACTLR_SMP_BIT_RAISE, 0); + } static void disable_smp() { /* not implemented */ } }; @@ -71,18 +62,18 @@ class Board::L2_cache : Hw::Pl310 public: L2_cache(Genode::addr_t mmio) : Hw::Pl310(mmio) { - Hw::call_panda_firmware(Hw::L2_CACHE_AUX_REG, _init_value()); } + call_panda_firmware(L2_CACHE_AUX_REG, _init_value()); } using Hw::Pl310::invalidate; void enable() { - Hw::call_panda_firmware(Hw::L2_CACHE_ENABLE_REG, 1); + call_panda_firmware(L2_CACHE_ENABLE_REG, 1); Pl310::mask_interrupts(); } void disable() { - Hw::call_panda_firmware(Hw::L2_CACHE_ENABLE_REG, 0); } + call_panda_firmware(L2_CACHE_ENABLE_REG, 0); } }; #endif /* _SRC__BOOTSTRAP__SPEC__PANDA__BOARD_H_ */ diff --git a/repos/base-hw/src/bootstrap/spec/pbxa9/board.h b/repos/base-hw/src/bootstrap/spec/pbxa9/board.h index 89bbed1b3..e5b9cd98d 100644 --- a/repos/base-hw/src/bootstrap/spec/pbxa9/board.h +++ b/repos/base-hw/src/bootstrap/spec/pbxa9/board.h @@ -14,10 +14,7 @@ #ifndef _SRC__BOOTSTRAP__SPEC__PBXA9__BOARD_H_ #define _SRC__BOOTSTRAP__SPEC__PBXA9__BOARD_H_ -#include -#include -#include -#include +#include #include #include @@ -25,17 +22,7 @@ #include namespace Board { - - using namespace Pbxa9; - - using L2_cache = Hw::Pl310; - using Cpu_mmio = Hw::Cortex_a9_mmio; - using Serial = Genode::Pl011_uart; - - enum { - UART_BASE = PL011_0_MMIO_BASE, - UART_CLOCK = PL011_0_CLOCK, - }; + using namespace Hw::Pbxa9_board; } #endif /* _SRC__BOOTSTRAP__SPEC__PBXA9__BOARD_H_ */ diff --git a/repos/base-hw/src/bootstrap/spec/riscv/board.h b/repos/base-hw/src/bootstrap/spec/riscv/board.h index 5f5a57e00..362d10989 100644 --- a/repos/base-hw/src/bootstrap/spec/riscv/board.h +++ b/repos/base-hw/src/bootstrap/spec/riscv/board.h @@ -14,22 +14,10 @@ #ifndef _SRC__BOOTSTRAP__SPEC__RISCV__BOARD_H_ #define _SRC__BOOTSTRAP__SPEC__RISCV__BOARD_H_ -#include -#include -#include - -namespace Bootstrap { - struct Cpu {}; - struct Pic {}; -} +#include namespace Board { - - using namespace Riscv; - - enum { UART_BASE, UART_CLOCK }; - struct Serial : Hw::Riscv_uart { - Serial(Genode::addr_t, Genode::size_t, unsigned) {} }; + using namespace Hw::Riscv_board; } template diff --git a/repos/base-hw/src/bootstrap/spec/rpi/board.h b/repos/base-hw/src/bootstrap/spec/rpi/board.h index 71f2b2059..ade417a77 100644 --- a/repos/base-hw/src/bootstrap/spec/rpi/board.h +++ b/repos/base-hw/src/bootstrap/spec/rpi/board.h @@ -14,19 +14,12 @@ #ifndef _SRC__BOOTSTRAP__SPEC__RPI__BOARD_H_ #define _SRC__BOOTSTRAP__SPEC__RPI__BOARD_H_ -#include -#include +#include #include - #include namespace Board { - using Serial = Genode::Pl011_uart; - - enum { - UART_BASE = Rpi::PL011_0_MMIO_BASE, - UART_CLOCK = Rpi::PL011_0_CLOCK, - }; + using namespace Hw::Rpi_board; } namespace Bootstrap { struct Pic {}; } 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 9dc4b41f4..ee84e43f8 100644 --- a/repos/base-hw/src/bootstrap/spec/usb_armory/board.h +++ b/repos/base-hw/src/bootstrap/spec/usb_armory/board.h @@ -14,8 +14,7 @@ #ifndef _SRC__BOOTSTRAP__SPEC__USB_ARMORY__BOARD_H_ #define _SRC__BOOTSTRAP__SPEC__USB_ARMORY__BOARD_H_ -#include -#include +#include #include #include @@ -24,13 +23,7 @@ namespace Bootstrap { using Hw::Pic; } namespace Board { - using namespace Usb_armory; - using Serial = Genode::Imx_uart; - - enum { - UART_BASE = UART_1_MMIO_BASE, - UART_CLOCK = 0, /* ignored value */ - }; + using namespace Hw::Usb_armory_board; bool secure_irq(unsigned irq); } 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 9522ef883..ab90981b9 100644 --- a/repos/base-hw/src/bootstrap/spec/wand_quad/board.h +++ b/repos/base-hw/src/bootstrap/spec/wand_quad/board.h @@ -14,29 +14,16 @@ #ifndef _SRC__BOOTSTRAP__SPEC__WAND_QUAD__BOARD_H_ #define _SRC__BOOTSTRAP__SPEC__WAND_QUAD__BOARD_H_ -#include -#include -#include -#include - +#include #include #include #include #include namespace Board { - - using namespace Wand_quad; + using namespace Hw::Wand_quad_board; struct L2_cache; - using Cpu_mmio = Hw::Cortex_a9_mmio; - using Serial = Genode::Imx_uart; - - enum { - UART_BASE = UART_1_MMIO_BASE, - UART_SIZE = UART_1_MMIO_SIZE, - UART_CLOCK = 0, /* dummy value, not used */ - }; static volatile unsigned long initial_values[][2] { // (IOMUX Controller) 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 8f54f6645..c872f2ef7 100644 --- a/repos/base-hw/src/bootstrap/spec/x86_64/board.h +++ b/repos/base-hw/src/bootstrap/spec/x86_64/board.h @@ -14,8 +14,7 @@ #ifndef _SRC__BOOTSTRAP__SPEC__X86_64__BOARD_H_ #define _SRC__BOOTSTRAP__SPEC__X86_64__BOARD_H_ -#include - +#include #include #include #include @@ -26,14 +25,7 @@ namespace Bootstrap { } namespace Board { - struct Serial; - enum Dummies { UART_BASE, UART_CLOCK }; + using namespace Hw::Pc_board; } - -struct Board::Serial : Genode::X86_uart -{ - Serial(Genode::addr_t, Genode::size_t, unsigned); -}; - #endif /* _SRC__BOOTSTRAP__SPEC__X86_64__BOARD_H_ */ diff --git a/repos/base-hw/src/bootstrap/spec/zynq_qemu/board.h b/repos/base-hw/src/bootstrap/spec/zynq_qemu/board.h index 26d4eb65f..3b12951ef 100644 --- a/repos/base-hw/src/bootstrap/spec/zynq_qemu/board.h +++ b/repos/base-hw/src/bootstrap/spec/zynq_qemu/board.h @@ -14,25 +14,14 @@ #ifndef _SRC__BOOTSTRAP__SPEC__ZYNQ__BOARD_H_ #define _SRC__BOOTSTRAP__SPEC__ZYNQ__BOARD_H_ -#include -#include -#include -#include - +#include #include #include #include #include namespace Board { - using namespace Zynq_qemu; - using L2_cache = Hw::Pl310; - using Cpu_mmio = Hw::Cortex_a9_mmio; - using Serial = Genode::Xilinx_uart; - - enum { - UART_BASE = UART_0_MMIO_BASE, - }; + using namespace Hw::Zynq_qemu_board; } #endif /* _SRC__BOOTSTRAP__SPEC__ZYNQ__BOARD_H_ */ diff --git a/repos/base-hw/src/core/spec/arndale/board.h b/repos/base-hw/src/core/spec/arndale/board.h index 6e3431846..52e9dbbe1 100644 --- a/repos/base-hw/src/core/spec/arndale/board.h +++ b/repos/base-hw/src/core/spec/arndale/board.h @@ -14,21 +14,10 @@ #ifndef _CORE__SPEC__ARNDALE__BOARD_H_ #define _CORE__SPEC__ARNDALE__BOARD_H_ -/* base includes */ -#include -#include - -#include +#include namespace Board { - using namespace Arndale; - using Cpu_mmio = Hw::Cortex_a15_mmio; - using Serial = Genode::Exynos_uart; - - enum { - UART_BASE = UART_2_MMIO_BASE, - UART_CLOCK = UART_2_CLOCK, - }; + using namespace Hw::Arndale_board; static constexpr bool SMP = true; } diff --git a/repos/base-hw/src/core/spec/imx53_qsb/board.h b/repos/base-hw/src/core/spec/imx53_qsb/board.h index 8c5ced739..3b182ce46 100644 --- a/repos/base-hw/src/core/spec/imx53_qsb/board.h +++ b/repos/base-hw/src/core/spec/imx53_qsb/board.h @@ -15,17 +15,10 @@ #ifndef _CORE__SPEC__IMX53_QSB__BOARD_H_ #define _CORE__SPEC__IMX53_QSB__BOARD_H_ -#include -#include +#include namespace Board { - using namespace Imx53_qsb; - using Serial = Genode::Imx_uart; - - enum { - UART_BASE = UART_1_MMIO_BASE, - UART_CLOCK = 0, /* ignored value */ - }; + using namespace Hw::Imx53_qsb_board; static constexpr bool SMP = false; } diff --git a/repos/base-hw/src/core/spec/imx6q_sabrelite/board.h b/repos/base-hw/src/core/spec/imx6q_sabrelite/board.h index 9022dd6d8..4dc8f1f37 100644 --- a/repos/base-hw/src/core/spec/imx6q_sabrelite/board.h +++ b/repos/base-hw/src/core/spec/imx6q_sabrelite/board.h @@ -14,23 +14,13 @@ #ifndef _CORE__SPEC__IMX6Q_SABRELITE__BOARD_H_ #define _CORE__SPEC__IMX6Q_SABRELITE__BOARD_H_ -/* base includes */ -#include -#include - -#include -#include +#include namespace Board { - using namespace Imx6q_sabrelite; - using Cpu_mmio = Hw::Cortex_a9_mmio; - using L2_cache = Hw::Pl310; - using Serial = Genode::Imx_uart; - enum { - UART_BASE = UART_2_MMIO_BASE, - UART_CLOCK = 0, /* dummy value, not used */ - }; + using namespace Hw::Imx6q_sabrelite_board; + + using L2_cache = Hw::Pl310; static constexpr bool SMP = true; diff --git a/repos/base-hw/src/core/spec/imx7d_sabre/board.h b/repos/base-hw/src/core/spec/imx7d_sabre/board.h index 27ce0f36b..21886fcfb 100644 --- a/repos/base-hw/src/core/spec/imx7d_sabre/board.h +++ b/repos/base-hw/src/core/spec/imx7d_sabre/board.h @@ -14,22 +14,11 @@ #ifndef _CORE__SPEC__IMX7D_SABRE__BOARD_H_ #define _CORE__SPEC__IMX7D_SABRE__BOARD_H_ -/* base includes */ -#include -#include - -#include +#include namespace Board { - using namespace Imx7d_sabre; - using Cpu_mmio = Hw::Cortex_a15_mmio; - using Serial = Genode::Imx_uart; - - enum { - UART_BASE = UART_1_MMIO_BASE, - UART_CLOCK = 0, /* unused value */ - }; - + using namespace Hw::Imx7d_sabre_board; + static constexpr bool SMP = true; } diff --git a/repos/base-hw/src/core/spec/nit6_solox/board.h b/repos/base-hw/src/core/spec/nit6_solox/board.h index b2e651c9b..13c6272a1 100644 --- a/repos/base-hw/src/core/spec/nit6_solox/board.h +++ b/repos/base-hw/src/core/spec/nit6_solox/board.h @@ -14,23 +14,12 @@ #ifndef _CORE__SPEC__NIT6_SOLOX__BOARD_H_ #define _CORE__SPEC__NIT6_SOLOX__BOARD_H_ -/* base includes */ -#include -#include - -#include -#include +#include namespace Board { - using namespace Nit6_solox; - using Cpu_mmio = Hw::Cortex_a9_mmio; - using L2_cache = Hw::Pl310; - using Serial = Genode::Imx_uart; + using namespace Hw::Nit6_solox_board; - enum { - UART_BASE = UART_1_MMIO_BASE, - UART_CLOCK = 0, /* dummy value, not used */ - }; + using L2_cache = Hw::Pl310; static constexpr bool SMP = true; diff --git a/repos/base-hw/src/core/spec/odroid_xu/board.h b/repos/base-hw/src/core/spec/odroid_xu/board.h index 9dcbf56f5..89b5a6b9e 100644 --- a/repos/base-hw/src/core/spec/odroid_xu/board.h +++ b/repos/base-hw/src/core/spec/odroid_xu/board.h @@ -14,21 +14,10 @@ #ifndef _CORE__SPEC__ODROID_XU__BOARD_H_ #define _CORE__SPEC__ODROID_XU__BOARD_H_ -/* base includes */ -#include -#include - -#include +#include namespace Board { - using namespace Odroid_xu; - using Cpu_mmio = Hw::Cortex_a15_mmio; - using Serial = Genode::Exynos_uart; - - enum { - UART_BASE = UART_2_MMIO_BASE, - UART_CLOCK = UART_2_CLOCK, - }; + using namespace Hw::Odroid_xu_board; static constexpr bool SMP = true; } diff --git a/repos/base-hw/src/core/spec/panda/board.h b/repos/base-hw/src/core/spec/panda/board.h index c15fa29e2..b06e083e3 100644 --- a/repos/base-hw/src/core/spec/panda/board.h +++ b/repos/base-hw/src/core/spec/panda/board.h @@ -15,25 +15,11 @@ #ifndef _CORE__SPEC__PANDA__BOARD_H_ #define _CORE__SPEC__PANDA__BOARD_H_ -/* base includes */ -#include -#include - -#include -#include -#include +#include namespace Board { - - using namespace Panda; - using Cpu_mmio = Hw::Cortex_a9_mmio; - using Serial = Genode::Tl16c750_uart; - - enum { - UART_BASE = TL16C750_3_MMIO_BASE, - UART_CLOCK = TL16C750_CLOCK, - }; - + using namespace Hw::Panda_board; + static constexpr bool SMP = true; class L2_cache : public Hw::Pl310 diff --git a/repos/base-hw/src/core/spec/pbxa9/board.h b/repos/base-hw/src/core/spec/pbxa9/board.h index 3d9747bc3..fc416607a 100644 --- a/repos/base-hw/src/core/spec/pbxa9/board.h +++ b/repos/base-hw/src/core/spec/pbxa9/board.h @@ -14,24 +14,10 @@ #ifndef _CORE__SPEC__PBXA9__BOARD_H_ #define _CORE__SPEC__PBXA9__BOARD_H_ -/* base includes */ -#include -#include - -#include -#include +#include namespace Board { - using namespace Pbxa9; - - using Cpu_mmio = Hw::Cortex_a9_mmio; - using L2_cache = Hw::Pl310; - using Serial = Genode::Pl011_uart; - - enum { - UART_BASE = PL011_0_MMIO_BASE, - UART_CLOCK = PL011_0_CLOCK, - }; + using namespace Hw::Pbxa9_board; static constexpr bool SMP = true; diff --git a/repos/base-hw/src/core/spec/riscv/board.h b/repos/base-hw/src/core/spec/riscv/board.h index 01c956e87..790e799e6 100644 --- a/repos/base-hw/src/core/spec/riscv/board.h +++ b/repos/base-hw/src/core/spec/riscv/board.h @@ -14,12 +14,10 @@ #ifndef _CORE__SPEC__RISCV__BOARD_H_ #define _CORE__SPEC__RISCV__BOARD_H_ -#include +#include namespace Board { - enum { UART_BASE, UART_CLOCK }; - struct Serial : Hw::Riscv_uart { - Serial(Genode::addr_t, Genode::size_t, unsigned) {} }; + using namespace Hw::Riscv_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 651895520..50575eed5 100644 --- a/repos/base-hw/src/core/spec/rpi/board.h +++ b/repos/base-hw/src/core/spec/rpi/board.h @@ -15,18 +15,10 @@ #ifndef _CORE__SPEC__RPI__BOARD_H_ #define _CORE__SPEC__RPI__BOARD_H_ -#include -#include +#include namespace Board { - using namespace Rpi; - - using Serial = Genode::Pl011_uart; - - enum { - UART_BASE = Rpi::PL011_0_MMIO_BASE, - UART_CLOCK = Rpi::PL011_0_CLOCK, - }; + using namespace Hw::Rpi_board; static constexpr bool SMP = false; }; diff --git a/repos/base-hw/src/core/spec/usb_armory/board.h b/repos/base-hw/src/core/spec/usb_armory/board.h index cf530eb34..e6c50d6aa 100644 --- a/repos/base-hw/src/core/spec/usb_armory/board.h +++ b/repos/base-hw/src/core/spec/usb_armory/board.h @@ -15,17 +15,10 @@ #ifndef _CORE__SPEC__USB_ARMORY__BOARD_H_ #define _CORE__SPEC__USB_ARMORY__BOARD_H_ -#include -#include +#include namespace Board { - using namespace Usb_armory; - using Serial = Genode::Imx_uart; - - enum { - UART_BASE = UART_1_MMIO_BASE, - UART_CLOCK = 0, /* dummy value, not used */ - }; + using namespace Hw::Usb_armory_board; static constexpr bool SMP = false; } diff --git a/repos/base-hw/src/core/spec/wand_quad/board.h b/repos/base-hw/src/core/spec/wand_quad/board.h index d5c4d74a9..01bf528ac 100644 --- a/repos/base-hw/src/core/spec/wand_quad/board.h +++ b/repos/base-hw/src/core/spec/wand_quad/board.h @@ -15,24 +15,13 @@ #ifndef _CORE__SPEC__WAND_QUAD__BOARD_H_ #define _CORE__SPEC__WAND_QUAD__BOARD_H_ -/* base includes */ -#include -#include - -#include -#include +#include namespace Board { - using namespace Wand_quad; - using Cpu_mmio = Hw::Cortex_a9_mmio; + using namespace Hw::Wand_quad_board; + using L2_cache = Hw::Pl310; - using Serial = Genode::Imx_uart; - - enum { - UART_BASE = UART_1_MMIO_BASE, - UART_CLOCK = 0, /* dummy value, not used */ - }; - + static constexpr bool SMP = true; L2_cache & l2_cache(); diff --git a/repos/base-hw/src/core/spec/x86_64/board.h b/repos/base-hw/src/core/spec/x86_64/board.h index 38f40fbcd..00506b7ee 100644 --- a/repos/base-hw/src/core/spec/x86_64/board.h +++ b/repos/base-hw/src/core/spec/x86_64/board.h @@ -14,11 +14,10 @@ #ifndef _CORE__SPEC__X86_64__BOARD_H_ #define _CORE__SPEC__X86_64__BOARD_H_ -#include +#include namespace Board { - struct Serial; - enum Dummies { UART_BASE, UART_CLOCK }; + using namespace Hw::Pc_board; enum { VECTOR_REMAP_BASE = 48, @@ -28,9 +27,4 @@ namespace Board { }; } - -struct Board::Serial : Genode::X86_uart { - Serial(Genode::addr_t, Genode::size_t, unsigned); -}; - #endif /* _CORE__SPEC__X86_64__BOARD_H_ */ 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 6adfc82f7..f776d8b7d 100644 --- a/repos/base-hw/src/core/spec/zynq_qemu/board.h +++ b/repos/base-hw/src/core/spec/zynq_qemu/board.h @@ -16,22 +16,10 @@ #ifndef _CORE__SPEC__ZYNQ_QEMU__BOARD_H_ #define _CORE__SPEC__ZYNQ_QEMU__BOARD_H_ -/* base includes */ -#include -#include - -#include -#include +#include namespace Board { - using namespace Zynq_qemu; - using Cpu_mmio = Hw::Cortex_a9_mmio; - using L2_cache = Hw::Pl310; - using Serial = Genode::Xilinx_uart; - - enum { - UART_BASE = UART_0_MMIO_BASE, - }; + using namespace Hw::Zynq_qemu_board; static constexpr bool SMP = true; diff --git a/repos/base-hw/src/include/hw/spec/arm/arndale_board.h b/repos/base-hw/src/include/hw/spec/arm/arndale_board.h new file mode 100644 index 000000000..776d25249 --- /dev/null +++ b/repos/base-hw/src/include/hw/spec/arm/arndale_board.h @@ -0,0 +1,33 @@ +/* + * \brief Arndale specific board definitions + * \author Stefan Kalkowski + * \date 2019-05-15 + */ + +/* + * Copyright (C) 2019 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +#ifndef _SRC__INCLUDE__HW__SPEC__ARM__ARNDALE_BOARD_H_ +#define _SRC__INCLUDE__HW__SPEC__ARM__ARNDALE_BOARD_H_ + +#include +#include +#include + +namespace Hw::Arndale_board { + + using namespace Arndale; + using Cpu_mmio = Hw::Cortex_a15_mmio; + using Serial = Genode::Exynos_uart; + + enum { + UART_BASE = UART_2_MMIO_BASE, + UART_CLOCK = UART_2_CLOCK, + }; +} + +#endif /* _SRC__INCLUDE__HW__SPEC__ARM__ARNDALE_BOARD_H_ */ diff --git a/repos/base-hw/src/include/hw/spec/arm/imx53_qsb_board.h b/repos/base-hw/src/include/hw/spec/arm/imx53_qsb_board.h new file mode 100644 index 000000000..3406a9b9b --- /dev/null +++ b/repos/base-hw/src/include/hw/spec/arm/imx53_qsb_board.h @@ -0,0 +1,30 @@ +/* + * \brief i.MX53 Quickstart board definitions + * \author Stefan Kalkowski + * \date 2019-05-15 + */ + +/* + * Copyright (C) 2019 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +#ifndef _SRC__INCLUDE__HW__SPEC__IMX53_QSB_BOARD_H_ +#define _SRC__INCLUDE__HW__SPEC__IMX53_QSB_BOARD_H_ + +#include +#include + +namespace Hw::Imx53_qsb_board { + using namespace Imx53_qsb; + using Serial = Genode::Imx_uart; + + enum { + UART_BASE = UART_1_MMIO_BASE, + UART_CLOCK = 0, /* ignored value */ + }; +} + +#endif /* _SRC__INCLUDE__HW__SPEC__IMX53_QSB_BOARD_H_ */ diff --git a/repos/base-hw/src/include/hw/spec/arm/imx6q_sabrelite_board.h b/repos/base-hw/src/include/hw/spec/arm/imx6q_sabrelite_board.h new file mode 100644 index 000000000..fb466b6e8 --- /dev/null +++ b/repos/base-hw/src/include/hw/spec/arm/imx6q_sabrelite_board.h @@ -0,0 +1,36 @@ +/* + * \brief i.MX6Quad Sabrelite specific board definitions + * \author Stefan Kalkowski + * \date 2019-05-16 + */ + +/* + * Copyright (C) 2019 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +#ifndef _SRC__INCLUDE__HW__SPEC__ARM__IMX6Q_SABRELITE_BOARD_H_ +#define _SRC__INCLUDE__HW__SPEC__ARM__IMX6Q_SABRELITE_BOARD_H_ + +#include +#include +#include +#include + +namespace Hw::Imx6q_sabrelite_board { + + using namespace Imx6q_sabrelite; + + using Cpu_mmio = Hw::Cortex_a9_mmio; + using Serial = Genode::Imx_uart; + + enum { + UART_BASE = UART_2_MMIO_BASE, + UART_SIZE = UART_2_MMIO_SIZE, + UART_CLOCK = 0, /* dummy value, not used */ + }; +} + +#endif /* _SRC__INCLUDE__HW__SPEC__ARM__IMX6Q_SABRELITE_BOARD_H_ */ diff --git a/repos/base-hw/src/include/hw/spec/arm/imx7d_sabre_board.h b/repos/base-hw/src/include/hw/spec/arm/imx7d_sabre_board.h new file mode 100644 index 000000000..0be552497 --- /dev/null +++ b/repos/base-hw/src/include/hw/spec/arm/imx7d_sabre_board.h @@ -0,0 +1,35 @@ +/* + * \brief Imx7 Sabrelite specific board definitions + * \author Stefan Kalkowski + * \date 2018-11-07 + */ + +/* + * Copyright (C) 2018 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 _SRC__INCLUDE__HW__SPEC__ARM__IMX7_SABRELITE_BOARD_H_ +#define _SRC__INCLUDE__HW__SPEC__ARM__IMX7_SABRELITE_BOARD_H_ + +#include +#include + +#include + +namespace Hw::Imx7d_sabre_board { + + using namespace Imx7d_sabre; + + using Cpu_mmio = Hw::Cortex_a15_mmio; + using Serial = Genode::Imx_uart; + + enum { + UART_BASE = UART_1_MMIO_BASE, + UART_CLOCK = 0, /* unsued value */ + }; +} + +#endif /* _SRC__INCLUDE__HW__SPEC__ARM__IMX7_SABRELITE_BOARD_H_ */ diff --git a/repos/base-hw/src/include/hw/spec/arm/nit6_solox_board.h b/repos/base-hw/src/include/hw/spec/arm/nit6_solox_board.h new file mode 100644 index 000000000..0bcf19097 --- /dev/null +++ b/repos/base-hw/src/include/hw/spec/arm/nit6_solox_board.h @@ -0,0 +1,36 @@ +/* + * \brief Nit6 SOLOX specific board definitions + * \author Stefan Kalkowski + * \date 2019-05-16 + */ + +/* + * Copyright (C) 2019 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +#ifndef _SRC__INCLUDE__HW__SPEC__ARM__NIT6_SOLOX_BOARD_H_ +#define _SRC__INCLUDE__HW__SPEC__ARM__NIT6_SOLOX_BOARD_H_ + +#include +#include +#include +#include + +namespace Hw::Nit6_solox_board { + + using namespace Nit6_solox; + + using Cpu_mmio = Hw::Cortex_a9_mmio; + using Serial = Genode::Imx_uart; + + enum { + UART_BASE = UART_1_MMIO_BASE, + UART_SIZE = UART_1_MMIO_SIZE, + UART_CLOCK = 0, /* dummy value, not used */ + }; +} + +#endif /* _SRC__INCLUDE__HW__SPEC__ARM__NIT6_SOLOX_BOARD_H_ */ diff --git a/repos/base-hw/src/include/hw/spec/arm/odroid_xu_board.h b/repos/base-hw/src/include/hw/spec/arm/odroid_xu_board.h new file mode 100644 index 000000000..6018c1013 --- /dev/null +++ b/repos/base-hw/src/include/hw/spec/arm/odroid_xu_board.h @@ -0,0 +1,33 @@ +/* + * \brief Odroid XU specific board definitions + * \author Stefan Kalkowski + * \date 2019-05-16 + */ + +/* + * Copyright (C) 2019 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +#ifndef _SRC__INCLUDE__HW__SPEC__ARM__ODROID_XU_BOARD_H_ +#define _SRC__INCLUDE__HW__SPEC__ARM__ODROID_XU_BOARD_H_ + +#include +#include + +#include + +namespace Hw::Odroid_xu_board { + using namespace Odroid_xu; + using Cpu_mmio = Hw::Cortex_a15_mmio; + using Serial = Genode::Exynos_uart; + + enum { + UART_BASE = UART_2_MMIO_BASE, + UART_CLOCK = UART_2_CLOCK, + }; +} + +#endif /* _SRC__INCLUDE__HW__SPEC__ARM__ODROID_XU_BOARD_H_ */ diff --git a/repos/base-hw/src/include/hw/spec/arm/panda_trustzone_firmware.h b/repos/base-hw/src/include/hw/spec/arm/panda_board.h similarity index 54% rename from repos/base-hw/src/include/hw/spec/arm/panda_trustzone_firmware.h rename to repos/base-hw/src/include/hw/spec/arm/panda_board.h index 872524159..4dc6070b6 100644 --- a/repos/base-hw/src/include/hw/spec/arm/panda_trustzone_firmware.h +++ b/repos/base-hw/src/include/hw/spec/arm/panda_board.h @@ -1,22 +1,34 @@ /* - * \brief Pandaboard's TrustZone firmware frontend - * \author Stefan Kalkowski - * \date 2017-02-02 + * \brief Pandaboard specific definitions + * \author Stefan Kalkowski + * \date 2019-05-16 */ /* - * Copyright (C) 2017 Genode Labs GmbH + * Copyright (C) 2019 Genode Labs GmbH * * This file is part of the Genode OS framework, which is distributed * under the terms of the GNU Affero General Public License version 3. */ -#ifndef _SRC__LIB__HW__SPEC__ARM__PANDA_TRUSTZONE_FIRMWARE_H_ -#define _SRC__LIB__HW__SPEC__ARM__PANDA_TRUSTZONE_FIRMWARE_H_ +#ifndef _SRC__INCLUDE__HW__SPEC__ARM__PANDA_BOARD_H_ +#define _SRC__INCLUDE__HW__SPEC__ARM__PANDA_BOARD_H_ #include +#include +#include +#include +#include -namespace Hw { +namespace Hw::Panda_board { + using namespace Panda; + using Cpu_mmio = Hw::Cortex_a9_mmio; + using Serial = Genode::Tl16c750_uart; + + enum { + UART_BASE = TL16C750_3_MMIO_BASE, + UART_CLOCK = TL16C750_CLOCK, + }; enum Panda_firmware_opcodes { CPU_ACTLR_SMP_BIT_RAISE = 0x25, @@ -38,4 +50,4 @@ namespace Hw { } } -#endif /* _SRC__LIB__HW__SPEC__ARM__PANDA_TRUSTZONE_FIRMWARE_H_ */ +#endif /* _SRC__INCLUDE__HW__SPEC__ARM__PANDA_BOARD_H_ */ diff --git a/repos/base-hw/src/include/hw/spec/arm/pbxa9_board.h b/repos/base-hw/src/include/hw/spec/arm/pbxa9_board.h new file mode 100644 index 000000000..e1ec4ad1d --- /dev/null +++ b/repos/base-hw/src/include/hw/spec/arm/pbxa9_board.h @@ -0,0 +1,35 @@ +/* + * \brief Pbxa9 specific board definitions + * \author Stefan Kalkowski + * \date 2019-05-16 + */ + +/* + * Copyright (C) 2019 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +#ifndef _SRC__INCLUDE__HW__SPEC__ARM__PBXA9_BOARD_H_ +#define _SRC__INCLUDE__HW__SPEC__ARM__PBXA9_BOARD_H_ + +#include +#include +#include +#include + +namespace Hw::Pbxa9_board { + using namespace Pbxa9; + + using L2_cache = Hw::Pl310; + using Cpu_mmio = Hw::Cortex_a9_mmio; + using Serial = Genode::Pl011_uart; + + enum { + UART_BASE = PL011_0_MMIO_BASE, + UART_CLOCK = PL011_0_CLOCK, + }; +} + +#endif /* _SRC__INCLUDE__HW__SPEC__ARM__PBXA9_BOARD_H_ */ diff --git a/repos/base-hw/src/include/hw/spec/arm/rpi_board.h b/repos/base-hw/src/include/hw/spec/arm/rpi_board.h new file mode 100644 index 000000000..3a264f06c --- /dev/null +++ b/repos/base-hw/src/include/hw/spec/arm/rpi_board.h @@ -0,0 +1,31 @@ +/* + * \brief Raspberry PI specific board definitions + * \author Stefan Kalkowski + * \date 2019-05-16 + */ + +/* + * Copyright (C) 2019 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +#ifndef _SRC__INCLUDE__HW__SPEC__ARM__RPI_BOARD_H_ +#define _SRC__INCLUDE__HW__SPEC__ARM__RPI_BOARD_H_ + +#include +#include + +namespace Hw::Rpi_board { + using namespace Rpi; + + using Serial = Genode::Pl011_uart; + + enum { + UART_BASE = Rpi::PL011_0_MMIO_BASE, + UART_CLOCK = Rpi::PL011_0_CLOCK, + }; +} + +#endif /* _SRC__INCLUDE__HW__SPEC__ARM__RPI_BOARD_H_ */ diff --git a/repos/base-hw/src/include/hw/spec/arm/usb_armory_board.h b/repos/base-hw/src/include/hw/spec/arm/usb_armory_board.h new file mode 100644 index 000000000..4b046d4ef --- /dev/null +++ b/repos/base-hw/src/include/hw/spec/arm/usb_armory_board.h @@ -0,0 +1,31 @@ +/* + * \brief USB armory board definitions + * \author Stefan Kalkowski + * \date 2019-05-15 + */ + +/* + * Copyright (C) 2019 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +#ifndef _SRC__INCLUDE__HW__SPEC__ARM__USB_ARMORY_BOARD_H_ +#define _SRC__INCLUDE__HW__SPEC__ARM__USB_ARMORY_BOARD_H_ + +#include +#include + +namespace Hw::Usb_armory_board { + using namespace Usb_armory; + + using Serial = Genode::Imx_uart; + + enum { + UART_BASE = UART_1_MMIO_BASE, + UART_CLOCK = 0, /* ignored value */ + }; +} + +#endif /* _SRC__INCLUDE__HW__SPEC__ARM__USB_ARMORY_BOARD_H_ */ diff --git a/repos/base-hw/src/include/hw/spec/arm/wand_quad_board.h b/repos/base-hw/src/include/hw/spec/arm/wand_quad_board.h new file mode 100644 index 000000000..53d086881 --- /dev/null +++ b/repos/base-hw/src/include/hw/spec/arm/wand_quad_board.h @@ -0,0 +1,36 @@ +/* + * \brief Wandboard Quad specific definitions + * \author Stefan Kalkowski + * \date 2019-05-16 + */ + +/* + * Copyright (C) 2019 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +#ifndef _SRC__INCLUDE__HW__SPEC__ARM__WAND_QUAD_BOARD_H_ +#define _SRC__INCLUDE__HW__SPEC__ARM__WAND_QUAD_BOARD_H_ + +#include +#include +#include +#include + +namespace Hw::Wand_quad_board { + + using namespace Wand_quad; + + using Cpu_mmio = Hw::Cortex_a9_mmio; + using Serial = Genode::Imx_uart; + + enum { + UART_BASE = UART_1_MMIO_BASE, + UART_SIZE = UART_1_MMIO_SIZE, + UART_CLOCK = 0, /* dummy value, not used */ + }; +} + +#endif /* _SRC__INCLUDE__HW__SPEC__ARM__WAND_QUAD_BOARD_H_ */ diff --git a/repos/base-hw/src/include/hw/spec/arm/zynq_qemu_board.h b/repos/base-hw/src/include/hw/spec/arm/zynq_qemu_board.h new file mode 100644 index 000000000..43a46cfb8 --- /dev/null +++ b/repos/base-hw/src/include/hw/spec/arm/zynq_qemu_board.h @@ -0,0 +1,33 @@ +/* + * \brief Zynq specific board definitions + * \author Stefan Kalkowski + * \date 2019-05-16 + */ + +/* + * Copyright (C) 2019 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +#ifndef _SRC__INCLUDE__HW__SPEC__ARM__ZYNQ_BOARD_H_ +#define _SRC__INCLUDE__HW__SPEC__ARM__ZYNQ_BOARD_H_ + +#include +#include +#include +#include + +namespace Hw::Zynq_qemu_board { + using namespace Zynq_qemu; + using L2_cache = Hw::Pl310; + using Cpu_mmio = Hw::Cortex_a9_mmio; + using Serial = Genode::Xilinx_uart; + + enum { + UART_BASE = UART_0_MMIO_BASE, + }; +} + +#endif /* _SRC__INCLUDE__HW__SPEC__ARM__ZYNQ_BOARD_H_ */ diff --git a/repos/base-hw/src/include/hw/spec/riscv/board.h b/repos/base-hw/src/include/hw/spec/riscv/board.h new file mode 100644 index 000000000..5212da7ba --- /dev/null +++ b/repos/base-hw/src/include/hw/spec/riscv/board.h @@ -0,0 +1,35 @@ +/* + * \brief Riscv spike specific board definitions + * \author Stefan Kalkowski + * \date 2019-05-16 + */ + +/* + * Copyright (C) 2019 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +#ifndef _SRC__INCLUDE__HW__SPEC__RISCV__BOARD_H_ +#define _SRC__INCLUDE__HW__SPEC__RISCV__BOARD_H_ + +#include +#include +#include + +namespace Bootstrap { + struct Cpu {}; + struct Pic {}; +} + +namespace Hw::Riscv_board { + + using namespace Riscv; + + enum { UART_BASE, UART_CLOCK }; + struct Serial : Hw::Riscv_uart { + Serial(Genode::addr_t, Genode::size_t, unsigned) {} }; +} + +#endif /* _SRC__INCLUDE__HW__SPEC__RISCV__BOARD_H_ */ diff --git a/repos/base-hw/src/include/hw/spec/x86_64/pc_board.h b/repos/base-hw/src/include/hw/spec/x86_64/pc_board.h new file mode 100644 index 000000000..8eb1b136f --- /dev/null +++ b/repos/base-hw/src/include/hw/spec/x86_64/pc_board.h @@ -0,0 +1,30 @@ +/* + * \brief PC specific board definitions + * \author Stefan Kalkowski + * \date 2019-05-16 + */ + +/* + * Copyright (C) 2019 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +#ifndef _SRC__INCLUDE__HW__SPEC__X86_64__PC_BOARD_H_ +#define _SRC__INCLUDE__HW__SPEC__X86_64__PC_BOARD_H_ + +#include + +namespace Hw::Pc_board { + struct Serial; + enum Dummies { UART_BASE, UART_CLOCK }; +} + + +struct Hw::Pc_board::Serial : Genode::X86_uart +{ + Serial(Genode::addr_t, Genode::size_t, unsigned); +}; + +#endif /* _SRC__BOOTSTRAP__SPEC__X86_64__BOARD_H_ */