hw/arm: Add minimal support for the B-L475E-IOT01A board
Subsystems (2)
cover hw/arm: Add minimal support for the B-L475E-IOT01A board
This patch allows to emulate the B-L475E-IOT01A ARM Cortex-M4 board. It's a minimal version without any implemented peripherals yet. We've corrected the patch according to the reviews of Philippe Mathieu- Daudé (thank you !),
and additionally completed the MAINTAINERS file with the new devices.
I'm not sure whether it's alright to send this patch before peripherals are implemented ?
If it's not, we'll resend the complete patch later on.
Inès Varhol (2):
hw/arm: Add minimal support for the STM32L4x5 SoC hw/arm: Add minimal support for the B-L475E-IOT01A board
MAINTAINERS | 15 ++ configs/devices/arm-softmmu/default.mak | 1 + hw/arm/Kconfig | 11 + hw/arm/b-l475e-iot01a.c | 79 +++++++ hw/arm/meson.build | 2 + hw/arm/stm32l4x5_soc.c | 277 ++++++++++++++++++++++++ include/hw/arm/stm32l4x5_soc.h | 68 ++++++ 7 files changed, 453 insertions(+) create mode 100644 hw/arm/b-l475e-iot01a.c create mode 100644 hw/arm/stm32l4x5_soc.c create mode 100644 include/hw/arm/stm32l4x5_soc.h
Signature · 1 line
2.38.5
PATCH 1/2 hw/arm: Add minimal support for the STM32L4x5 SoC
From: Inès Varhol <[email protected]>
This patch adds a new STM32L4x5 SoC, it is necessary to add support for the B-L475E-IOT01A board.
The implementation is derived from the STM32F405 SoC.
The implementation contains no peripherals, only memory regions are implemented.
--- MAINTAINERS | 8 + hw/arm/Kconfig | 5 + hw/arm/meson.build | 1 + hw/arm/stm32l4x5_soc.c | 277 +++++++++++++++++++++++++++++++++ include/hw/arm/stm32l4x5_soc.h | 68 ++++++++ 5 files changed, 359 insertions(+) create mode 100644 hw/arm/stm32l4x5_soc.c create mode 100644 include/hw/arm/stm32l4x5_soc.h
MAINTAINERS +8 -0
@@ -1122,6 +1122,14 @@ L: [email protected] S: Maintained F: hw/arm/olimex-stm32-h405.c +STM32L4x5 SoC Family +M: Arnaud Minier <[email protected]> +M: Inès Varhol <[email protected]> +L: [email protected] +S: Maintained +F: hw/arm/stm32l4x5_soc.c +F: include/hw/arm/stm32l4x5_soc.h + SmartFusion2 M: Subbaraya Sundeep <[email protected]> M: Peter Maydell <[email protected]>
hw/arm/Kconfig +5 -0
@@ -448,6 +448,11 @@ config STM32F405_SOC select STM32F4XX_SYSCFG select STM32F4XX_EXTI +config STM32L4X5_SOC + bool + select ARM_V7M + select OR_IRQ + config XLNX_ZYNQMP_ARM bool default y if PIXMAN
hw/arm/meson.build +1 -0
@@ -42,6 +42,7 @@ arm_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2836.c', 'raspi.c')) arm_ss.add(when: 'CONFIG_STM32F100_SOC', if_true: files('stm32f100_soc.c')) arm_ss.add(when: 'CONFIG_STM32F205_SOC', if_true: files('stm32f205_soc.c')) arm_ss.add(when: 'CONFIG_STM32F405_SOC', if_true: files('stm32f405_soc.c')) +arm_ss.add(when: 'CONFIG_STM32L4X5_SOC', if_true: files('stm32l4x5_soc.c')) arm_ss.add(when: 'CONFIG_XLNX_ZYNQMP_ARM', if_true: files('xlnx-zynqmp.c', 'xlnx-zcu102.c')) arm_ss.add(when: 'CONFIG_XLNX_VERSAL', if_true: files('xlnx-versal.c', 'xlnx-versal-virt.c')) arm_ss.add(when: 'CONFIG_FSL_IMX25', if_true: files('fsl-imx25.c', 'imx25_pdk.c'))
hw/arm/stm32l4x5_soc.c new file +277 -0
277 lines not on this page · raw message
include/hw/arm/stm32l4x5_soc.h new file +68 -0
68 lines not on this page · raw message
Signature · 1 line
2.38.5
Re: [PATCH qemu 1/2] hw/arm: Add minimal support for the STM32L4x5 SoC
Quoted 76 lines · ~inesvarhol
From: Inès Varhol <[email protected]>
This patch adds a new STM32L4x5 SoC, it is necessary to add support for the B-L475E-IOT01A board.
The implementation is derived from the STM32F405 SoC.
The implementation contains no peripherals, only memory regions are implemented.Reviewed-by Philippe Mathieu-Daudé <[email protected]>Signed-off-by Arnaud Minier <[email protected]>Signed-off-by Inès Varhol <[email protected]>--- MAINTAINERS | 8 + hw/arm/Kconfig | 5 + hw/arm/meson.build | 1 + hw/arm/stm32l4x5_soc.c | 277 +++++++++++++++++++++++++++++++++ include/hw/arm/stm32l4x5_soc.h | 68 ++++++++ 5 files changed, 359 insertions(+) create mode 100644 hw/arm/stm32l4x5_soc.c create mode 100644 include/hw/arm/stm32l4x5_soc.hMAINTAINERS +8
-0@@ -1122,6 +1122,14 @@ L: [email protected] S: Maintained F: hw/arm/olimex-stm32-h405.c +STM32L4x5 SoC Family +M: Arnaud Minier <[email protected]> +M: Inès Varhol <[email protected]> +L: [email protected] +S: Maintained +F: hw/arm/stm32l4x5_soc.c +F: include/hw/arm/stm32l4x5_soc.h + SmartFusion2 M: Subbaraya Sundeep <[email protected]> M: Peter Maydell <[email protected]>hw/arm/Kconfig +5
-0@@ -448,6 +448,11 @@ config STM32F405_SOC select STM32F4XX_SYSCFG select STM32F4XX_EXTI +config STM32L4X5_SOC + bool + select ARM_V7M + select OR_IRQ + config XLNX_ZYNQMP_ARM bool default y if PIXMANhw/arm/meson.build +1
-0@@ -42,6 +42,7 @@ arm_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2836.c', 'raspi.c')) arm_ss.add(when: 'CONFIG_STM32F100_SOC', if_true: files('stm32f100_soc.c')) arm_ss.add(when: 'CONFIG_STM32F205_SOC', if_true: files('stm32f205_soc.c')) arm_ss.add(when: 'CONFIG_STM32F405_SOC', if_true: files('stm32f405_soc.c')) +arm_ss.add(when: 'CONFIG_STM32L4X5_SOC', if_true: files('stm32l4x5_soc.c')) arm_ss.add(when: 'CONFIG_XLNX_ZYNQMP_ARM', if_true: files('xlnx-zynqmp.c', 'xlnx-zcu102.c')) arm_ss.add(when: 'CONFIG_XLNX_VERSAL', if_true: files('xlnx-versal.c', 'xlnx-versal-virt.c')) arm_ss.add(when: 'CONFIG_FSL_IMX25', if_true: files('fsl-imx25.c', 'imx25_pdk.c'))hw/arm/stm32l4x5_soc.c new file +0
-0
hw/arm/stm32l4x5_soc.c line 4
Quoted 4 lines
hw/arm/stm32l4x5_soc.c new file +4
-0@@ -0,0 +1,277 @@ +/* +* STM32L4x5 SoC family +* +* SPDX-License-Identifier: MIT
I'm pretty sure this must be GPL to be accepted
Alistair
Re: [PATCH qemu 1/2] hw/arm: Add minimal support for the STM32L4x5 SoC
Quoted 75 lines · Alistair Francis
Quoted 74 lines · ~inesvarhol
From: Inès Varhol <[email protected]>
This patch adds a new STM32L4x5 SoC, it is necessary to add support for the B-L475E-IOT01A board.
The implementation is derived from the STM32F405 SoC.
The implementation contains no peripherals, only memory regions are implemented.Reviewed-by Philippe Mathieu-Daudé <[email protected]>Signed-off-by Arnaud Minier <[email protected]>Signed-off-by Inès Varhol <[email protected]>--- MAINTAINERS | 8 + hw/arm/Kconfig | 5 + hw/arm/meson.build | 1 + hw/arm/stm32l4x5_soc.c | 277 +++++++++++++++++++++++++++++++++ include/hw/arm/stm32l4x5_soc.h | 68 ++++++++ 5 files changed, 359 insertions(+) create mode 100644 hw/arm/stm32l4x5_soc.c create mode 100644 include/hw/arm/stm32l4x5_soc.hMAINTAINERS +8
-0@@ -1122,6 +1122,14 @@ L: [email protected] S: Maintained F: hw/arm/olimex-stm32-h405.c +STM32L4x5 SoC Family +M: Arnaud Minier <[email protected]> +M: Inès Varhol <[email protected]> +L: [email protected] +S: Maintained +F: hw/arm/stm32l4x5_soc.c +F: include/hw/arm/stm32l4x5_soc.h + SmartFusion2 M: Subbaraya Sundeep <[email protected]> M: Peter Maydell <[email protected]>hw/arm/Kconfig +5
-0@@ -448,6 +448,11 @@ config STM32F405_SOC select STM32F4XX_SYSCFG select STM32F4XX_EXTI +config STM32L4X5_SOC + bool + select ARM_V7M + select OR_IRQ + config XLNX_ZYNQMP_ARM bool default y if PIXMANhw/arm/meson.build +1
-0@@ -42,6 +42,7 @@ arm_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2836.c', 'raspi.c')) arm_ss.add(when: 'CONFIG_STM32F100_SOC', if_true: files('stm32f100_soc.c')) arm_ss.add(when: 'CONFIG_STM32F205_SOC', if_true: files('stm32f205_soc.c')) arm_ss.add(when: 'CONFIG_STM32F405_SOC', if_true: files('stm32f405_soc.c')) +arm_ss.add(when: 'CONFIG_STM32L4X5_SOC', if_true: files('stm32l4x5_soc.c')) arm_ss.add(when: 'CONFIG_XLNX_ZYNQMP_ARM', if_true: files('xlnx-zynqmp.c', 'xlnx-zcu102.c')) arm_ss.add(when: 'CONFIG_XLNX_VERSAL', if_true: files('xlnx-versal.c', 'xlnx-versal-virt.c')) arm_ss.add(when: 'CONFIG_FSL_IMX25', if_true: files('fsl-imx25.c', 'imx25_pdk.c'))hw/arm/stm32l4x5_soc.c new file +0
-1--- /dev/null
Quoted 8 lines
hw/arm/stm32l4x5_soc.c line 4
Quoted 6 lines
+++
b/hw/arm/stm32l4x5_soc.chw/arm/stm32l4x5_soc.c new file +4
-0@@ -0,0 +1,277 @@ +/* +* STM32L4x5 SoC family +* +* SPDX-License-Identifier: MIT I'm pretty sure this must be GPL to be accepted
Does it? A quick grep of the code shows we have quite a lot of hw emulation files that are MIT licensed. Although IANAL MIT is very permissive and easily combined with GPL as long at the final product is under GPL.
I think there is some LGPL code about for TCG but I'm not sure how well tagged that is.
Signature · 2 lines
Alex Bennée Virtualisation Tech Lead @ Linaro
Re: [PATCH qemu 1/2] hw/arm: Add minimal support for the STM32L4x5 SoC
Quoted 87 lines · Alex Bennée
Quoted 75 lines · Alistair Francis
Quoted 74 lines · ~inesvarhol
From: Inès Varhol <[email protected]>
This patch adds a new STM32L4x5 SoC, it is necessary to add support for the B-L475E-IOT01A board.
The implementation is derived from the STM32F405 SoC.
The implementation contains no peripherals, only memory regions are implemented.Reviewed-by Philippe Mathieu-Daudé <[email protected]>Signed-off-by Arnaud Minier <[email protected]>Signed-off-by Inès Varhol <[email protected]>--- MAINTAINERS | 8 + hw/arm/Kconfig | 5 + hw/arm/meson.build | 1 + hw/arm/stm32l4x5_soc.c | 277 +++++++++++++++++++++++++++++++++ include/hw/arm/stm32l4x5_soc.h | 68 ++++++++ 5 files changed, 359 insertions(+) create mode 100644 hw/arm/stm32l4x5_soc.c create mode 100644 include/hw/arm/stm32l4x5_soc.hMAINTAINERS +8
-0@@ -1122,6 +1122,14 @@ L: [email protected] S: Maintained F: hw/arm/olimex-stm32-h405.c +STM32L4x5 SoC Family +M: Arnaud Minier <[email protected]> +M: Inès Varhol <[email protected]> +L: [email protected] +S: Maintained +F: hw/arm/stm32l4x5_soc.c +F: include/hw/arm/stm32l4x5_soc.h + SmartFusion2 M: Subbaraya Sundeep <[email protected]> M: Peter Maydell <[email protected]>hw/arm/Kconfig +5
-0@@ -448,6 +448,11 @@ config STM32F405_SOC select STM32F4XX_SYSCFG select STM32F4XX_EXTI +config STM32L4X5_SOC + bool + select ARM_V7M + select OR_IRQ + config XLNX_ZYNQMP_ARM bool default y if PIXMANhw/arm/meson.build +1
-0@@ -42,6 +42,7 @@ arm_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2836.c', 'raspi.c')) arm_ss.add(when: 'CONFIG_STM32F100_SOC', if_true: files('stm32f100_soc.c')) arm_ss.add(when: 'CONFIG_STM32F205_SOC', if_true: files('stm32f205_soc.c')) arm_ss.add(when: 'CONFIG_STM32F405_SOC', if_true: files('stm32f405_soc.c')) +arm_ss.add(when: 'CONFIG_STM32L4X5_SOC', if_true: files('stm32l4x5_soc.c')) arm_ss.add(when: 'CONFIG_XLNX_ZYNQMP_ARM', if_true: files('xlnx-zynqmp.c', 'xlnx-zcu102.c')) arm_ss.add(when: 'CONFIG_XLNX_VERSAL', if_true: files('xlnx-versal.c', 'xlnx-versal-virt.c')) arm_ss.add(when: 'CONFIG_FSL_IMX25', if_true: files('fsl-imx25.c', 'imx25_pdk.c'))hw/arm/stm32l4x5_soc.c new file +0
-1--- /dev/nullQuoted 8 lines
hw/arm/stm32l4x5_soc.c line 4
Quoted 6 lines
+++
b/hw/arm/stm32l4x5_soc.chw/arm/stm32l4x5_soc.c new file +4
-0@@ -0,0 +1,277 @@ +/* +* STM32L4x5 SoC family +* +* SPDX-License-Identifier: MIT I'm pretty sure this must be GPL to be accepted
Quoted 4 lines
Does it? A quick grep of the code shows we have quite a lot of hw emulation files that are MIT licensed. Although IANAL MIT is very permissive and easily combined with GPL as long at the final product is under GPL.
Ah interesting. I just assumed everything had to be GPL
Nevermind then!
Alistair
Quoted 7 lines
I think there is some LGPL code about for TCG but I'm not sure how well tagged that is.
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
PATCH 2/2 hw/arm: Add minimal support for the B-L475E-IOT01A board
In reply to ~inesvarholFrom: Inès Varhol <[email protected]>
This commit adds a new B-L475E-IOT01A board using the STM32L475VG SoC. The implementation is derived from the Netduino Plus 2 machine. There are no peripherals implemented yet, only memory regions.
--- MAINTAINERS | 7 +++ configs/devices/arm-softmmu/default.mak | 1 + hw/arm/Kconfig | 6 ++ hw/arm/b-l475e-iot01a.c | 79 +++++++++++++++++++++++++ hw/arm/meson.build | 1 + 5 files changed, 94 insertions(+) create mode 100644 hw/arm/b-l475e-iot01a.c
MAINTAINERS +7 -0
@@ -1130,6 +1130,13 @@ S: Maintained F: hw/arm/stm32l4x5_soc.c F: include/hw/arm/stm32l4x5_soc.h +B-L475E-IOT01A IoT Node +M: Arnaud Minier <[email protected]> +M: Inès Varhol <[email protected]> +L: [email protected] +S: Maintained +F: hw/arm/b-l475e-iot01a.c + SmartFusion2 M: Subbaraya Sundeep <[email protected]> M: Peter Maydell <[email protected]>
configs/devices/arm-softmmu/default.mak +1 -0
@@ -19,6 +19,7 @@ CONFIG_ARM_VIRT=y # CONFIG_NSERIES=n # CONFIG_STELLARIS=n # CONFIG_STM32VLDISCOVERY=n +# CONFIG_B_L475E_IOT01A=n # CONFIG_REALVIEW=n # CONFIG_VERSATILE=n # CONFIG_VEXPRESS=n
hw/arm/Kconfig +6 -0
@@ -448,6 +448,12 @@ config STM32F405_SOC select STM32F4XX_SYSCFG select STM32F4XX_EXTI +config B_L475E_IOT01A + bool + default y + depends on TCG && ARM + select STM32L4X5_SOC + config STM32L4X5_SOC bool select ARM_V7M
hw/arm/b-l475e-iot01a.c new file +79 -0
79 lines not on this page · raw message
hw/arm/meson.build +1 -0
@@ -42,6 +42,7 @@ arm_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2836.c', 'raspi.c')) arm_ss.add(when: 'CONFIG_STM32F100_SOC', if_true: files('stm32f100_soc.c')) arm_ss.add(when: 'CONFIG_STM32F205_SOC', if_true: files('stm32f205_soc.c')) arm_ss.add(when: 'CONFIG_STM32F405_SOC', if_true: files('stm32f405_soc.c')) +arm_ss.add(when: 'CONFIG_B_L475E_IOT01A', if_true: files('b-l475e-iot01a.c')) arm_ss.add(when: 'CONFIG_STM32L4X5_SOC', if_true: files('stm32l4x5_soc.c')) arm_ss.add(when: 'CONFIG_XLNX_ZYNQMP_ARM', if_true: files('xlnx-zynqmp.c', 'xlnx-zcu102.c')) arm_ss.add(when: 'CONFIG_XLNX_VERSAL', if_true: files('xlnx-versal.c', 'xlnx-versal-virt.c'))
Signature · 1 line
2.38.5