Add the STM32F405 and Netduino Plus 2 machine
v4 cover Add the STM32F405 and Netduino Plus 2 machine
Now that the Arm-M4 CPU has been added to QEMU we can add the Netduino Plus 2 machine. This is very similar to the STM32F205 and Netduino 2 SoC and machine.
v4:
- Rebase on master
v3:
- Remove custom reset handler
- Add init-entry and init-sp properties
- Rebase on master (including Kconfig changes)
v2:
- Reorder patchset
- Return the kernel entry point instead of using a pointer
- Address Peter's comments
Alistair Francis (6):
armv7m: Allow entry information to be returned
target/arm: Allow setting M mode entry and sp
hw/misc: Add the STM32F4xx Sysconfig device
hw/misc: Add the STM32F4xx EXTI device
hw/arm: Add the STM32F4xx SoC
hw/arm: Add the Netduino Plus 2
MAINTAINERS | 14 ++ default-configs/arm-softmmu.mak | 1 + hw/arm/Kconfig | 16 ++ hw/arm/Makefile.objs | 2 + hw/arm/armv7m.c | 4 +- hw/arm/netduinoplus2.c | 58 ++++++ hw/arm/stm32f405_soc.c | 301 +++++++++++++++++++++++++++++ hw/misc/Kconfig | 6 + hw/misc/Makefile.objs | 2 + hw/misc/stm32f4xx_exti.c | 187 ++++++++++++++++++ hw/misc/stm32f4xx_syscfg.c | 168 ++++++++++++++++ hw/misc/trace-events | 11 ++ include/hw/arm/boot.h | 4 +- include/hw/arm/stm32f405_soc.h | 73 +++++++ include/hw/misc/stm32f4xx_exti.h | 60 ++++++ include/hw/misc/stm32f4xx_syscfg.h | 61 ++++++ target/arm/cpu.c | 52 ++++- target/arm/cpu.h | 3 + 18 files changed, 1016 insertions(+), 7 deletions(-) create mode 100644 hw/arm/netduinoplus2.c create mode 100644 hw/arm/stm32f405_soc.c create mode 100644 hw/misc/stm32f4xx_exti.c create mode 100644 hw/misc/stm32f4xx_syscfg.c create mode 100644 include/hw/arm/stm32f405_soc.h create mode 100644 include/hw/misc/stm32f4xx_exti.h create mode 100644 include/hw/misc/stm32f4xx_syscfg.h
Signature · 1 line
2.22.0
PATCH v4 1/6 armv7m: Allow entry information to be returned
Allow the kernel's entry point information to be returned when loading a kernel.
--- hw/arm/armv7m.c | 4 +++- include/hw/arm/boot.h | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-)
hw/arm/armv7m.c +3 -1
@@ -306,7 +306,7 @@ static void armv7m_reset(void *opaque)cpu_reset (CPU (cpu)); } -void armv7m_load_kernel (ARMCPU *cpu,const char *kernel_filename,int mem_size) +uint64_t armv7m_load_kernel (ARMCPU *cpu,const char *kernel_filename,int mem_size) {int image_size;uint64_t entry;
@@ -353,6 +353,8 @@ void armv7m_load_kernel(ARMCPU *cpu, const char *kernel_filename, int mem_size)* board must call this function! */ qemu_register_reset (armv7m_reset, cpu); + +return entry; }static Property bitband_properties[] = {
include/hw/arm/boot.h +3 -1
@@ -27,11 +27,13 @@ typedef enum {* @kernel_filename: file to load * @mem_size: mem_size: maximum image size to load * +* returns: location of the kernel's entry point +* * Load the guest image for an ARMv7M system. This must be called by * any ARMv7M board. (This is necessary to ensure that the CPU resets * correctly on system reset, as well as for kernel loading.) */ -void armv7m_load_kernel (ARMCPU *cpu,const char *kernel_filename,int mem_size); +uint64_t armv7m_load_kernel (ARMCPU *cpu,const char *kernel_filename,int mem_size);/* arm_boot.c */ struct arm_boot_info {
Signature · 1 line
2.22.0
PATCH v4 2/6 target/arm: Allow setting M mode entry and sp
In reply to Alistair FrancisAdd M mode initial entry PC and SP properties.
--- target/arm/cpu.c | 52 +++++++++++++++++++++++++++++++++++++++++++----- target/arm/cpu.h | 3 +++ 2 files changed, 50 insertions(+), 5 deletions(-)
target/arm/cpu.c +47 -5
@@ -311,6 +311,9 @@ static void arm_cpu_reset(CPUState *s)*/ initial_msp =ldl_p (rom); initial_pc =ldl_p (rom +4 ); + }else if (cpu->init_sp || cpu->init_entry) { + initial_msp = cpu->init_sp; + initial_pc = cpu->init_entry; }else {/* Address zero not covered by a ROM blob, or the ROM blob * is in non-modifiable memory and this is a second reset after
@@ -1055,6 +1058,38 @@ static void arm_set_init_svtor(Object *obj, Visitor *v, const char *name,visit_type_uint32 (v, name, &cpu->init_svtor, errp); } +static void arm_get_init_sp (Object *obj,Visitor *v,const char *name, +void *opaque,Error **errp) +{ +ARMCPU *cpu =ARM_CPU (obj); + +visit_type_uint32 (v, name, &cpu->init_sp, errp); +} + +static void arm_set_init_sp (Object *obj,Visitor *v,const char *name, +void *opaque,Error **errp) +{ +ARMCPU *cpu =ARM_CPU (obj); + +visit_type_uint32 (v, name, &cpu->init_sp, errp); +} + +static void arm_get_init_entry (Object *obj,Visitor *v,const char *name, +void *opaque,Error **errp) +{ +ARMCPU *cpu =ARM_CPU (obj); + +visit_type_uint32 (v, name, &cpu->init_entry, errp); +} + +static void arm_set_init_entry (Object *obj,Visitor *v,const char *name, +void *opaque,Error **errp) +{ +ARMCPU *cpu =ARM_CPU (obj); + +visit_type_uint32 (v, name, &cpu->init_entry, errp); +} +void arm_cpu_post_init (Object *obj) {ARMCPU *cpu =ARM_CPU (obj);
@@ -1155,19 +1190,26 @@ void arm_cpu_post_init(Object *obj) } } +/* +* M profile: initial value of the SP, entry and Secure VTOR. +* We can't just use a simple DEFINE_PROP_UINT32 for this because we want +* to permit the property to be set after realize. +*/ if (arm_feature (&cpu->env,ARM_FEATURE_M_SECURITY )) {object_property_add_link (obj,"idau" ,TYPE_IDAU_INTERFACE , &cpu->idau, qdev_prop_allow_set_link_before_realize,OBJ_PROP_LINK_STRONG , &error_abort); -/* -* M profile: initial value of the Secure VTOR. We can't just use -* a simple DEFINE_PROP_UINT32 for this because we want to permit -* the property to be set after realize. -*/ object_property_add (obj,"init-svtor" ,"uint32" , arm_get_init_svtor, arm_set_init_svtor,NULL ,NULL , &error_abort); + }else if (arm_feature (&cpu->env,ARM_FEATURE_M )) { +object_property_add (obj,"init-sp" ,"uint32" , + arm_get_init_sp, arm_set_init_sp, +NULL ,NULL , &error_abort); +object_property_add (obj,"init-entry" ,"uint32" , + arm_get_init_entry, arm_set_init_entry, +NULL ,NULL , &error_abort); } qdev_property_add_static(DEVICE(obj), &arm_cpu_cfgend_property,
target/arm/cpu.h +3 -0
@@ -805,6 +805,9 @@ struct ARMCPU {*/ uint32_t psci_conduit; +/* For M, initial value of the entry and SP */ +uint32_t init_sp, init_entry; +/* For v8M, initial value of the Secure VTOR */ uint32_t init_svtor;
Signature · 1 line
2.22.0
PATCH v4 3/6 hw/misc: Add the STM32F4xx Sysconfig device
In reply to Alistair Francis--- default-configs/arm-softmmu.mak | 1 + hw/arm/Kconfig | 9 ++ hw/misc/Kconfig | 3 + hw/misc/Makefile.objs | 1 + hw/misc/stm32f4xx_syscfg.c | 168 +++++++++++++++++++++++++++++ hw/misc/trace-events | 6 ++ include/hw/misc/stm32f4xx_syscfg.h | 61 +++++++++++ 7 files changed, 249 insertions(+) create mode 100644 hw/misc/stm32f4xx_syscfg.c create mode 100644 include/hw/misc/stm32f4xx_syscfg.h
default-configs/arm-softmmu.mak +1 -0
@@ -30,6 +30,7 @@ CONFIG_Z2=y CONFIG_COLLIE=y CONFIG_ASPEED_SOC=y CONFIG_NETDUINO2=y +CONFIG_NETDUINOPLUS2=y CONFIG_MPS2=y CONFIG_RASPI=y CONFIG_DIGIC=y
hw/arm/Kconfig +9 -0
@@ -97,6 +97,10 @@ config NETDUINO2 bool select STM32F205_SOC +config NETDUINOPLUS2 + bool + select STM32F405_SOC + config NSERIES bool select OMAP
@@ -303,6 +307,11 @@ config STM32F205_SOC select STM32F2XX_ADC select STM32F2XX_SPI +config STM32F405_SOC + bool + select ARM_V7M + select STM32F4XX_SYSCFG + config XLNX_ZYNQMP_ARM bool select AHCI
hw/misc/Kconfig +3 -0
@@ -82,6 +82,9 @@ config IMX config STM32F2XX_SYSCFG bool +config STM32F4XX_SYSCFG + bool + config MIPS_ITU bool
hw/misc/Makefile.objs +1 -0
@@ -57,6 +57,7 @@ obj-$(CONFIG_SLAVIO) += slavio_misc.o obj-$(CONFIG_ZYNQ) += zynq_slcr.o obj-$(CONFIG_ZYNQ) += zynq-xadc.o obj-$(CONFIG_STM32F2XX_SYSCFG) += stm32f2xx_syscfg.o +obj-$(CONFIG_STM32F4XX_SYSCFG) += stm32f4xx_syscfg.o obj-$(CONFIG_MIPS_CPS) += mips_cmgcr.o obj-$(CONFIG_MIPS_CPS) += mips_cpc.o obj-$(CONFIG_MIPS_ITU) += mips_itu.o
hw/misc/stm32f4xx_syscfg.c new file +168 -0
168 lines not on this page · raw message
hw/misc/trace-events +6 -0
@@ -84,6 +84,12 @@ mos6522_set_sr_int(void) "set sr_int" mos6522_write(uint64_t addr, uint64_t val) "reg=0x%"PRIx64 " val=0x%"PRIx64 mos6522_read(uint64_t addr, unsigned val) "reg=0x%"PRIx64 " val=0x%x" +# stm32f4xx_syscfg +stm32f4xx_syscfg_set_irq(int gpio, int line, int level) "Interupt: GPIO: %d, Line: %d; Level: %d" +stm32f4xx_pulse_exti(int irq) "Pulse EXTI: %d" +stm32f4xx_syscfg_read(uint64_t addr) "reg read: addr: 0x%" PRIx64 " " +stm32f4xx_syscfg_write(uint64_t addr, uint64_t data) "reg write: addr: 0x%" PRIx64 " val: 0x%" PRIx64 "" + # tz-mpc.c tz_mpc_reg_read(uint32_t offset, uint64_t data, unsigned size) "TZ MPC regs read: offset 0x%x data 0x%" PRIx64 " size %u" tz_mpc_reg_write(uint32_t offset, uint64_t data, unsigned size) "TZ MPC regs write: offset 0x%x data 0x%" PRIx64 " size %u"
include/hw/misc/stm32f4xx_syscfg.h new file +61 -0
61 lines not on this page · raw message
Signature · 1 line
2.22.0
PATCH v4 4/6 hw/misc: Add the STM32F4xx EXTI device
In reply to Alistair Francis--- hw/arm/Kconfig | 1 + hw/misc/Kconfig | 3 + hw/misc/Makefile.objs | 1 + hw/misc/stm32f4xx_exti.c | 187 +++++++++++++++++++++++++++++++ hw/misc/trace-events | 5 + include/hw/misc/stm32f4xx_exti.h | 60 ++++++++++ 6 files changed, 257 insertions(+) create mode 100644 hw/misc/stm32f4xx_exti.c create mode 100644 include/hw/misc/stm32f4xx_exti.h
hw/arm/Kconfig +1 -0
@@ -311,6 +311,7 @@ config STM32F405_SOC bool select ARM_V7M select STM32F4XX_SYSCFG + select STM32F4XX_EXTI config XLNX_ZYNQMP_ARM bool
hw/misc/Kconfig +3 -0
@@ -85,6 +85,9 @@ config STM32F2XX_SYSCFG config STM32F4XX_SYSCFG bool +config STM32F4XX_EXTI + bool + config MIPS_ITU bool
hw/misc/Makefile.objs +1 -0
@@ -58,6 +58,7 @@ obj-$(CONFIG_ZYNQ) += zynq_slcr.o obj-$(CONFIG_ZYNQ) += zynq-xadc.o obj-$(CONFIG_STM32F2XX_SYSCFG) += stm32f2xx_syscfg.o obj-$(CONFIG_STM32F4XX_SYSCFG) += stm32f4xx_syscfg.o +obj-$(CONFIG_STM32F4XX_EXTI) += stm32f4xx_exti.o obj-$(CONFIG_MIPS_CPS) += mips_cmgcr.o obj-$(CONFIG_MIPS_CPS) += mips_cpc.o obj-$(CONFIG_MIPS_ITU) += mips_itu.o
hw/misc/stm32f4xx_exti.c new file +187 -0
187 lines not on this page · raw message
hw/misc/trace-events +5 -0
@@ -90,6 +90,11 @@ stm32f4xx_pulse_exti(int irq) "Pulse EXTI: %d" stm32f4xx_syscfg_read(uint64_t addr) "reg read: addr: 0x%" PRIx64 " " stm32f4xx_syscfg_write(uint64_t addr, uint64_t data) "reg write: addr: 0x%" PRIx64 " val: 0x%" PRIx64 "" +# stm32f4xx_exti +stm32f4xx_exti_set_irq(int irq, int leve) "Set EXTI: %d to %d" +stm32f4xx_exti_read(uint64_t addr) "reg read: addr: 0x%" PRIx64 " " +stm32f4xx_exti_write(uint64_t addr, uint64_t data) "reg write: addr: 0x%" PRIx64 " val: 0x%" PRIx64 "" + # tz-mpc.c tz_mpc_reg_read(uint32_t offset, uint64_t data, unsigned size) "TZ MPC regs read: offset 0x%x data 0x%" PRIx64 " size %u" tz_mpc_reg_write(uint32_t offset, uint64_t data, unsigned size) "TZ MPC regs write: offset 0x%x data 0x%" PRIx64 " size %u"
include/hw/misc/stm32f4xx_exti.h new file +60 -0
60 lines not on this page · raw message
Signature · 1 line
2.22.0
PATCH v4 5/6 hw/arm: Add the STM32F4xx SoC
In reply to Alistair Francis--- MAINTAINERS | 8 + hw/arm/Kconfig | 3 + hw/arm/Makefile.objs | 1 + hw/arm/stm32f405_soc.c | 301 +++++++++++++++++++++++++++++++++ include/hw/arm/stm32f405_soc.h | 73 ++++++++ 5 files changed, 386 insertions(+) create mode 100644 hw/arm/stm32f405_soc.c create mode 100644 include/hw/arm/stm32f405_soc.h
MAINTAINERS +8 -0
@@ -814,6 +814,14 @@ F: hw/adc/* F: hw/ssi/stm32f2xx_spi.c F: include/hw/*/stm32*.h +STM32F405 +M: Alistair Francis <[email protected]> +M: Peter Maydell <[email protected]> +S: Maintained +F: hw/arm/stm32f405_soc.c +F: hw/misc/stm32f4xx_syscfg.c +F: hw/misc/stm32f4xx_exti.c + Netduino 2 M: Alistair Francis <[email protected]> M: Peter Maydell <[email protected]>
hw/arm/Kconfig +3 -0
@@ -313,6 +313,9 @@ config STM32F405_SOC select STM32F4XX_SYSCFG select STM32F4XX_EXTI +config STM32F405_SOC + bool + config XLNX_ZYNQMP_ARM bool select AHCI
hw/arm/Makefile.objs +1 -0
@@ -36,6 +36,7 @@ obj-$(CONFIG_STRONGARM) += strongarm.o obj-$(CONFIG_ALLWINNER_A10) += allwinner-a10.o cubieboard.o obj-$(CONFIG_RASPI) += bcm2835_peripherals.o bcm2836.o raspi.o obj-$(CONFIG_STM32F205_SOC) += stm32f205_soc.o +obj-$(CONFIG_STM32F405_SOC) += stm32f405_soc.o obj-$(CONFIG_XLNX_ZYNQMP_ARM) += xlnx-zynqmp.o xlnx-zcu102.o obj-$(CONFIG_XLNX_VERSAL) += xlnx-versal.o xlnx-versal-virt.o obj-$(CONFIG_FSL_IMX25) += fsl-imx25.o imx25_pdk.o
hw/arm/stm32f405_soc.c new file +301 -0
301 lines not on this page · raw message
include/hw/arm/stm32f405_soc.h new file +73 -0
73 lines not on this page · raw message
Signature · 1 line
2.22.0
PATCH v4 6/6 hw/arm: Add the Netduino Plus 2
In reply to Alistair Francis--- MAINTAINERS | 6 +++++ hw/arm/Kconfig | 3 +++ hw/arm/Makefile.objs | 1 + hw/arm/netduinoplus2.c | 58 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 68 insertions(+) create mode 100644 hw/arm/netduinoplus2.c
MAINTAINERS +6 -0
@@ -828,6 +828,12 @@ M: Peter Maydell <[email protected]> S: Maintained F: hw/arm/netduino2.c +Netduino Plus 2 +M: Alistair Francis <[email protected]> +M: Peter Maydell <[email protected]> +S: Maintained +F: hw/arm/netduinoplus2.c + SmartFusion2 M: Subbaraya Sundeep <[email protected]> M: Peter Maydell <[email protected]>
hw/arm/Kconfig +3 -0
@@ -101,6 +101,9 @@ config NETDUINOPLUS2 bool select STM32F405_SOC +config NETDUINOPLUS2 + bool + config NSERIES bool select OMAP
hw/arm/Makefile.objs +1 -0
@@ -11,6 +11,7 @@ obj-$(CONFIG_MAINSTONE) += mainstone.o obj-$(CONFIG_MICROBIT) += microbit.o obj-$(CONFIG_MUSICPAL) += musicpal.o obj-$(CONFIG_NETDUINO2) += netduino2.o +obj-$(CONFIG_NETDUINOPLUS2) += netduinoplus2.o obj-$(CONFIG_NSERIES) += nseries.o obj-$(CONFIG_SX1) += omap_sx1.o obj-$(CONFIG_CHEETAH) += palm.o
hw/arm/netduinoplus2.c new file +58 -0
58 lines not on this page · raw message
Signature · 1 line
2.22.0
Patchew URL: https://patchew.org/QEMU/[email protected]/
Patchew URL: https://patchew.org/QEMU/[email protected]/
Hi,
This series seems to have some coding style problems. See output below for more information:
Subject: [Qemu-devel] [PATCH v4 0/6] Add the STM32F405 and Netduino Plus 2 machine
Message-id: [email protected]
Type: series
=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===
Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384 Switched to a new branch 'test'
8b0ecd4 hw/arm: Add the Netduino Plus 2 407f73f hw/arm: Add the STM32F4xx SoC
512fff3 hw/misc: Add the STM32F4xx EXTI device 2caad5c hw/misc: Add the STM32F4xx Sysconfig device 955f060 target/arm: Allow setting M mode entry and sp d81d27f armv7m: Allow entry information to be returned
=== OUTPUT BEGIN ===
1/6 Checking commit d81d27f0996a (armv7m: Allow entry information to be returned)
WARNING: line over 80 characters
#24: FILE: hw/arm/armv7m.c:309:
+uint64_t armv7m_load_kernel(ARMCPU *cpu, const char *kernel_filename, int mem_size)
WARNING: line over 80 characters
#52: FILE: include/hw/arm/boot.h:36:
+uint64_t armv7m_load_kernel(ARMCPU *cpu, const char *kernel_filename, int mem_size);
total: 0 errors, 2 warnings, 30 lines checked
Patch 1/6 has style problems, please review. If any of these errors are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
2/6 Checking commit 955f06078662 (target/arm: Allow setting M mode entry and sp) 3/6 Checking commit 2caad5c67035 (hw/misc: Add the STM32F4xx Sysconfig device)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #77:
new file mode 100644
ERROR: suspect code indent for conditional statements (4, 7) #135: FILE: hw/misc/stm32f4xx_syscfg.c:54:
+ if (extract32(s->syscfg_exticr[icrreg], startbit, 4) == config) {
+ qemu_set_irq(s->gpio_out[irq], level);
WARNING: line over 80 characters
#222: FILE: hw/misc/stm32f4xx_syscfg.c:141:
+ VMSTATE_UINT32_ARRAY(syscfg_exticr, STM32F4xxSyscfgState, SYSCFG_NUM_EXTICR),
total: 1 errors, 2 warnings, 285 lines checked
Patch 3/6 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
4/6 Checking commit 512fff3fab76 (hw/misc: Add the STM32F4xx EXTI device)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #50:
new file mode 100644
total: 0 errors, 1 warnings, 281 lines checked
Patch 4/6 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
5/6 Checking commit 407f73fb3229 (hw/arm: Add the STM32F4xx SoC)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #57:
new file mode 100644
total: 0 errors, 1 warnings, 404 lines checked
Patch 5/6 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
6/6 Checking commit 8b0ecd413bdc (hw/arm: Add the Netduino Plus 2)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #54:
new file mode 100644
total: 0 errors, 1 warnings, 86 lines checked
Patch 6/6 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
=== OUTPUT END ===
Test command exited with code: 1
The full log is available at
http://patchew.org/logs/[email protected]/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to [email protected]
Quoted 18 lines · Alistair Francis
Now that the Arm-M4 CPU has been added to QEMU we can add the Netduino Plus 2 machine. This is very similar to the STM32F205 and Netduino 2 SoC and machine.
v4:
- Rebase on master
v3:
- Remove custom reset handler
- Add init-entry and init-sp properties
- Rebase on master (includingKconfigchanges)
v2:
- Reorder patchset
- Return the kernel entry point instead of using a pointer
- Address Peter's comments
Quoted 7 lines
Alistair Francis (6):
armv7m: Allow entry information to be returned
target/arm: Allow setting M mode entry and sp
hw/misc: Add the STM32F4xx Sysconfig device
hw/misc: Add the STM32F4xx EXTI device
hw/arm: Add the STM32F4xx SoC
hw/arm: Add the Netduino Plus 2
What are the changes for setting initial SP and PC for? Why is this SoC special? Is it different from the stm32f205 SoC we model already?
I'm not in general a fan of individual board models having their own custom behaviour for -kernel. The inconsistencies between architectures and between A- and M- profile are awkward enough as it is...
thanks
-- PMM
Quoted 27 lines · Peter Maydell
Quoted 18 lines · Alistair Francis
Now that the Arm-M4 CPU has been added to QEMU we can add the Netduino Plus 2 machine. This is very similar to the STM32F205 and Netduino 2 SoC and machine.
v4:
- Rebase on master
v3:
- Remove custom reset handler
- Add init-entry and init-sp properties
- Rebase on master (includingKconfigchanges) v2:
- Reorder patchset
- Return the kernel entry point instead of using a pointer
- Address Peter's commentsQuoted 7 lines
Alistair Francis (6):
armv7m: Allow entry information to be returned
target/arm: Allow setting M mode entry and sp
hw/misc: Add the STM32F4xx Sysconfig device
hw/misc: Add the STM32F4xx EXTI device
hw/arm: Add the STM32F4xx SoC
hw/arm: Add the Netduino Plus 2
Quoted 1 line
What are the changes for setting initial SP and PC for?
If it's not set the the guest code jumps into some broken address and crashes at boot.
Quoted 2 lines
Why is this SoC special? Is it different from the stm32f205 SoC we model already?
From memory the STM32F205 might have the same issue. It just wasn't a big problem as my STM32F2xx tests were targeting QEMU while the STM32F4xx isn't.
Quoted 5 lines
I'm not in general a fan of individual board models having their own custom behaviour for -kernel. The inconsistencies between architectures and between A- and M- profile are awkward enough as it is...
I do see it as a pain as well, but I'm not sure what else to do to fix it.
Alistair
Quoted 5 lines
thanks
-- PMM
Quoted 10 lines · Alistair
Quoted 6 lines · Peter Maydell
Quoted 3 lines · Alistair Francis
Now that the Arm-M4 CPU has been added to QEMU we can add the Netduino Plus 2 machine. This is very similar to the STM32F205 and Netduino 2 SoC and machine.
What are the changes for setting initial SP and PC for?
If it's not set the the guest code jumps into some broken address and crashes at boot.
If this happens then something else is wrong. The CPU should be reading the initial SP and PC from the vector table that's in the guest image. If it's not doing that then we need to figure out why (perhaps we're not setting the correct value for the vector table base register?)
thanks
-- PMM