target-arm queue
Last lot of patches for arm before softfreeze tomorrow...
thanks
-- PMM
The following changes since commit ef3a6af5e789ff078d1fef880f9dfb6adf18e8f1:
Merge remote-tracking branch 'remotes/kraxel/tags/vga-20181029-pull-request' into staging (2018-10-29 12:59:15 +0000)
are available in the Git repository at:
https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20181029
for you to fetch changes up to 20cf5663734310a282e27b7389bc9f53ffe227e6:
tests/boot-serial-test: Add microbit board testcase (2018-10-29 15:19:48 +0000)
----------------------------------------------------------------
target-arm queue:
* microbit: Add the UART to our nRF51 SoC model
* Add a virtual Xilinx Versal board "xlnx-versal-virt"
* hw/arm/virt: Set VIRT_COMPAT_3_0 compat
----------------------------------------------------------------
Edgar E. Iglesias (2):
hw/arm: versal: Add a model of Xilinx Versal SoC hw/arm: versal: Add a virtual Xilinx Versal board
Eric Auger (1):
hw/arm/virt: Set VIRT_COMPAT_3_0 compat
Julia Suvorova (3):
hw/char: Implement nRF51 SoC UART hw/arm/nrf51_soc: Connect UART to nRF51 SoC tests/boot-serial-test: Add microbit board testcase
hw/arm/Makefile.objs | 1 + hw/char/Makefile.objs | 1 + include/hw/arm/nrf51_soc.h | 3 + include/hw/arm/xlnx-versal.h | 122 +++++++++ include/hw/char/nrf51_uart.h | 78 ++++++ hw/arm/microbit.c | 2 + hw/arm/nrf51_soc.c | 20 ++ hw/arm/virt.c | 4 + hw/arm/xlnx-versal-virt.c | 493 ++++++++++++++++++++++++++++++++++++ hw/arm/xlnx-versal.c | 323 +++++++++++++++++++++++ hw/char/nrf51_uart.c | 330 ++++++++++++++++++++++++ tests/boot-serial-test.c | 19 ++ default-configs/aarch64-softmmu.mak | 1 + hw/char/trace-events | 4 + 14 files changed, 1401 insertions(+) create mode 100644 include/hw/arm/xlnx-versal.h create mode 100644 include/hw/char/nrf51_uart.h create mode 100644 hw/arm/xlnx-versal-virt.c create mode 100644 hw/arm/xlnx-versal.c create mode 100644 hw/char/nrf51_uart.c
[Qemu-devel] [PULL 6/6] tests/boot-serial-test: Add microbit board testcase
From: Julia Suvorova via Qemu-devel <[email protected]>
New mini-kernel test for nRF51 SoC UART.
--- tests/boot-serial-test.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
tests/boot-serial-test.c +19 -0
@@ -62,6 +62,24 @@ static const uint8_t kernel_aarch64[] = { 0xfd, 0xff, 0xff, 0x17, /* b -12 (loop) */ }; +static const uint8_t kernel_nrf51[] = { +0x00 ,0x00 ,0x00 ,0x00 ,/* Stack top address */ +0x09 ,0x00 ,0x00 ,0x00 ,/* Reset handler address */ +0x04 ,0x4a ,/* ldr r2, [pc, #16] Get ENABLE */ +0x04 ,0x21 ,/* movs r1, #4 */ +0x11 ,0x60 ,/* str r1, [r2] */ +0x04 ,0x4a ,/* ldr r2, [pc, #16] Get STARTTX */ +0x01 ,0x21 ,/* movs r1, #1 */ +0x11 ,0x60 ,/* str r1, [r2] */ +0x03 ,0x4a ,/* ldr r2, [pc, #12] Get TXD */ +0x54 ,0x21 ,/* movs r1, 'T' */ +0x11 ,0x60 ,/* str r1, [r2] */ +0xfe ,0xe7 ,/* b . */ +0x00 ,0x25 ,0x00 ,0x40 ,/* 0x40002500 = UART ENABLE */ +0x08 ,0x20 ,0x00 ,0x40 ,/* 0x40002008 = UART STARTTX */ +0x1c ,0x25 ,0x00 ,0x40 /* 0x4000251c = UART TXD */ +}; + typedef struct testdef { const char *arch; /* Target architecture */ const char *machine; /* Name of the machine */
@@ -105,6 +123,7 @@ static testdef_t tests[] = { { "hppa", "hppa", "", "SeaBIOS wants SYSTEM HALT" }, { "aarch64", "virt", "-cpu cortex-a57", "TT", sizeof(kernel_aarch64), kernel_aarch64 }, + { "arm", "microbit", "", "T", sizeof(kernel_nrf51), kernel_nrf51 }, { NULL } };
Signature · 1 line
2.19.1
[Qemu-devel] [PULL 5/6] hw/arm/nrf51_soc: Connect UART to nRF51 SoC
In reply to Peter MaydellFrom: Julia Suvorova via Qemu-devel <[email protected]>
Wire up nRF51 UART in the corresponding SoC.
--- include/hw/arm/nrf51_soc.h | 3 +++ hw/arm/microbit.c | 2 ++ hw/arm/nrf51_soc.c | 20 ++++++++++++++++++++ 3 files changed, 25 insertions(+)
include/hw/arm/nrf51_soc.h +3 -0
@@ -12,6 +12,7 @@#include "hw/sysbus.h" #include "hw/arm/armv7m.h" +#include "hw/char/nrf51_uart.h" #define TYPE_NRF51_SOC "nrf51-soc"#define NRF51_SOC (obj) \
@@ -24,6 +25,8 @@ typedef struct NRF51State {/*< public >*/ ARMv7MState cpu; +NRF51UARTState uart; +MemoryRegion iomem;MemoryRegion sram;MemoryRegion flash;
hw/arm/microbit.c +2 -0
@@ -12,6 +12,7 @@#include "qapi/error.h" #include "hw/boards.h" #include "hw/arm/arm.h" +#include "sysemu/sysemu.h" #include "exec/address-spaces.h" #include "hw/arm/nrf51_soc.h"
@@ -35,6 +36,7 @@ static void microbit_init(MachineState *machine)sysbus_init_child_obj (OBJECT (machine),"nrf51" , soc,sizeof (s->nrf51),TYPE_NRF51_SOC ); +qdev_prop_set_chr (DEVICE (&s->nrf51),"serial0" ,serial_hd (0 ));object_property_set_link (soc,OBJECT (system_memory),"memory" , &error_fatal);object_property_set_bool (soc, true,"realized" , &error_fatal);
hw/arm/nrf51_soc.c +20 -0
@@ -43,9 +43,12 @@#define NRF51822_FLASH_SIZE (256 * 1024)#define NRF51822_SRAM_SIZE (16 * 1024) +#define BASE_TO_IRQ (base) ((base >> 12) & 0x1F) +static void nrf51_soc_realize (DeviceState *dev_soc,Error **errp) {NRF51State *s =NRF51_SOC (dev_soc); +MemoryRegion *mr;Error *err =NULL ;if (!s->board_memory) {
@@ -82,6 +85,18 @@ static void nrf51_soc_realize(DeviceState *dev_soc, Error **errp) }memory_region_add_subregion (&s->container,SRAM_BASE , &s->sram); +/* UART */ +object_property_set_bool (OBJECT (&s->uart), true,"realized" , &err); +if (err) { +error_propagate (errp, err); +return ; + } + mr =sysbus_mmio_get_region (SYS_BUS_DEVICE (&s->uart),0 ); +memory_region_add_subregion_overlap (&s->container,UART_BASE , mr,0 ); +sysbus_connect_irq (SYS_BUS_DEVICE (&s->uart),0 , +qdev_get_gpio_in (DEVICE (&s->cpu), +BASE_TO_IRQ (UART_BASE ))); +create_unimplemented_device ("nrf51_soc.io" ,IOMEM_BASE ,IOMEM_SIZE );create_unimplemented_device ("nrf51_soc.ficr" ,FICR_BASE ,FICR_SIZE ); create_unimplemented_device("nrf51_soc.private",
@@ -99,6 +114,11 @@ static void nrf51_soc_init(Object *obj)qdev_prop_set_string (DEVICE (&s->cpu),"cpu-type" ,ARM_CPU_TYPE_NAME ("cortex-m0" ));qdev_prop_set_uint32 (DEVICE (&s->cpu),"num-irq" ,32 ); + +sysbus_init_child_obj (obj,"uart" , &s->uart,sizeof (s->uart), +TYPE_NRF51_UART ); +object_property_add_alias (obj,"serial0" ,OBJECT (&s->uart),"chardev" , + &error_abort); }static Property nrf51_soc_properties[] = {
Signature · 1 line
2.19.1
[Qemu-devel] [PULL 4/6] hw/char: Implement nRF51 SoC UART
In reply to Peter MaydellFrom: Julia Suvorova via Qemu-devel <[email protected]>
Not implemented: CTS/NCTS, PSEL*.
--- hw/char/Makefile.objs | 1 + include/hw/char/nrf51_uart.h | 78 +++++++++ hw/char/nrf51_uart.c | 330 +++++++++++++++++++++++++++++++++++ hw/char/trace-events | 4 + 4 files changed, 413 insertions(+) create mode 100644 include/hw/char/nrf51_uart.h create mode 100644 hw/char/nrf51_uart.c
hw/char/Makefile.objs +1 -0
@@ -1,5 +1,6 @@ common-obj-$(CONFIG_IPACK) += ipoctal232.o common-obj-$(CONFIG_ESCC) += escc.o +common-obj-$(CONFIG_NRF51_SOC) += nrf51_uart.o common-obj-$(CONFIG_PARALLEL) += parallel.o common-obj-$(CONFIG_PARALLEL) += parallel-isa.o common-obj-$(CONFIG_PL011) += pl011.o
include/hw/char/nrf51_uart.h new file +78 -0
78 lines not on this page · raw message
hw/char/nrf51_uart.c new file +330 -0
330 lines not on this page · raw message
hw/char/trace-events +4 -0
@@ -73,3 +73,7 @@ cmsdk_apb_uart_receive(uint8_t c) "CMSDK APB UART: got character 0x%x from backe cmsdk_apb_uart_tx_pending(void) "CMSDK APB UART: character send to backend pending" cmsdk_apb_uart_tx(uint8_t c) "CMSDK APB UART: character 0x%x sent to backend" cmsdk_apb_uart_set_params(int speed) "CMSDK APB UART: params set to %d 8N1" + +# hw/char/nrf51_uart.c +nrf51_uart_read(uint64_t addr, uint64_t r, unsigned int size) "addr 0x%" PRIx64 " value 0x%" PRIx64 " size %u" +nrf51_uart_write(uint64_t addr, uint64_t value, unsigned int size) "addr 0x%" PRIx64 " value 0x%" PRIx64 " size %u"
Signature · 1 line
2.19.1
[Qemu-devel] [PULL 1/6] hw/arm/virt: Set VIRT_COMPAT_3_0 compat
In reply to Peter MaydellFrom: Eric Auger <[email protected]>
We are missing the VIRT_COMPAT_3_0 definition and setting. Let's add them.
Message-id: [email protected]
--- hw/arm/virt.c | 4 ++++ 1 file changed, 4 insertions(+)
hw/arm/virt.c +4 -0
@@ -1871,6 +1871,9 @@ static void virt_machine_3_1_options(MachineClass *mc) } DEFINE_VIRT_MACHINE_AS_LATEST(3, 1) +#define VIRT_COMPAT_3_0 \ + HW_COMPAT_3_0 +static void virt_3_0_instance_init (Object *obj) {virt_3_1_instance_init (obj);
@@ -1879,6 +1882,7 @@ static void virt_3_0_instance_init(Object *obj)static void virt_machine_3_0_options (MachineClass *mc) {virt_machine_3_1_options (mc); +SET_MACHINE_COMPAT (mc,VIRT_COMPAT_3_0 ); }DEFINE_VIRT_MACHINE (3 ,0 )
Signature · 1 line
2.19.1
[Qemu-devel] [PULL 2/6] hw/arm: versal: Add a model of Xilinx Versal SoC
In reply to Peter MaydellFrom: "Edgar E. Iglesias" <[email protected]>
Add a model of Xilinx Versal SoC.
--- hw/arm/Makefile.objs | 1 + include/hw/arm/xlnx-versal.h | 122 +++++++++++ hw/arm/xlnx-versal.c | 323 ++++++++++++++++++++++++++++ default-configs/aarch64-softmmu.mak | 1 + 4 files changed, 447 insertions(+) create mode 100644 include/hw/arm/xlnx-versal.h create mode 100644 hw/arm/xlnx-versal.c
hw/arm/Makefile.objs +1 -0
@@ -26,6 +26,7 @@ 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_XLNX_ZYNQMP_ARM) += xlnx-zynqmp.o xlnx-zcu102.o +obj-$(CONFIG_XLNX_VERSAL) += xlnx-versal.o obj-$(CONFIG_FSL_IMX25) += fsl-imx25.o imx25_pdk.o obj-$(CONFIG_FSL_IMX31) += fsl-imx31.o kzm.o obj-$(CONFIG_FSL_IMX6) += fsl-imx6.o sabrelite.o
include/hw/arm/xlnx-versal.h new file +122 -0
122 lines not on this page · raw message
hw/arm/xlnx-versal.c new file +323 -0
323 lines not on this page · raw message
default-configs/aarch64-softmmu.mak +1 -0
@@ -8,4 +8,5 @@ CONFIG_DDC=y CONFIG_DPCD=y CONFIG_XLNX_ZYNQMP=y CONFIG_XLNX_ZYNQMP_ARM=y +CONFIG_XLNX_VERSAL=y CONFIG_ARM_SMMUV3=y
Signature · 1 line
2.19.1
[Qemu-devel] [PULL 3/6] hw/arm: versal: Add a virtual Xilinx Versal board
In reply to Peter MaydellFrom: "Edgar E. Iglesias" <[email protected]>
Add a virtual Xilinx Versal board.
This board is based on the Xilinx Versal SoC. The exact details of what peripherals are attached to this board will remain in control of QEMU. QEMU will generate an FDT on the fly for Linux and other software to auto-discover peripherals.
--- hw/arm/Makefile.objs | 2 +- hw/arm/xlnx-versal-virt.c | 493 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 494 insertions(+), 1 deletion(-) create mode 100644 hw/arm/xlnx-versal-virt.c
hw/arm/Makefile.objs +1 -1
@@ -26,7 +26,7 @@ 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_XLNX_ZYNQMP_ARM) += xlnx-zynqmp.o xlnx-zcu102.o -obj-$(CONFIG_XLNX_VERSAL) += xlnx-versal.o +obj-$(CONFIG_XLNX_VERSAL) += xlnx-versal.o xlnx-versal-virt.o obj-$(CONFIG_FSL_IMX25) += fsl-imx25.o imx25_pdk.o obj-$(CONFIG_FSL_IMX31) += fsl-imx31.o kzm.o obj-$(CONFIG_FSL_IMX6) += fsl-imx6.o sabrelite.o
hw/arm/xlnx-versal-virt.c new file +493 -0
493 lines not on this page · raw message
Signature · 1 line
2.19.1