Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-2…
Browse files Browse the repository at this point in the history
…0210203' into staging

target-arm queue:
 * hw/intc/arm_gic: Allow to use QTest without crashing
 * hw/char/exynos4210_uart: Fix buffer size reporting with FIFO disabled
 * hw/char/exynos4210_uart: Fix missing call to report ready for input
 * hw/arm/smmuv3: Fix addr_mask for range-based invalidation
 * hw/ssi/imx_spi: Fix various minor bugs
 * hw/intc/arm_gic: Fix interrupt ID in GICD_SGIR register
 * hw/arm: Add missing Kconfig dependencies
 * hw/arm: Display CPU type in machine description

# gpg: Signature made Wed 03 Feb 2021 10:16:36 GMT
# gpg:                using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE
# gpg:                issuer "peter.maydell@linaro.org"
# gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [ultimate]
# gpg:                 aka "Peter Maydell <pmaydell@gmail.com>" [ultimate]
# gpg:                 aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [ultimate]
# Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83  15CF 3C25 25ED 1436 0CDE

* remotes/pmaydell/tags/pull-target-arm-20210203: (21 commits)
  hw/arm: Display CPU type in machine description
  hw/net/can: ZynqMP CAN device requires PTIMER
  hw/arm/xlnx-versal: Versal SoC requires ZynqMP peripherals
  hw/arm/xlnx-versal: Versal SoC requires ZDMA
  hw/arm/exynos4210: Add missing dependency on OR_IRQ
  hw/arm/stm32f405_soc: Add missing dependency on OR_IRQ
  hw/intc/arm_gic: Fix interrupt ID in GICD_SGIR register
  hw/ssi: imx_spi: Correct tx and rx fifo endianness
  hw/ssi: imx_spi: Correct the burst length > 32 bit transfer logic
  hw/ssi: imx_spi: Round up the burst length to be multiple of 8
  hw/ssi: imx_spi: Disable chip selects when controller is disabled
  hw/ssi: imx_spi: Rework imx_spi_write() to handle block disabled
  hw/ssi: imx_spi: Rework imx_spi_read() to handle block disabled
  hw/ssi: imx_spi: Rework imx_spi_reset() to keep CONREG register value
  hw/ssi: imx_spi: Remove pointless variable initialization
  hw/ssi: imx_spi: Remove imx_spi_update_irq() in imx_spi_reset()
  hw/ssi: imx_spi: Use a macro for number of chip selects supported
  hw/arm/smmuv3: Fix addr_mask for range-based invalidation
  hw/char/exynos4210_uart: Fix missing call to report ready for input
  hw/char/exynos4210_uart: Fix buffer size reporting with FIFO disabled
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
  • Loading branch information
pm215 committed Feb 3, 2021
2 parents 8360ebe + fd8f71b commit 99ae0cd
Show file tree
Hide file tree
Showing 15 changed files with 130 additions and 69 deletions.
1 change: 1 addition & 0 deletions hw/Kconfig
Expand Up @@ -81,3 +81,4 @@ config XLNX_ZYNQMP
bool
select REGISTER
select CAN_BUS
select PTIMER
5 changes: 5 additions & 0 deletions hw/arm/Kconfig
Expand Up @@ -52,6 +52,7 @@ config EXYNOS4
select PTIMER
select SDHCI
select USB_EHCI_SYSBUS
select OR_IRQ

config HIGHBANK
bool
Expand Down Expand Up @@ -336,6 +337,7 @@ config STM32F205_SOC
config STM32F405_SOC
bool
select ARM_V7M
select OR_IRQ
select STM32F4XX_SYSCFG
select STM32F4XX_EXTI

Expand All @@ -352,6 +354,7 @@ config XLNX_ZYNQMP_ARM
select XILINX_AXI
select XILINX_SPIPS
select XLNX_ZYNQMP
select XLNX_ZDMA

config XLNX_VERSAL
bool
Expand All @@ -360,6 +363,8 @@ config XLNX_VERSAL
select CADENCE
select VIRTIO_MMIO
select UNIMP
select XLNX_ZDMA
select XLNX_ZYNQMP

config NPCM7XX
bool
Expand Down
2 changes: 1 addition & 1 deletion hw/arm/digic_boards.c
Expand Up @@ -142,7 +142,7 @@ static void canon_a1100_init(MachineState *machine)

static void canon_a1100_machine_init(MachineClass *mc)
{
mc->desc = "Canon PowerShot A1100 IS";
mc->desc = "Canon PowerShot A1100 IS (ARM946)";
mc->init = &canon_a1100_init;
mc->ignore_memory_transaction_failures = true;
mc->default_ram_size = 64 * MiB;
Expand Down
2 changes: 1 addition & 1 deletion hw/arm/microbit.c
Expand Up @@ -64,7 +64,7 @@ static void microbit_machine_class_init(ObjectClass *oc, void *data)
{
MachineClass *mc = MACHINE_CLASS(oc);

mc->desc = "BBC micro:bit";
mc->desc = "BBC micro:bit (Cortex-M0)";
mc->init = microbit_init;
mc->max_cpus = 1;
}
Expand Down
2 changes: 1 addition & 1 deletion hw/arm/netduino2.c
Expand Up @@ -54,7 +54,7 @@ static void netduino2_init(MachineState *machine)

static void netduino2_machine_init(MachineClass *mc)
{
mc->desc = "Netduino 2 Machine";
mc->desc = "Netduino 2 Machine (Cortex-M3)";
mc->init = netduino2_init;
mc->ignore_memory_transaction_failures = true;
}
Expand Down
2 changes: 1 addition & 1 deletion hw/arm/netduinoplus2.c
Expand Up @@ -55,7 +55,7 @@ static void netduinoplus2_init(MachineState *machine)

static void netduinoplus2_machine_init(MachineClass *mc)
{
mc->desc = "Netduino Plus 2 Machine";
mc->desc = "Netduino Plus 2 Machine (Cortex-M4)";
mc->init = netduinoplus2_init;
}

Expand Down
2 changes: 1 addition & 1 deletion hw/arm/orangepi.c
Expand Up @@ -113,7 +113,7 @@ static void orangepi_init(MachineState *machine)

static void orangepi_machine_init(MachineClass *mc)
{
mc->desc = "Orange Pi PC";
mc->desc = "Orange Pi PC (Cortex-A7)";
mc->init = orangepi_init;
mc->block_default_type = IF_SD;
mc->units_per_default_bus = 1;
Expand Down
4 changes: 3 additions & 1 deletion hw/arm/smmuv3.c
Expand Up @@ -801,7 +801,7 @@ static void smmuv3_notify_iova(IOMMUMemoryRegion *mr,
{
SMMUDevice *sdev = container_of(mr, SMMUDevice, iommu);
IOMMUTLBEvent event;
uint8_t granule = tg;
uint8_t granule;

if (!tg) {
SMMUEventInfo event = {.inval_ste_allowed = true};
Expand All @@ -821,6 +821,8 @@ static void smmuv3_notify_iova(IOMMUMemoryRegion *mr,
return;
}
granule = tt->granule_sz;
} else {
granule = tg * 2 + 10;
}

event.type = IOMMU_NOTIFIER_UNMAP;
Expand Down
4 changes: 2 additions & 2 deletions hw/arm/stellaris.c
Expand Up @@ -1538,7 +1538,7 @@ static void lm3s811evb_class_init(ObjectClass *oc, void *data)
{
MachineClass *mc = MACHINE_CLASS(oc);

mc->desc = "Stellaris LM3S811EVB";
mc->desc = "Stellaris LM3S811EVB (Cortex-M3)";
mc->init = lm3s811evb_init;
mc->ignore_memory_transaction_failures = true;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-m3");
Expand All @@ -1554,7 +1554,7 @@ static void lm3s6965evb_class_init(ObjectClass *oc, void *data)
{
MachineClass *mc = MACHINE_CLASS(oc);

mc->desc = "Stellaris LM3S6965EVB";
mc->desc = "Stellaris LM3S6965EVB (Cortex-M3)";
mc->init = lm3s6965evb_init;
mc->ignore_memory_transaction_failures = true;
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-m3");
Expand Down
7 changes: 6 additions & 1 deletion hw/char/exynos4210_uart.c
Expand Up @@ -519,6 +519,7 @@ static uint64_t exynos4210_uart_read(void *opaque, hwaddr offset,
s->reg[I_(UTRSTAT)] &= ~UTRSTAT_Rx_BUFFER_DATA_READY;
res = s->reg[I_(URXH)];
}
qemu_chr_fe_accept_input(&s->chr);
exynos4210_uart_update_dmabusy(s);
trace_exynos_uart_read(s->channel, offset,
exynos4210_uart_regname(offset), res);
Expand Down Expand Up @@ -553,7 +554,11 @@ static int exynos4210_uart_can_receive(void *opaque)
{
Exynos4210UartState *s = (Exynos4210UartState *)opaque;

return fifo_empty_elements_number(&s->rx);
if (s->reg[I_(UFCON)] & UFCON_FIFO_ENABLE) {
return fifo_empty_elements_number(&s->rx);
} else {
return !(s->reg[I_(UTRSTAT)] & UTRSTAT_Rx_BUFFER_DATA_READY);
}
}

static void exynos4210_uart_receive(void *opaque, const uint8_t *buf, int size)
Expand Down
3 changes: 3 additions & 0 deletions hw/dma/Kconfig
Expand Up @@ -18,6 +18,9 @@ config ZYNQ_DEVCFG
bool
select REGISTER

config XLNX_ZDMA
bool

config STP2000
bool

Expand Down
2 changes: 1 addition & 1 deletion hw/dma/meson.build
Expand Up @@ -9,7 +9,7 @@ softmmu_ss.add(when: 'CONFIG_ZYNQ_DEVCFG', if_true: files('xlnx-zynq-devcfg.c'))
softmmu_ss.add(when: 'CONFIG_ETRAXFS', if_true: files('etraxfs_dma.c'))
softmmu_ss.add(when: 'CONFIG_STP2000', if_true: files('sparc32_dma.c'))
softmmu_ss.add(when: 'CONFIG_XLNX_ZYNQMP_ARM', if_true: files('xlnx_dpdma.c'))
softmmu_ss.add(when: 'CONFIG_XLNX_ZYNQMP_ARM', if_true: files('xlnx-zdma.c'))
softmmu_ss.add(when: 'CONFIG_XLNX_ZDMA', if_true: files('xlnx-zdma.c'))
softmmu_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_dma.c', 'soc_dma.c'))
softmmu_ss.add(when: 'CONFIG_PXA2XX', if_true: files('pxa2xx_dma.c'))
softmmu_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_dma.c'))
Expand Down
5 changes: 3 additions & 2 deletions hw/intc/arm_gic.c
Expand Up @@ -28,6 +28,7 @@
#include "qemu/module.h"
#include "trace.h"
#include "sysemu/kvm.h"
#include "sysemu/qtest.h"

/* #define DEBUG_GIC */

Expand Down Expand Up @@ -57,7 +58,7 @@ static const uint8_t gic_id_gicv2[] = {

static inline int gic_get_current_cpu(GICState *s)
{
if (s->num_cpu > 1) {
if (!qtest_enabled() && s->num_cpu > 1) {
return current_cpu->cpu_index;
}
return 0;
Expand Down Expand Up @@ -1476,7 +1477,7 @@ static void gic_dist_writel(void *opaque, hwaddr offset,
int target_cpu;

cpu = gic_get_current_cpu(s);
irq = value & 0x3ff;
irq = value & 0xf;
switch ((value >> 24) & 3) {
case 0:
mask = (value >> 16) & ALL_CPU_MASK;
Expand Down

0 comments on commit 99ae0cd

Please sign in to comment.