target-arm queue
Subsystems (5)
The following changes since commit b6d32a06fc0984e537091cba08f2e1ed9f775d74:
Merge tag 'pull-trivial-patches' of https://gitlab.com/mjt0k/qemu into staging (2024-06-30 16:12:24 -0700)
are available in the Git repository at:
https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20240701
for you to fetch changes up to 58c782de557beb496bfb4c5ade721bbbd2480c72:
tests/qtest: Ensure STM32L4x5 EXTI state is correct at the end of QTests (2024-07-01 15:40:54 +0100)
----------------------------------------------------------------
target-arm queue:
* tests/avocado: update firmware for sbsa-ref and use all cores
* hw/arm/smmu-common: Replace smmu_iommu_mr with smmu_find_sdev
* arm: Fix VCMLA Dd, Dn, Dm[idx]
* arm: Fix SQDMULH (by element) with Q=0
* arm: Fix FJCVTZS vs flush-to-zero
* arm: More conversion of A64 AdvSIMD to decodetree
* arm: Enable FEAT_Debugv8p8 for -cpu max
* MAINTAINERS: Update family name for Patrick Leis
* hw/arm/xilinx_zynq: Add boot-mode property
* docs/system/arm: Add a doc for zynq board
* hw/misc: In STM32L4x5 EXTI, correct configurable interrupts
* tests/qtest: fix minor issues in STM32L4x5 tests
----------------------------------------------------------------
Gustavo Romero (3):
target/arm: Fix indentation
target/arm: Move initialization of debug ID registers target/arm: Enable FEAT_Debugv8p8 for -cpu max
Inès Varhol (3):
tests/qtest: Fix STM32L4x5 SYSCFG irq line 15 state assumption hw/misc: In STM32L4x5 EXTI, correct configurable interrupts tests/qtest: Ensure STM32L4x5 EXTI state is correct at the end of QTests
Marcin Juszkiewicz (2):
tests/avocado: update firmware for sbsa-ref tests/avocado: use default amount of cores on sbsa-ref
Nicolin Chen (1):
hw/arm/smmu-common: Replace smmu_iommu_mr with smmu_find_sdev
Patrick Leis (1):
MAINTAINERS: Update my family name
Rayhan Faizel (3):
hw/nvram: Add BCM2835 OTP device
hw/arm: Connect OTP device to BCM2835
hw/misc: Implement mailbox properties for customer OTP and device specific private keys
Richard Henderson (13):
target/arm: Fix VCMLA Dd, Dn, Dm[idx]
target/arm: Fix SQDMULH (by element) with Q=0 target/arm: Fix FJCVTZS vs flush-to-zero target/arm: Convert SQRDMLAH, SQRDMLSH to decodetree target/arm: Convert SDOT, UDOT to decodetree target/arm: Convert SUDOT, USDOT to decodetree target/arm: Convert BFDOT to decodetree
target/arm: Convert BFMLALB, BFMLALT to decodetree target/arm: Convert BFMMLA, SMMLA, UMMLA, USMMLA to decodetree target/arm: Add data argument to do_fp3_vector target/arm: Convert FCADD to decodetree
target/arm: Convert FCMLA to decodetree
target/arm: Delete dead code from disas_simd_indexed
Sai Pavan Boddu (3):
hw/misc/zynq_slcr: Add boot-mode property
hw/arm/xilinx_zynq: Add boot-mode property
docs/system/arm: Add a doc for zynq board
MAINTAINERS | 3 +- docs/system/arm/emulation.rst | 1 + docs/system/arm/xlnx-zynq.rst | 47 ++ docs/system/target-arm.rst | 1 + include/hw/arm/bcm2835_peripherals.h | 3 +- include/hw/arm/raspberrypi-fw-defs.h | 2 + include/hw/arm/smmu-common.h | 4 +- include/hw/misc/bcm2835_property.h | 2 + include/hw/misc/stm32l4x5_exti.h | 2 + include/hw/nvram/bcm2835_otp.h | 68 +++ target/arm/cpu.h | 2 + target/arm/helper.h | 10 + target/arm/tcg/a64.decode | 43 ++ hw/arm/bcm2835_peripherals.c | 15 +- hw/arm/smmu-common.c | 8 +- hw/arm/smmuv3.c | 12 +- hw/arm/xilinx_zynq.c | 31 ++ hw/misc/bcm2835_property.c | 87 ++++ hw/misc/stm32l4x5_exti.c | 28 +- hw/misc/zynq_slcr.c | 22 +- hw/nvram/bcm2835_otp.c | 187 +++++++ target/arm/tcg/cpu32.c | 35 +- target/arm/tcg/cpu64.c | 4 +- target/arm/tcg/translate-a64.c | 808 ++++++++++--------------------- target/arm/tcg/vec_helper.c | 100 +++- target/arm/vfp_helper.c | 18 +- tests/qtest/stm32l4x5_exti-test.c | 8 + tests/qtest/stm32l4x5_syscfg-test.c | 16 +- tests/tcg/aarch64/test-2375.c | 21 + hw/nvram/meson.build | 1 + tests/avocado/machine_aarch64_sbsaref.py | 16 +- tests/tcg/aarch64/Makefile.target | 3 +- 32 files changed, 967 insertions(+), 641 deletions(-) create mode 100644 docs/system/arm/xlnx-zynq.rst create mode 100644 include/hw/nvram/bcm2835_otp.h create mode 100644 hw/nvram/bcm2835_otp.c create mode 100644 tests/tcg/aarch64/test-2375.c
[PULL 02/29] hw/arm: Connect OTP device to BCM2835
From: Rayhan Faizel <[email protected]>
Replace stubbed OTP memory region with the new OTP device.
--- include/hw/arm/bcm2835_peripherals.h | 3 ++- hw/arm/bcm2835_peripherals.c | 13 ++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-)
include/hw/arm/bcm2835_peripherals.h +2 -1
@@ -33,6 +33,7 @@#include "hw/usb/hcd-dwc2.h" #include "hw/ssi/bcm2835_spi.h" #include "hw/i2c/bcm2835_i2c.h" +#include "hw/nvram/bcm2835_otp.h" #include "hw/misc/unimp.h" #include "qom/object.h"
@@ -71,7 +72,7 @@ struct BCMSocPeripheralBaseState {BCM2835SPIState spi[1 ];BCM2835I2CState i2c[3 ];OrIRQState orgated_i2c_irq; -UnimplementedDeviceState otp; +BCM2835OTPState otp;UnimplementedDeviceState dbus;UnimplementedDeviceState ave0;UnimplementedDeviceState v3d;
hw/arm/bcm2835_peripherals.c +12 -1
@@ -116,6 +116,10 @@ static void raspi_peripherals_base_init(Object *obj)object_property_add_const_link (OBJECT (&s->fb),"dma-mr" ,OBJECT (&s->gpu_bus_mr)); +/* OTP */ +object_initialize_child (obj,"bcm2835-otp" , &s->otp, +TYPE_BCM2835_OTP ); +/* Property channel */ object_initialize_child (obj,"property" , &s->property,TYPE_BCM2835_PROPERTY );
@@ -374,6 +378,14 @@ void bcm_soc_peripherals_common_realize(DeviceState *dev, Error **errp)sysbus_connect_irq (SYS_BUS_DEVICE (&s->fb),0 ,qdev_get_gpio_in (DEVICE (&s->mboxes),MBOX_CHAN_FB )); +/* OTP */ +if (!sysbus_realize (SYS_BUS_DEVICE (&s->otp), errp)) { +return ; + } + +memory_region_add_subregion (&s->peri_mr,OTP_OFFSET , +sysbus_mmio_get_region (SYS_BUS_DEVICE (&s->otp),0 )); +/* Property channel */ if (!sysbus_realize (SYS_BUS_DEVICE (&s->property), errp)) {return ;
@@ -500,7 +512,6 @@ void bcm_soc_peripherals_common_realize(DeviceState *dev, Error **errp)create_unimp (s, &s->i2s,"bcm2835-i2s" ,I2S_OFFSET ,0x100 );create_unimp (s, &s->smi,"bcm2835-smi" ,SMI_OFFSET ,0x100 );create_unimp (s, &s->bscsl,"bcm2835-spis" ,BSC_SL_OFFSET ,0x100 ); -create_unimp (s, &s->otp,"bcm2835-otp" ,OTP_OFFSET ,0x80 );create_unimp (s, &s->dbus,"bcm2835-dbus" ,DBUS_OFFSET ,0x8000 );create_unimp (s, &s->ave0,"bcm2835-ave0" ,AVE0_OFFSET ,0x8000 );create_unimp (s, &s->v3d,"bcm2835-v3d" ,V3D_OFFSET ,0x1000 );
Signature · 1 line
2.34.1
[PULL 05/29] tests/avocado: use default amount of cores on sbsa-ref
In reply to Peter MaydellFrom: Marcin Juszkiewicz <[email protected]>
The version of the sbsa-ref EDK2 firmware we used to use in this test had a bug where it might make an unaligned access to the framebuffer, which causes a guest crash on newer versions of QEMU where we enforce the architectural requirement that unaligned accesses to Device memory should take an exception.
We happened to not notice this because our test was booting with "-smp 1" and through luck this didn't write the boot logo to the framebuffer at an unaligned address; but trying to boot the same firmware with two CPUs would result in a guest crash. Now we have updated the firmware we're using for the test, we can make the test use all the cores on the board, so we are testing the SMP boot path.
Message-id: [email protected]
--- tests/avocado/machine_aarch64_sbsaref.py | 2 -- 1 file changed, 2 deletions(-)
tests/avocado/machine_aarch64_sbsaref.py +0 -2
@@ -75,8 +75,6 @@ def fetch_firmware(self): f"if=pflash,file={fs0_path},format=raw", "-drive", f"if=pflash,file={fs1_path},format=raw", - "-smp", - "1", "-machine", "sbsa-ref", )
Signature · 1 line
2.34.1
[PULL 21/29] target/arm: Move initialization of debug ID registers
In reply to Peter MaydellFrom: Gustavo Romero <[email protected]>
Move the initialization of the debug ID registers to aa32_max_features, which is used to set the 32-bit ID registers. This ensures that the debug ID registers are consistently set for the max CPU in a single place.
Message-id: [email protected]
--- target/arm/cpu.h | 2 ++ target/arm/tcg/cpu32.c | 31 ++++++++++++++++++++++++++++--- 2 files changed, 30 insertions(+), 3 deletions(-)
target/arm/cpu.h +2 -0
@@ -2299,6 +2299,8 @@ FIELD(DBGDEVID, DOUBLELOCK, 20, 4) FIELD(DBGDEVID, AUXREGS, 24, 4) FIELD(DBGDEVID, CIDMASK, 28, 4) +FIELD(DBGDEVID1, PCSROFFSET, 0, 4) + FIELD(MVFR0, SIMDREG, 0, 4) FIELD(MVFR0, FPSP, 4, 4)FIELD (MVFR0 ,FPDP ,8 ,4 )
target/arm/tcg/cpu32.c +28 -3
@@ -87,6 +87,34 @@ void aa32_max_features(ARMCPU *cpu) t =FIELD_DP32 (t,ID_DFR0 ,PERFMON ,6 );/* FEAT_PMUv3p5 */ cpu->isar.id_dfr0 = t; +/* Debug ID registers. */ + +/* Bit[15] is RES1, Bit[13] and Bits[11:0] are RES0. */ + t =0x00008000 ; + t =FIELD_DP32 (t,DBGDIDR ,SE_IMP ,1 ); + t =FIELD_DP32 (t,DBGDIDR ,NSUHD_IMP ,1 ); + t =FIELD_DP32 (t,DBGDIDR ,VERSION ,6 );/* Armv8 debug */ + t =FIELD_DP32 (t,DBGDIDR ,CTX_CMPS ,1 ); + t =FIELD_DP32 (t,DBGDIDR ,BRPS ,5 ); + t =FIELD_DP32 (t,DBGDIDR ,WRPS ,3 ); + cpu->isar.dbgdidr = t; + + t =0 ; + t =FIELD_DP32 (t,DBGDEVID ,PCSAMPLE ,3 ); + t =FIELD_DP32 (t,DBGDEVID ,WPADDRMASK ,1 ); + t =FIELD_DP32 (t,DBGDEVID ,BPADDRMASK ,15 ); + t =FIELD_DP32 (t,DBGDEVID ,VECTORCATCH ,0 ); + t =FIELD_DP32 (t,DBGDEVID ,VIRTEXTNS ,1 ); + t =FIELD_DP32 (t,DBGDEVID ,DOUBLELOCK ,1 ); + t =FIELD_DP32 (t,DBGDEVID ,AUXREGS ,0 ); + t =FIELD_DP32 (t,DBGDEVID ,CIDMASK ,0 ); + cpu->isar.dbgdevid = t; + +/* Bits[31:4] are RES0. */ + t =0 ; + t =FIELD_DP32 (t,DBGDEVID1 ,PCSROFFSET ,2 ); + cpu->isar.dbgdevid1 = t; + t = cpu->isar.id_dfr1; t =FIELD_DP32 (t,ID_DFR1 ,HPMN0 ,1 );/* FEAT_HPMN0 */ cpu->isar.id_dfr1 = t;
@@ -955,9 +983,6 @@ static void arm_max_initfn(Object *obj) cpu->isar.id_isar4 =0x00011142 ; cpu->isar.id_isar5 =0x00011121 ; cpu->isar.id_isar6 =0 ; - cpu->isar.dbgdidr =0x3516d000 ; - cpu->isar.dbgdevid =0x00110f13 ; - cpu->isar.dbgdevid1 =0x2 ; cpu->isar.reset_pmcr_el0 =0x41013000 ; cpu->clidr =0x0a200023 ; cpu->ccsidr[0 ] =0x701fe00a ;/* 32KB L1 dcache */
Signature · 1 line
2.34.1
[PULL 01/29] hw/nvram: Add BCM2835 OTP device
In reply to Peter MaydellFrom: Rayhan Faizel <[email protected]>
The OTP device registers are currently stubbed. For now, the device houses the OTP rows which will be accessed directly by other peripherals.
--- include/hw/nvram/bcm2835_otp.h | 68 ++++++++++++ hw/nvram/bcm2835_otp.c | 187 +++++++++++++++++++++++++++++++++ hw/nvram/meson.build | 1 + 3 files changed, 256 insertions(+) create mode 100644 include/hw/nvram/bcm2835_otp.h create mode 100644 hw/nvram/bcm2835_otp.c
include/hw/nvram/bcm2835_otp.h new file +68 -0
@@ -0,0 +1,68 @@ +/* +* BCM2835 One-Time Programmable (OTP) Memory +* +* Copyright (c) 2024 Rayhan Faizel <[email protected]> +* +* SPDX-License-Identifier: MIT +*/ + +#ifndef BCM2835_OTP_H +#define BCM2835_OTP_H + +#include "hw/sysbus.h" +#include "qom/object.h" + +#define TYPE_BCM2835_OTP "bcm2835-otp" +OBJECT_DECLARE_SIMPLE_TYPE(BCM2835OTPState, BCM2835_OTP) + +#define BCM2835_OTP_ROW_COUNT 66 + +/* https://elinux.org/BCM2835_registers#OTP */ +#define BCM2835_OTP_BOOTMODE_REG 0x00 +#define BCM2835_OTP_CONFIG_REG 0x04 +#define BCM2835_OTP_CTRL_LO_REG 0x08 +#define BCM2835_OTP_CTRL_HI_REG 0x0c +#define BCM2835_OTP_STATUS_REG 0x10 +#define BCM2835_OTP_BITSEL_REG 0x14 +#define BCM2835_OTP_DATA_REG 0x18 +#define BCM2835_OTP_ADDR_REG 0x1c +#define BCM2835_OTP_WRITE_DATA_READ_REG 0x20 +#define BCM2835_OTP_INIT_STATUS_REG 0x24 + + +/* -- Row 32: Undocumented -- */ + +#define BCM2835_OTP_ROW_32 32 + +/* Lock OTP Programming (Customer OTP and private key) */ +#define BCM2835_OTP_ROW_32_LOCK BIT(6) + +/* -- Row 36-43: Customer OTP -- */ + +#define BCM2835_OTP_CUSTOMER_OTP 36 +#define BCM2835_OTP_CUSTOMER_OTP_LEN 8 + +/* Magic numbers to lock programming of customer OTP and private key */ +#define BCM2835_OTP_LOCK_NUM1 0xffffffff +#define BCM2835_OTP_LOCK_NUM2 0xaffe0000 + +/* -- Row 56-63: Device-specific private key -- */ + +#define BCM2835_OTP_PRIVATE_KEY 56 +#define BCM2835_OTP_PRIVATE_KEY_LEN 8 + + +struct BCM2835OTPState { +/* <private> */ +SysBusDevice parent_obj; + +/* <public> */ +MemoryRegion iomem; +uint32_t otp_rows[BCM2835_OTP_ROW_COUNT ]; +}; + + +uint32_t bcm2835_otp_get_row (BCM2835OTPState *s,unsigned int row); +void bcm2835_otp_set_row (BCM2835OTPState *s,unsigned int row,uint32_t value); + +#endif
hw/nvram/bcm2835_otp.c new file +187 -0
187 lines not on this page · raw message
hw/nvram/meson.build +1 -0
@@ -1,5 +1,6 @@ system_ss.add(files('fw_cfg-interface.c')) system_ss.add(files('fw_cfg.c')) +system_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_otp.c')) system_ss.add(when: 'CONFIG_CHRP_NVRAM', if_true: files('chrp_nvram.c')) system_ss.add(when: 'CONFIG_DS1225Y', if_true: files('ds1225y.c')) system_ss.add(when: 'CONFIG_NMC93XX_EEPROM', if_true: files('eeprom93xx.c'))
Signature · 1 line
2.34.1
[PULL 25/29] hw/arm/xilinx_zynq: Add boot-mode property
In reply to Peter MaydellFrom: Sai Pavan Boddu <[email protected]>
Read boot-mode value as machine property and propagate that to SLCR.BOOT_MODE register.
Message-id: [email protected]
--- hw/arm/xilinx_zynq.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+)
hw/arm/xilinx_zynq.c +31 -0
@@ -38,6 +38,7 @@#include "qom/object.h" #include "exec/tswap.h" #include "target/arm/cpu-qom.h" +#include "qapi/visitor.h" #define TYPE_ZYNQ_MACHINE MACHINE_TYPE_NAME("xilinx-zynq-a9")OBJECT_DECLARE_SIMPLE_TYPE (ZynqMachineState,ZYNQ_MACHINE )
@@ -90,6 +91,7 @@ struct ZynqMachineState {MachineState parent;Clock *ps_clk;ARMCPU *cpu[ZYNQ_MAX_CPUS ]; +uint8_t boot_mode; }; static void zynq_write_board_setup(ARMCPU *cpu,
@@ -176,6 +178,27 @@ static inline int zynq_init_spi_flashes(uint32_t base_addr, qemu_irq irq,return unit; } +static void zynq_set_boot_mode (Object *obj,const char *str, +Error **errp) +{ +ZynqMachineState *m =ZYNQ_MACHINE (obj); +uint8_t mode =0 ; + +if (!strncasecmp (str,"qspi" ,4 )) { + mode =1 ; + }else if (!strncasecmp (str,"sd" ,2 )) { + mode =5 ; + }else if (!strncasecmp (str,"nor" ,3 )) { + mode =2 ; + }else if (!strncasecmp (str,"jtag" ,4 )) { + mode =0 ; + }else { +error_setg (errp,"%s boot mode not supported" , str); +return ; + } + m->boot_mode = mode; +} +static void zynq_init (MachineState *machine) {ZynqMachineState *zynq_machine =ZYNQ_MACHINE (machine);
@@ -241,6 +264,7 @@ static void zynq_init(MachineState *machine)/* Create slcr, keep a pointer to connect clocks */ slcr =qdev_new ("xilinx-zynq_slcr" );qdev_connect_clock_in (slcr,"ps_clk" , zynq_machine->ps_clk); +qdev_prop_set_uint8 (slcr,"boot-mode" , zynq_machine->boot_mode);sysbus_realize_and_unref (SYS_BUS_DEVICE (slcr), &error_fatal);sysbus_mmio_map (SYS_BUS_DEVICE (slcr),0 ,0xF8000000 );
@@ -373,6 +397,7 @@ static void zynq_machine_class_init(ObjectClass *oc, void *data) NULL };MachineClass *mc =MACHINE_CLASS (oc); +ObjectProperty *prop; mc->desc ="Xilinx Zynq Platform Baseboard for Cortex-A9" ; mc->init = zynq_init; mc->max_cpus =ZYNQ_MAX_CPUS ;
@@ -380,6 +405,12 @@ static void zynq_machine_class_init(ObjectClass *oc, void *data) mc->ignore_memory_transaction_failures = true; mc->valid_cpu_types = valid_cpu_types; mc->default_ram_id ="zynq.ext_ram" ; + prop =object_class_property_add_str (oc,"boot-mode" ,NULL , + zynq_set_boot_mode); +object_class_property_set_description (oc,"boot-mode" , +"Supported boot modes:" +" jtag qspi sd nor" ); +object_property_set_default_str (prop,"qspi" ); }static const TypeInfo zynq_machine_type = {
Signature · 1 line
2.34.1
[PULL 26/29] docs/system/arm: Add a doc for zynq board
In reply to Peter MaydellFrom: Sai Pavan Boddu <[email protected]>
Added the supported device list and an example command.
Message-id: [email protected]
--- MAINTAINERS | 1 + docs/system/arm/xlnx-zynq.rst | 47 +++++++++++++++++++++++++++++++++++ docs/system/target-arm.rst | 1 + 3 files changed, 49 insertions(+) create mode 100644 docs/system/arm/xlnx-zynq.rst
MAINTAINERS +1 -0
@@ -1033,6 +1033,7 @@ F: hw/adc/zynq-xadc.c F: include/hw/misc/zynq_slcr.h F: include/hw/adc/zynq-xadc.h X: hw/ssi/xilinx_* +F: docs/system/arm/xlnx-zynq.rst Xilinx ZynqMP and Versal M: Alistair Francis <[email protected]>
docs/system/arm/xlnx-zynq.rst new file +47 -0
47 lines not on this page · raw message
docs/system/target-arm.rst +1 -0
@@ -109,6 +109,7 @@ undocumented; you can get a complete list by running arm/virt arm/xenpvh arm/xlnx-versal-virt + arm/xlnx-zynq Emulated CPU architecture support =================================
Signature · 1 line
2.34.1
[PULL 11/29] target/arm: Convert SDOT, UDOT to decodetree
In reply to Peter MaydellFrom: Richard Henderson <[email protected]>
Message-id: [email protected]
--- target/arm/tcg/a64.decode | 7 +++++ target/arm/tcg/translate-a64.c | 54 ++++++++++++++++++---------------- 2 files changed, 35 insertions(+), 26 deletions(-)
target/arm/tcg/a64.decode +7 -0
@@ -61,6 +61,7 @@ @qrrr_b . q:1 ...... ... rm:5 ...... rn:5 rd:5 &qrrr_e esz=0 @qrrr_h . q:1 ...... ... rm:5 ...... rn:5 rd:5 &qrrr_e esz=1 +@qrrr_s . q:1 ...... ... rm:5 ...... rn:5 rd:5 &qrrr_e esz=2 @qrrr_sd . q:1 ...... ... rm:5 ...... rn:5 rd:5 &qrrr_e esz=%esz_sd @qrrr_e . q:1 ...... esz:2 . rm:5 ...... rn:5 rd:5 &qrrr_e @qr2r_e . q:1 ...... esz:2 . ..... ...... rm:5 rd:5 &qrrr_e rn=%rd
@@ -946,6 +947,9 @@ SQRDMULH_v 0.10 1110 ..1 ..... 10110 1 ..... ..... @qrrr_e SQRDMLAH_v 0.10 1110 ..0 ..... 10000 1 ..... ..... @qrrr_e SQRDMLSH_v 0.10 1110 ..0 ..... 10001 1 ..... ..... @qrrr_e +SDOT_v 0.00 1110 100 ..... 10010 1 ..... ..... @qrrr_s +UDOT_v 0.10 1110 100 ..... 10010 1 ..... ..... @qrrr_s + ### Advanced SIMD scalar x indexed element FMUL_si 0101 1111 00 .. .... 1001 . 0 ..... ..... @rrx_h
@@ -1020,6 +1024,9 @@ SQRDMLAH_vi 0.10 1111 10 .. .... 1101 . 0 ..... ..... @qrrx_s SQRDMLSH_vi 0.10 1111 01 .. .... 1111 . 0 ..... ..... @qrrx_h SQRDMLSH_vi 0.10 1111 10 .. .... 1111 . 0 ..... ..... @qrrx_s +SDOT_vi 0.00 1111 10 .. .... 1110 . 0 ..... ..... @qrrx_s +UDOT_vi 0.10 1111 10 .. .... 1110 . 0 ..... ..... @qrrx_s + # Floating-point conditional select FCSEL 0001 1110 .. 1 rm:5 cond:4 11 rn:5 rd:5 esz=%esz_hsd
target/arm/tcg/translate-a64.c +28 -26
110 lines not on this page · raw message
Signature · 1 line
2.34.1
[PULL 09/29] target/arm: Fix FJCVTZS vs flush-to-zero
In reply to Peter MaydellFrom: Richard Henderson <[email protected]>
Input denormals cause the Javascript inexact bit
(output to Z) to be set.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2375
Message-id: [email protected]
--- target/arm/vfp_helper.c | 18 +++++++++--------- tests/tcg/aarch64/test-2375.c | 21 +++++++++++++++++++++ tests/tcg/aarch64/Makefile.target | 3 ++- 3 files changed, 32 insertions(+), 10 deletions(-) create mode 100644 tests/tcg/aarch64/test-2375.c
target/arm/vfp_helper.c +9 -9
@@ -1091,8 +1091,8 @@ const FloatRoundMode arm_rmode_to_sf_map[] = {uint64_t HELPER (fjcvtzs )(float64 value,void *vstatus) {float_status *status = vstatus; -uint32_t inexact, frac; -uint32_t e_old, e_new; +uint32_t frac, e_old, e_new; +bool inexact; e_old =get_float_exception_flags (status);set_float_exception_flags (0 , status);
@@ -1100,13 +1100,13 @@ uint64_t HELPER(fjcvtzs)(float64 value, void *vstatus) e_new =get_float_exception_flags (status);set_float_exception_flags (e_old | e_new, status); -if (value ==float64_chs (float64_zero)) { -/* While not inexact for IEEE FP, -0.0 is inexact for JavaScript. */ - inexact =1 ; - }else { -/* Normal inexact or overflow or NaN */ - inexact = e_new & (float_flag_inexact | float_flag_invalid); - } +/* Normal inexact, denormal with flush-to-zero, or overflow or NaN */ + inexact = e_new & (float_flag_inexact | + float_flag_input_denormal | + float_flag_invalid); + +/* While not inexact for IEEE FP, -0.0 is inexact for JavaScript. */ + inexact |= value ==float64_chs (float64_zero);/* Pack the result and the env->ZF representation of Z together. */ return deposit64 (frac,32 ,32 , inexact);
tests/tcg/aarch64/test-2375.c new file +21 -0
@@ -0,0 +1,21 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* Copyright (c) 2024 Linaro Ltd */ +/* See https://gitlab.com/qemu-project/qemu/-/issues/2375 */ + +#include <assert.h> + +int main (void ) +{ +int r, z; + + asm("msr fpcr, %2\n\t" +"fjcvtzs %w0, %d3\n\t" +"cset %1, eq" + :"=r" (r),"=r" (z) + :"r" (0x01000000L ),/* FZ = 1 */ +"w" (0xfcff00L ));/* denormal */ + +assert (r ==0 ); +assert (z ==0 ); +return 0 ; +}
tests/tcg/aarch64/Makefile.target +2 -1
@@ -41,8 +41,9 @@ endif # Pauth Tests ifneq ($(CROSS_CC_HAS_ARMV8_3),) -AARCH64_TESTS += pauth-1 pauth-2 pauth-4 pauth-5 +AARCH64_TESTS += pauth-1 pauth-2 pauth-4 pauth-5 test-2375 pauth-%: CFLAGS += -march=armv8.3-a +test-2375: CFLAGS += -march=armv8.3-a run-pauth-1: QEMU_OPTS += -cpu max run-pauth-2: QEMU_OPTS += -cpu max # Choose a cpu with FEAT_Pauth but without FEAT_FPAC for pauth-[45].
Signature · 1 line
2.34.1
[PULL 06/29] hw/arm/smmu-common: Replace smmu_iommu_mr with smmu_find_sdev
In reply to Peter MaydellFrom: Nicolin Chen <[email protected]>
The caller of smmu_iommu_mr wants to get sdev for smmuv3_flush_config().
Do it directly instead of bridging with an iommu mr pointer.
Message-id: [email protected]
--- include/hw/arm/smmu-common.h | 4 ++-- hw/arm/smmu-common.c | 8 ++------ hw/arm/smmuv3.c | 12 ++++-------- 3 files changed, 8 insertions(+), 16 deletions(-)
include/hw/arm/smmu-common.h +2 -2
@@ -182,8 +182,8 @@ int smmu_ptw(SMMUTransCfg *cfg, dma_addr_t iova, IOMMUAccessFlags perm,*/ SMMUTransTableInfo *select_tt (SMMUTransCfg *cfg,dma_addr_t iova); -/* Return the iommu mr associated to @sid, or NULL if none */ -IOMMUMemoryRegion *smmu_iommu_mr (SMMUState *s,uint32_t sid); +/* Return the SMMUDevice associated to @sid, or NULL if none */ +SMMUDevice *smmu_find_sdev (SMMUState *s,uint32_t sid);#define SMMU_IOTLB_MAX_SIZE 256
hw/arm/smmu-common.c +2 -6
@@ -620,20 +620,16 @@ static const PCIIOMMUOps smmu_ops = { .get_address_space = smmu_find_add_as, }; -IOMMUMemoryRegion *smmu_iommu_mr (SMMUState *s,uint32_t sid) +SMMUDevice *smmu_find_sdev (SMMUState *s,uint32_t sid) {uint8_t bus_n, devfn;SMMUPciBus *smmu_bus; -SMMUDevice *smmu; bus_n =PCI_BUS_NUM (sid); smmu_bus =smmu_find_smmu_pcibus (s, bus_n);if (smmu_bus) { devfn =SMMU_PCI_DEVFN (sid); - smmu = smmu_bus->pbdev[devfn]; -if (smmu) { -return &smmu->iommu; - } +return smmu_bus->pbdev[devfn]; }return NULL ; }
hw/arm/smmuv3.c +4 -8
@@ -1218,20 +1218,18 @@ static int smmuv3_cmdq_consume(SMMUv3State *s)case SMMU_CMD_CFGI_STE : {uint32_t sid =CMD_SID (&cmd); -IOMMUMemoryRegion *mr =smmu_iommu_mr (bs, sid); -SMMUDevice *sdev; +SMMUDevice *sdev =smmu_find_sdev (bs, sid);if (CMD_SSEC (&cmd)) { cmd_error =SMMU_CERROR_ILL ;break ; } -if (!mr) { +if (!sdev) {break ; }trace_smmuv3_cmdq_cfgi_ste (sid); - sdev =container_of (mr, SMMUDevice, iommu);smmuv3_flush_config (sdev);break ;
@@ -1260,20 +1258,18 @@ static int smmuv3_cmdq_consume(SMMUv3State *s)case SMMU_CMD_CFGI_CD_ALL : {uint32_t sid =CMD_SID (&cmd); -IOMMUMemoryRegion *mr =smmu_iommu_mr (bs, sid); -SMMUDevice *sdev; +SMMUDevice *sdev =smmu_find_sdev (bs, sid);if (CMD_SSEC (&cmd)) { cmd_error =SMMU_CERROR_ILL ;break ; } -if (!mr) { +if (!sdev) {break ; }trace_smmuv3_cmdq_cfgi_cd (sid); - sdev =container_of (mr, SMMUDevice, iommu);smmuv3_flush_config (sdev);break ; }
Signature · 1 line
2.34.1
[PULL 12/29] target/arm: Convert SUDOT, USDOT to decodetree
In reply to Peter MaydellFrom: Richard Henderson <[email protected]>
Message-id: [email protected]
--- target/arm/tcg/a64.decode | 3 +++ target/arm/tcg/translate-a64.c | 35 ++++++++-------------------------- 2 files changed, 11 insertions(+), 27 deletions(-)
target/arm/tcg/a64.decode +3 -0
@@ -949,6 +949,7 @@ SQRDMLSH_v 0.10 1110 ..0 ..... 10001 1 ..... ..... @qrrr_e SDOT_v 0.00 1110 100 ..... 10010 1 ..... ..... @qrrr_s UDOT_v 0.10 1110 100 ..... 10010 1 ..... ..... @qrrr_s +USDOT_v 0.00 1110 100 ..... 10011 1 ..... ..... @qrrr_s ### Advanced SIMD scalar x indexed element
@@ -1026,6 +1027,8 @@ SQRDMLSH_vi 0.10 1111 10 .. .... 1111 . 0 ..... ..... @qrrx_s SDOT_vi 0.00 1111 10 .. .... 1110 . 0 ..... ..... @qrrx_s UDOT_vi 0.10 1111 10 .. .... 1110 . 0 ..... ..... @qrrx_s +SUDOT_vi 0.00 1111 00 .. .... 1111 . 0 ..... ..... @qrrx_s +USDOT_vi 0.00 1111 10 .. .... 1111 . 0 ..... ..... @qrrx_s # Floating-point conditional select
target/arm/tcg/translate-a64.c +8 -27
@@ -5603,6 +5603,7 @@ static bool do_dot_vector(DisasContext *s, arg_qrrr_e *a, TRANS_FEAT(SDOT_v, aa64_dp, do_dot_vector, a, gen_helper_gvec_sdot_b) TRANS_FEAT(UDOT_v, aa64_dp, do_dot_vector, a, gen_helper_gvec_udot_b) +TRANS_FEAT (USDOT_v, aa64_i8mm, do_dot_vector, a, gen_helper_gvec_usdot_b)/* * Advanced SIMD scalar/vector x indexed element
@@ -5937,6 +5938,10 @@ static bool do_dot_vector_idx(DisasContext *s, arg_qrrx_e *a, TRANS_FEAT(SDOT_vi, aa64_dp, do_dot_vector_idx, a, gen_helper_gvec_sdot_idx_b) TRANS_FEAT(UDOT_vi, aa64_dp, do_dot_vector_idx, a, gen_helper_gvec_udot_idx_b) +TRANS_FEAT (SUDOT_vi, aa64_i8mm, do_dot_vector_idx, a, + gen_helper_gvec_sudot_idx_b) +TRANS_FEAT (USDOT_vi, aa64_i8mm, do_dot_vector_idx, a, + gen_helper_gvec_usdot_idx_b)/* * Advanced SIMD scalar pairwise
@@ -10914,13 +10919,6 @@ static void disas_simd_three_reg_same_extra(DisasContext *s, uint32_t insn)int rot;switch (u *16 + opcode) { -case 0x03 :/* USDOT */ -if (size !=MO_32 ) { -unallocated_encoding (s); -return ; - } - feature =dc_isar_feature (aa64_i8mm, s); -break ;case 0x04 :/* SMMLA */ case 0x14 :/* UMMLA */ case 0x05 :/* USMMLA */
@@ -10964,6 +10962,7 @@ static void disas_simd_three_reg_same_extra(DisasContext *s, uint32_t insn)break ;default :case 0x02 :/* SDOT (vector) */ +case 0x03 :/* USDOT */ case 0x10 :/* SQRDMLAH (vector) */ case 0x11 :/* SQRDMLSH (vector) */ case 0x12 :/* UDOT (vector) */
@@ -10979,10 +10978,6 @@ static void disas_simd_three_reg_same_extra(DisasContext *s, uint32_t insn) }switch (opcode) { -case 0x3 :/* USDOT */ -gen_gvec_op4_ool (s, is_q, rd, rn, rm, rd,0 , gen_helper_gvec_usdot_b); -return ; -case 0x04 :/* SMMLA, UMMLA */ gen_gvec_op4_ool(s, 1, rd, rn, rm, rd, 0, u ? gen_helper_gvec_ummla_b
@@ -12058,14 +12053,6 @@ static void disas_simd_indexed(DisasContext *s, uint32_t insn)break ;case 0x0f :switch (size) { -case 0 :/* SUDOT */ -case 2 :/* USDOT */ -if (is_scalar || !dc_isar_feature (aa64_i8mm, s)) { -unallocated_encoding (s); -return ; - } - size =MO_32 ; -break ;case 1 :/* BFDOT */ if (is_scalar || !dc_isar_feature (aa64_bf16, s)) {unallocated_encoding (s);
@@ -12082,6 +12069,8 @@ static void disas_simd_indexed(DisasContext *s, uint32_t insn) size =MO_16 ;break ;default : +case 0 :/* SUDOT */ +case 2 :/* USDOT */ unallocated_encoding (s);return ; }
@@ -12190,18 +12179,10 @@ static void disas_simd_indexed(DisasContext *s, uint32_t insn)switch (16 * u + opcode) {case 0x0f :switch (extract32 (insn,22 ,2 )) { -case 0 :/* SUDOT */ -gen_gvec_op4_ool (s, is_q, rd, rn, rm, rd, index, - gen_helper_gvec_sudot_idx_b); -return ;case 1 :/* BFDOT */ gen_gvec_op4_ool (s, is_q, rd, rn, rm, rd, index, gen_helper_gvec_bfdot_idx);return ; -case 2 :/* USDOT */ -gen_gvec_op4_ool (s, is_q, rd, rn, rm, rd, index, - gen_helper_gvec_usdot_idx_b); -return ;case 3 :/* BFMLAL{B,T} */ gen_gvec_op4_fpst (s,1 , rd, rn, rm, rd,0 , (index <<1 ) | is_q, gen_helper_gvec_bfmlal_idx);
Signature · 1 line
2.34.1
[PULL 22/29] target/arm: Enable FEAT_Debugv8p8 for -cpu max
In reply to Peter MaydellFrom: Gustavo Romero <[email protected]>
Enable FEAT_Debugv8p8 for max CPU. This feature is out of scope for QEMU since it concerns the external debug interface for JTAG, but is mandatory in Armv8.8 implementations, hence it is reported as supported in the ID registers.
Message-id: [email protected]
--- docs/system/arm/emulation.rst | 1 + target/arm/tcg/cpu32.c | 6 +++--- target/arm/tcg/cpu64.c | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-)
docs/system/arm/emulation.rst +1 -0
@@ -41,6 +41,7 @@ the following architecture extensions: - FEAT_Debugv8p1 (Debug with VHE) - FEAT_Debugv8p2 (Debug changes for v8.2) - FEAT_Debugv8p4 (Debug changes for v8.4) +- FEAT_Debugv8p8 (Debug changes for v8.8) - FEAT_DotProd (Advanced SIMD dot product instructions) - FEAT_DoubleFault (Double Fault Extension) - FEAT_E0PD (Preventing EL0 access to halves of address maps)
target/arm/tcg/cpu32.c +3 -3
@@ -82,8 +82,8 @@ void aa32_max_features(ARMCPU *cpu) cpu->isar.id_pfr2 = t; t = cpu->isar.id_dfr0; - t =FIELD_DP32 (t,ID_DFR0 ,COPDBG ,9 );/* FEAT_Debugv8p4 */ - t =FIELD_DP32 (t,ID_DFR0 ,COPSDBG ,9 );/* FEAT_Debugv8p4 */ + t =FIELD_DP32 (t,ID_DFR0 ,COPDBG ,10 );/* FEAT_Debugv8p8 */ + t =FIELD_DP32 (t,ID_DFR0 ,COPSDBG ,10 );/* FEAT_Debugv8p8 */ t =FIELD_DP32 (t,ID_DFR0 ,PERFMON ,6 );/* FEAT_PMUv3p5 */ cpu->isar.id_dfr0 = t;
@@ -93,7 +93,7 @@ void aa32_max_features(ARMCPU *cpu) t =0x00008000 ; t =FIELD_DP32 (t,DBGDIDR ,SE_IMP ,1 ); t =FIELD_DP32 (t,DBGDIDR ,NSUHD_IMP ,1 ); - t =FIELD_DP32 (t,DBGDIDR ,VERSION ,6 );/* Armv8 debug */ + t =FIELD_DP32 (t,DBGDIDR ,VERSION ,10 );/* FEAT_Debugv8p8 */ t =FIELD_DP32 (t,DBGDIDR ,CTX_CMPS ,1 ); t =FIELD_DP32 (t,DBGDIDR ,BRPS ,5 ); t =FIELD_DP32 (t,DBGDIDR ,WRPS ,3 );
target/arm/tcg/cpu64.c +1 -1
@@ -1253,7 +1253,7 @@ void aarch64_max_tcg_initfn(Object *obj) cpu->isar.id_aa64zfr0 = t; t = cpu->isar.id_aa64dfr0; - t =FIELD_DP64 (t,ID_AA64DFR0 ,DEBUGVER ,9 );/* FEAT_Debugv8p4 */ + t =FIELD_DP64 (t,ID_AA64DFR0 ,DEBUGVER ,10 );/* FEAT_Debugv8p8 */ t =FIELD_DP64 (t,ID_AA64DFR0 ,PMUVER ,6 );/* FEAT_PMUv3p5 */ t =FIELD_DP64 (t,ID_AA64DFR0 ,HPMN0 ,1 );/* FEAT_HPMN0 */ cpu->isar.id_aa64dfr0 = t;
Signature · 1 line
2.34.1
[PULL 20/29] target/arm: Fix indentation
In reply to Peter MaydellFrom: Gustavo Romero <[email protected]>
Fix comment indentation adding a missing space.
Message-id: [email protected]
--- target/arm/tcg/cpu64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
target/arm/tcg/cpu64.c +1 -1
@@ -1167,7 +1167,7 @@ void aarch64_max_tcg_initfn(Object *obj) t = cpu->isar.id_aa64isar2; t =FIELD_DP64 (t,ID_AA64ISAR2 ,MOPS ,1 );/* FEAT_MOPS */ - t =FIELD_DP64 (t,ID_AA64ISAR2 ,BC ,1 );/* FEAT_HBC */ + t =FIELD_DP64 (t,ID_AA64ISAR2 ,BC ,1 );/* FEAT_HBC */ t =FIELD_DP64 (t,ID_AA64ISAR2 ,WFXT ,2 );/* FEAT_WFxT */ cpu->isar.id_aa64isar2 = t;
Signature · 1 line
2.34.1
[PULL 03/29] hw/misc: Implement mailbox properties for customer OTP and device specific private keys
In reply to Peter MaydellFrom: Rayhan Faizel <[email protected]>
Four mailbox properties are implemented as follows:
1. Customer OTP: GET_CUSTOMER_OTP and SET_CUSTOMER_OTP
2. Device-specific private key: GET_PRIVATE_KEY and SET_PRIVATE_KEY.
The customer OTP is located in the rows 36-43. The device-specific private key is located in the rows 56-63.
The customer OTP can be locked with the magic numbers 0xffffffff 0xaffe0000 when running the SET_CUSTOMER_OTP mailbox command. Bit 6 of row 32 indicates this lock, which is undocumented. The lock also applies to the device-specific private key.
--- include/hw/arm/raspberrypi-fw-defs.h | 2 + include/hw/misc/bcm2835_property.h | 2 + hw/arm/bcm2835_peripherals.c | 2 + hw/misc/bcm2835_property.c | 87 ++++++++++++++++++++++++++++ 4 files changed, 93 insertions(+)
include/hw/arm/raspberrypi-fw-defs.h +2 -0
@@ -56,6 +56,7 @@ enum rpi_firmware_property_tag {RPI_FWREQ_GET_THROTTLED =0x00030046 ,RPI_FWREQ_GET_CLOCK_MEASURED =0x00030047 ,RPI_FWREQ_NOTIFY_REBOOT =0x00030048 , +RPI_FWREQ_GET_PRIVATE_KEY =0x00030081 ,RPI_FWREQ_SET_CLOCK_STATE =0x00038001 ,RPI_FWREQ_SET_CLOCK_RATE =0x00038002 , RPI_FWREQ_SET_VOLTAGE = 0x00038003,
@@ -73,6 +74,7 @@ enum rpi_firmware_property_tag {RPI_FWREQ_SET_PERIPH_REG =0x00038045 ,RPI_FWREQ_GET_POE_HAT_VAL =0x00030049 ,RPI_FWREQ_SET_POE_HAT_VAL =0x00038049 , +RPI_FWREQ_SET_PRIVATE_KEY =0x00038081 ,RPI_FWREQ_SET_POE_HAT_VAL_OLD =0x00030050 ,RPI_FWREQ_NOTIFY_XHCI_RESET =0x00030058 , RPI_FWREQ_GET_REBOOT_FLAGS = 0x00030064,
include/hw/misc/bcm2835_property.h +2 -0
@@ -11,6 +11,7 @@#include "hw/sysbus.h" #include "net/net.h" #include "hw/display/bcm2835_fb.h" +#include "hw/nvram/bcm2835_otp.h" #include "qom/object.h" #define TYPE_BCM2835_PROPERTY "bcm2835-property"
@@ -26,6 +27,7 @@ struct BCM2835PropertyState {MemoryRegion iomem;qemu_irq mbox_irq;BCM2835FBState *fbdev; +BCM2835OTPState *otp;MACAddr macaddr;uint32_t board_rev;
hw/arm/bcm2835_peripherals.c +2 -0
@@ -132,6 +132,8 @@ static void raspi_peripherals_base_init(Object *obj) OBJECT(&s->fb));object_property_add_const_link (OBJECT (&s->property),"dma-mr" ,OBJECT (&s->gpu_bus_mr)); +object_property_add_const_link (OBJECT (&s->property),"otp" , +OBJECT (&s->otp));/* Extended Mass Media Controller */ object_initialize_child (obj,"sdhci" , &s->sdhci,TYPE_SYSBUS_SDHCI );
hw/misc/bcm2835_property.c +87 -0
105 lines not on this page · raw message
Signature · 1 line
2.34.1
[PULL 04/29] tests/avocado: update firmware for sbsa-ref
In reply to Peter MaydellFrom: Marcin Juszkiewicz <[email protected]>
Update firmware to have graphics card memory fix from EDK2 commit c1d1910be6e04a8b1a73090cf2881fb698947a6e:
OvmfPkg/QemuVideoDxe: add feature PCD to remap framebuffer W/C
Some platforms (such as SBSA-QEMU on recent builds of the emulator) only tolerate misaligned accesses to normal memory, and raise alignment faults on such accesses to device memory, which is the default for PCIe MMIO BARs.
When emulating a PCIe graphics controller, the framebuffer is typically exposed via a MMIO BAR, while the disposition of the region is closer to memory (no side effects on reads or writes, except for the changing picture on the screen; direct random access to any pixel in the image).
In order to permit the use of such controllers on platforms that only tolerate these types of accesses for normal memory, it is necessary to remap the memory. Use the DXE services to set the desired capabilities and attributes.
Hide this behavior under a feature PCD so only platforms that really need it can enable it. (OVMF on x86 has no need for this)
With this fix enabled we can boot sbsa-ref with more than one cpu core.
Message-id: [email protected]
--- tests/avocado/machine_aarch64_sbsaref.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
tests/avocado/machine_aarch64_sbsaref.py +7 -7
@@ -37,18 +37,18 @@ def fetch_firmware(self): Used components: - - Trusted Firmware 2.11.0 - - Tianocore EDK2 stable202405 - - Tianocore EDK2-platforms commit 4bbd0ed + - Trusted Firmware v2.11.0 + - Tianocore EDK2 4d4f569924 + - Tianocore EDK2-platforms 3f08401 """ # Secure BootRom (TF-A code) fs0_xz_url = ( "https://artifacts.codelinaro.org/artifactory/linaro-419-sbsa-ref/" - "20240528-140808/edk2/SBSA_FLASH0.fd.xz" + "20240619-148232/edk2/SBSA_FLASH0.fd.xz" ) - fs0_xz_hash = "fa6004900b67172914c908b78557fec4d36a5f784f4c3dd08f49adb75e1892a9" + fs0_xz_hash = "0c954842a590988f526984de22e21ae0ab9cb351a0c99a8a58e928f0c7359cf7" tar_xz_path = self.fetch_asset(fs0_xz_url, asset_hash=fs0_xz_hash, algorithm='sha256') archive.extract(tar_xz_path, self.workdir)
@@ -57,9 +57,9 @@ def fetch_firmware(self): # Non-secure rom (UEFI and EFI variables) fs1_xz_url = ( "https://artifacts.codelinaro.org/artifactory/linaro-419-sbsa-ref/" - "20240528-140808/edk2/SBSA_FLASH1.fd.xz" + "20240619-148232/edk2/SBSA_FLASH1.fd.xz" ) - fs1_xz_hash = "5f3747d4000bc416d9641e33ff4ac60c3cc8cb74ca51b6e932e58531c62eb6f7" + fs1_xz_hash = "c6ec39374c4d79bb9e9cdeeb6db44732d90bb4a334cec92002b3f4b9cac4b5ee" tar_xz_path = self.fetch_asset(fs1_xz_url, asset_hash=fs1_xz_hash, algorithm='sha256') archive.extract(tar_xz_path, self.workdir)
Signature · 1 line
2.34.1
[PULL 29/29] tests/qtest: Ensure STM32L4x5 EXTI state is correct at the end of QTests
In reply to Peter MaydellFrom: Inès Varhol <[email protected]>
EXTI's new field irq_levels tracks irq levels between tests when using global_qtest.
This happens in stm32l4x5_exti-test.c, stm32l4x5_syscfg-test.c and stm32l4x5_gpio-test.c (dm163.c doesn't use global_qtest).
To ensure that irq_levels has the same value before and after each QTest, this commit toggles back the irq lines that were changed at the end of each problematic test. Most QTests were already doing this.
Message-id: [email protected]
--- tests/qtest/stm32l4x5_exti-test.c | 8 ++++++++ tests/qtest/stm32l4x5_syscfg-test.c | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-)
tests/qtest/stm32l4x5_exti-test.c +8 -0
@@ -448,6 +448,9 @@ static void test_masked_interrupt(void) g_assert_cmphex(exti_readl(EXTI_PR1), ==, 0x00000000);/* Check that the interrupt isn't pending in NVIC */ g_assert_false (check_nvic_pending (EXTI1_IRQ )); + +/* Clean EXTI */ +exti_set_irq (1 ,0 ); }static void test_interrupt (void )
@@ -498,6 +501,9 @@ static void test_interrupt(void)/* Clean NVIC */ unpend_nvic_irq (EXTI1_IRQ );g_assert_false (check_nvic_pending (EXTI1_IRQ )); + +/* Clean EXTI */ +exti_set_irq (1 ,0 ); }static void test_orred_interrupts (void )
@@ -531,6 +537,8 @@ static void test_orred_interrupts(void)unpend_nvic_irq (EXTI5_9_IRQ );g_assert_false (check_nvic_pending (EXTI5_9_IRQ )); + +exti_set_irq (i,0 ); } }
tests/qtest/stm32l4x5_syscfg-test.c +1 -1
@@ -221,10 +221,10 @@ static void test_interrupt(void)g_assert_true (get_irq (1 ));/* Clean the test */ -syscfg_writel (SYSCFG_EXTICR1 ,0x00000000 );syscfg_set_irq (0 ,0 );/* irq 15 is high at reset because GPIOA15 is high at reset */ syscfg_set_irq (17 ,0 ); +syscfg_writel (SYSCFG_EXTICR1 ,0x00000000 ); }static void test_irq_pin_multiplexer (void )
Signature · 1 line
2.34.1
[PULL 14/29] target/arm: Convert BFMLALB, BFMLALT to decodetree
In reply to Peter MaydellFrom: Richard Henderson <[email protected]>
Message-id: [email protected]
--- target/arm/tcg/a64.decode | 2 + target/arm/tcg/translate-a64.c | 77 +++++++++++++--------------------- 2 files changed, 31 insertions(+), 48 deletions(-)
target/arm/tcg/a64.decode +2 -0
@@ -951,6 +951,7 @@ SDOT_v 0.00 1110 100 ..... 10010 1 ..... ..... @qrrr_s UDOT_v 0.10 1110 100 ..... 10010 1 ..... ..... @qrrr_s USDOT_v 0.00 1110 100 ..... 10011 1 ..... ..... @qrrr_s BFDOT_v 0.10 1110 010 ..... 11111 1 ..... ..... @qrrr_s +BFMLAL_v 0.10 1110 110 ..... 11111 1 ..... ..... @qrrr_h ### Advanced SIMD scalar x indexed element
@@ -1031,6 +1032,7 @@ UDOT_vi 0.10 1111 10 .. .... 1110 . 0 ..... ..... @qrrx_s SUDOT_vi 0.00 1111 00 .. .... 1111 . 0 ..... ..... @qrrx_s USDOT_vi 0.00 1111 10 .. .... 1111 . 0 ..... ..... @qrrx_s BFDOT_vi 0.00 1111 01 .. .... 1111 . 0 ..... ..... @qrrx_s +BFMLAL_vi 0.00 1111 11 .. .... 1111 . 0 ..... ..... @qrrx_h # Floating-point conditional select
target/arm/tcg/translate-a64.c +29 -48
125 lines not on this page · raw message
Signature · 1 line
2.34.1
[PULL 18/29] target/arm: Convert FCMLA to decodetree
In reply to Peter MaydellFrom: Richard Henderson <[email protected]>
Message-id: [email protected]
--- target/arm/tcg/a64.decode | 6 + target/arm/tcg/translate-a64.c | 238 ++++++++++----------------------- 2 files changed, 74 insertions(+), 170 deletions(-)
target/arm/tcg/a64.decode +6 -0
@@ -960,6 +960,8 @@ USMMLA 0100 1110 100 ..... 10101 1 ..... ..... @rrr_q1e0 FCADD_90 0.10 1110 ..0 ..... 11100 1 ..... ..... @qrrr_e FCADD_270 0.10 1110 ..0 ..... 11110 1 ..... ..... @qrrr_e +FCMLA_v 0 q:1 10 1110 esz:2 0 rm:5 110 rot:2 1 rn:5 rd:5 + ### Advanced SIMD scalar x indexed element FMUL_si 0101 1111 00 .. .... 1001 . 0 ..... ..... @rrx_h
@@ -1041,6 +1043,10 @@ USDOT_vi 0.00 1111 10 .. .... 1111 . 0 ..... ..... @qrrx_s BFDOT_vi 0.00 1111 01 .. .... 1111 . 0 ..... ..... @qrrx_s BFMLAL_vi 0.00 1111 11 .. .... 1111 . 0 ..... ..... @qrrx_h +FCMLA_vi 0 0 10 1111 01 idx:1 rm:5 0 rot:2 1 0 0 rn:5 rd:5 esz=1 q=0 +FCMLA_vi 0 1 10 1111 01 . rm:5 0 rot:2 1 . 0 rn:5 rd:5 esz=1 idx=%hl q=1 +FCMLA_vi 0 1 10 1111 10 0 rm:5 0 rot:2 1 idx:1 0 rn:5 rd:5 esz=2 q=1 + # Floating-point conditional select FCSEL 0001 1110 .. 1 rm:5 cond:4 11 rn:5 rd:5 esz=%esz_hsd
target/arm/tcg/translate-a64.c +68 -170
302 lines not on this page · raw message
Signature · 1 line
2.34.1
[PULL 27/29] tests/qtest: Fix STM32L4x5 SYSCFG irq line 15 state assumption
In reply to Peter MaydellFrom: Inès Varhol <[email protected]>
The QTest test_irq_pin_multiplexer makes the assumption that the reset state of irq line 15 is low, which is false since STM32L4x5 GPIO was implemented (the reset state of pin GPIOA15 is high because there's pull-up and it results in the irq line 15 also being high at reset).
It wasn't triggering an error because test_interrupt was mistakenly "resetting" the line low.
This commit corrects these two mistakes by :
- not setting the line low in test_interrupt
- using an irq line in test_irq_pin_multiplexer which is low at reset
Message-id: [email protected]
--- tests/qtest/stm32l4x5_syscfg-test.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
tests/qtest/stm32l4x5_syscfg-test.c +7 -7
@@ -223,7 +223,7 @@ static void test_interrupt(void)/* Clean the test */ syscfg_writel (SYSCFG_EXTICR1 ,0x00000000 );syscfg_set_irq (0 ,0 ); -syscfg_set_irq (15 ,0 ); +/* irq 15 is high at reset because GPIOA15 is high at reset */ syscfg_set_irq (17 ,0 ); }
@@ -237,21 +237,21 @@ static void test_irq_pin_multiplexer(void)syscfg_set_irq (0 ,1 ); -/* Check that irq 0 was set and irq 15 wasn't */ +/* Check that irq 0 was set and irq 2 wasn't */ g_assert_true (get_irq (0 )); -g_assert_false (get_irq (15 )); +g_assert_false (get_irq (2 ));/* Clean the test */ syscfg_set_irq (0 ,0 ); -syscfg_set_irq (15 ,1 ); +syscfg_set_irq (2 ,1 ); -/* Check that irq 15 was set and irq 0 wasn't */ -g_assert_true (get_irq (15 )); +/* Check that irq 2 was set and irq 0 wasn't */ +g_assert_true (get_irq (2 ));g_assert_false (get_irq (0 ));/* Clean the test */ -syscfg_set_irq (15 ,0 ); +syscfg_set_irq (2 ,0 ); }static void test_irq_gpio_multiplexer (void )
Signature · 1 line
2.34.1
[PULL 16/29] target/arm: Add data argument to do_fp3_vector
In reply to Peter MaydellFrom: Richard Henderson <[email protected]>
Message-id: [email protected]
--- target/arm/tcg/translate-a64.c | 52 +++++++++++++++++----------------- 1 file changed, 26 insertions(+), 26 deletions(-)
target/arm/tcg/translate-a64.c +26 -26
@@ -5290,7 +5290,7 @@ TRANS(CMHS_s, do_cmop_d, a, TCG_COND_GEU) TRANS(CMEQ_s, do_cmop_d, a, TCG_COND_EQ) TRANS(CMTST_s, do_cmop_d, a, TCG_COND_TSTNE) -static bool do_fp3_vector (DisasContext *s,arg_qrrr_e *a, +static bool do_fp3_vector (DisasContext *s,arg_qrrr_e *a,int data,gen_helper_gvec_3_ptr *const fns[3 ]) {MemOp esz = a->esz;
@@ -5313,7 +5313,7 @@ static bool do_fp3_vector(DisasContext *s, arg_qrrr_e *a, }if (fp_access_check (s)) {gen_gvec_op3_fpst (s, a->q, a->rd, a->rn, a->rm, - esz ==MO_16 ,0 , fns[esz -1 ]); + esz ==MO_16 , data, fns[esz -1 ]); }return true; }
@@ -5323,168 +5323,168 @@ static gen_helper_gvec_3_ptr * const f_vector_fadd[3] = { gen_helper_gvec_fadd_s, gen_helper_gvec_fadd_d, }; -TRANS(FADD_v, do_fp3_vector, a, f_vector_fadd) +TRANS(FADD_v, do_fp3_vector, a, 0, f_vector_fadd)static gen_helper_gvec_3_ptr *const f_vector_fsub[3 ] = { gen_helper_gvec_fsub_h, gen_helper_gvec_fsub_s, gen_helper_gvec_fsub_d, }; -TRANS(FSUB_v, do_fp3_vector, a, f_vector_fsub) +TRANS(FSUB_v, do_fp3_vector, a, 0, f_vector_fsub)static gen_helper_gvec_3_ptr *const f_vector_fdiv[3 ] = { gen_helper_gvec_fdiv_h, gen_helper_gvec_fdiv_s, gen_helper_gvec_fdiv_d, }; -TRANS(FDIV_v, do_fp3_vector, a, f_vector_fdiv) +TRANS(FDIV_v, do_fp3_vector, a, 0, f_vector_fdiv)static gen_helper_gvec_3_ptr *const f_vector_fmul[3 ] = { gen_helper_gvec_fmul_h, gen_helper_gvec_fmul_s, gen_helper_gvec_fmul_d, }; -TRANS(FMUL_v, do_fp3_vector, a, f_vector_fmul) +TRANS(FMUL_v, do_fp3_vector, a, 0, f_vector_fmul)static gen_helper_gvec_3_ptr *const f_vector_fmax[3 ] = { gen_helper_gvec_fmax_h, gen_helper_gvec_fmax_s, gen_helper_gvec_fmax_d, }; -TRANS(FMAX_v, do_fp3_vector, a, f_vector_fmax) +TRANS(FMAX_v, do_fp3_vector, a, 0, f_vector_fmax)static gen_helper_gvec_3_ptr *const f_vector_fmin[3 ] = { gen_helper_gvec_fmin_h, gen_helper_gvec_fmin_s, gen_helper_gvec_fmin_d, }; -TRANS(FMIN_v, do_fp3_vector, a, f_vector_fmin) +TRANS(FMIN_v, do_fp3_vector, a, 0, f_vector_fmin)static gen_helper_gvec_3_ptr *const f_vector_fmaxnm[3 ] = { gen_helper_gvec_fmaxnum_h, gen_helper_gvec_fmaxnum_s, gen_helper_gvec_fmaxnum_d, }; -TRANS(FMAXNM_v, do_fp3_vector, a, f_vector_fmaxnm) +TRANS(FMAXNM_v, do_fp3_vector, a, 0, f_vector_fmaxnm)static gen_helper_gvec_3_ptr *const f_vector_fminnm[3 ] = { gen_helper_gvec_fminnum_h, gen_helper_gvec_fminnum_s, gen_helper_gvec_fminnum_d, }; -TRANS(FMINNM_v, do_fp3_vector, a, f_vector_fminnm) +TRANS(FMINNM_v, do_fp3_vector, a, 0, f_vector_fminnm)static gen_helper_gvec_3_ptr *const f_vector_fmulx[3 ] = { gen_helper_gvec_fmulx_h, gen_helper_gvec_fmulx_s, gen_helper_gvec_fmulx_d, }; -TRANS(FMULX_v, do_fp3_vector, a, f_vector_fmulx) +TRANS(FMULX_v, do_fp3_vector, a, 0, f_vector_fmulx)static gen_helper_gvec_3_ptr *const f_vector_fmla[3 ] = { gen_helper_gvec_vfma_h, gen_helper_gvec_vfma_s, gen_helper_gvec_vfma_d, }; -TRANS(FMLA_v, do_fp3_vector, a, f_vector_fmla) +TRANS(FMLA_v, do_fp3_vector, a, 0, f_vector_fmla)static gen_helper_gvec_3_ptr *const f_vector_fmls[3 ] = { gen_helper_gvec_vfms_h, gen_helper_gvec_vfms_s, gen_helper_gvec_vfms_d, }; -TRANS(FMLS_v, do_fp3_vector, a, f_vector_fmls) +TRANS(FMLS_v, do_fp3_vector, a, 0, f_vector_fmls)static gen_helper_gvec_3_ptr *const f_vector_fcmeq[3 ] = { gen_helper_gvec_fceq_h, gen_helper_gvec_fceq_s, gen_helper_gvec_fceq_d, }; -TRANS(FCMEQ_v, do_fp3_vector, a, f_vector_fcmeq) +TRANS(FCMEQ_v, do_fp3_vector, a, 0, f_vector_fcmeq)static gen_helper_gvec_3_ptr *const f_vector_fcmge[3 ] = { gen_helper_gvec_fcge_h, gen_helper_gvec_fcge_s, gen_helper_gvec_fcge_d, }; -TRANS(FCMGE_v, do_fp3_vector, a, f_vector_fcmge) +TRANS(FCMGE_v, do_fp3_vector, a, 0, f_vector_fcmge)static gen_helper_gvec_3_ptr *const f_vector_fcmgt[3 ] = { gen_helper_gvec_fcgt_h, gen_helper_gvec_fcgt_s, gen_helper_gvec_fcgt_d, }; -TRANS(FCMGT_v, do_fp3_vector, a, f_vector_fcmgt) +TRANS(FCMGT_v, do_fp3_vector, a, 0, f_vector_fcmgt)static gen_helper_gvec_3_ptr *const f_vector_facge[3 ] = { gen_helper_gvec_facge_h, gen_helper_gvec_facge_s, gen_helper_gvec_facge_d, }; -TRANS(FACGE_v, do_fp3_vector, a, f_vector_facge) +TRANS(FACGE_v, do_fp3_vector, a, 0, f_vector_facge)static gen_helper_gvec_3_ptr *const f_vector_facgt[3 ] = { gen_helper_gvec_facgt_h, gen_helper_gvec_facgt_s, gen_helper_gvec_facgt_d, }; -TRANS(FACGT_v, do_fp3_vector, a, f_vector_facgt) +TRANS(FACGT_v, do_fp3_vector, a, 0, f_vector_facgt)static gen_helper_gvec_3_ptr *const f_vector_fabd[3 ] = { gen_helper_gvec_fabd_h, gen_helper_gvec_fabd_s, gen_helper_gvec_fabd_d, }; -TRANS(FABD_v, do_fp3_vector, a, f_vector_fabd) +TRANS(FABD_v, do_fp3_vector, a, 0, f_vector_fabd)static gen_helper_gvec_3_ptr *const f_vector_frecps[3 ] = { gen_helper_gvec_recps_h, gen_helper_gvec_recps_s, gen_helper_gvec_recps_d, }; -TRANS(FRECPS_v, do_fp3_vector, a, f_vector_frecps) +TRANS(FRECPS_v, do_fp3_vector, a, 0, f_vector_frecps)static gen_helper_gvec_3_ptr *const f_vector_frsqrts[3 ] = { gen_helper_gvec_rsqrts_h, gen_helper_gvec_rsqrts_s, gen_helper_gvec_rsqrts_d, }; -TRANS(FRSQRTS_v, do_fp3_vector, a, f_vector_frsqrts) +TRANS(FRSQRTS_v, do_fp3_vector, a, 0, f_vector_frsqrts)static gen_helper_gvec_3_ptr *const f_vector_faddp[3 ] = { gen_helper_gvec_faddp_h, gen_helper_gvec_faddp_s, gen_helper_gvec_faddp_d, }; -TRANS(FADDP_v, do_fp3_vector, a, f_vector_faddp) +TRANS(FADDP_v, do_fp3_vector, a, 0, f_vector_faddp)static gen_helper_gvec_3_ptr *const f_vector_fmaxp[3 ] = { gen_helper_gvec_fmaxp_h, gen_helper_gvec_fmaxp_s, gen_helper_gvec_fmaxp_d, }; -TRANS(FMAXP_v, do_fp3_vector, a, f_vector_fmaxp) +TRANS(FMAXP_v, do_fp3_vector, a, 0, f_vector_fmaxp)static gen_helper_gvec_3_ptr *const f_vector_fminp[3 ] = { gen_helper_gvec_fminp_h, gen_helper_gvec_fminp_s, gen_helper_gvec_fminp_d, }; -TRANS(FMINP_v, do_fp3_vector, a, f_vector_fminp) +TRANS(FMINP_v, do_fp3_vector, a, 0, f_vector_fminp)static gen_helper_gvec_3_ptr *const f_vector_fmaxnmp[3 ] = { gen_helper_gvec_fmaxnump_h, gen_helper_gvec_fmaxnump_s, gen_helper_gvec_fmaxnump_d, }; -TRANS(FMAXNMP_v, do_fp3_vector, a, f_vector_fmaxnmp) +TRANS(FMAXNMP_v, do_fp3_vector, a, 0, f_vector_fmaxnmp)static gen_helper_gvec_3_ptr *const f_vector_fminnmp[3 ] = { gen_helper_gvec_fminnump_h, gen_helper_gvec_fminnump_s, gen_helper_gvec_fminnump_d, }; -TRANS(FMINNMP_v, do_fp3_vector, a, f_vector_fminnmp) +TRANS(FMINNMP_v, do_fp3_vector, a, 0, f_vector_fminnmp)static bool do_fmlal (DisasContext *s,arg_qrrr_e *a,bool is_s,bool is_2) {
Signature · 1 line
2.34.1
[PULL 17/29] target/arm: Convert FCADD to decodetree
In reply to Peter MaydellFrom: Richard Henderson <[email protected]>
Message-id: [email protected]
--- target/arm/tcg/a64.decode | 3 +++ target/arm/tcg/translate-a64.c | 33 ++++++++++----------------------- 2 files changed, 13 insertions(+), 23 deletions(-)
target/arm/tcg/a64.decode +3 -0
@@ -957,6 +957,9 @@ SMMLA 0100 1110 100 ..... 10100 1 ..... ..... @rrr_q1e0 UMMLA 0110 1110 100 ..... 10100 1 ..... ..... @rrr_q1e0 USMMLA 0100 1110 100 ..... 10101 1 ..... ..... @rrr_q1e0 +FCADD_90 0.10 1110 ..0 ..... 11100 1 ..... ..... @qrrr_e +FCADD_270 0.10 1110 ..0 ..... 11110 1 ..... ..... @qrrr_e + ### Advanced SIMD scalar x indexed element FMUL_si 0101 1111 00 .. .... 1001 . 0 ..... ..... @rrx_h
target/arm/tcg/translate-a64.c +10 -23
@@ -5623,6 +5623,14 @@ static bool trans_BFMLAL_v(DisasContext *s, arg_qrrr_e *a)return true; } +static gen_helper_gvec_3_ptr *const f_vector_fcadd[3 ] = { + gen_helper_gvec_fcaddh, + gen_helper_gvec_fcadds, + gen_helper_gvec_fcaddd, +}; +TRANS_FEAT(FCADD_90, aa64_fcma, do_fp3_vector, a, 0, f_vector_fcadd) +TRANS_FEAT (FCADD_270 , aa64_fcma, do_fp3_vector, a,1 , f_vector_fcadd) +/* * Advanced SIMD scalar/vector x indexed element */
@@ -10957,8 +10965,6 @@ static void disas_simd_three_reg_same_extra(DisasContext *s, uint32_t insn)case 0x19 :/* FCMLA, #90 */ case 0x1a :/* FCMLA, #180 */ case 0x1b :/* FCMLA, #270 */ -case 0x1c :/* FCADD, #90 */ -case 0x1e :/* FCADD, #270 */ if (size ==0 || (size ==1 && !dc_isar_feature (aa64_fp16, s)) || (size ==3 && !is_q)) {
@@ -10976,7 +10982,9 @@ static void disas_simd_three_reg_same_extra(DisasContext *s, uint32_t insn)case 0x11 :/* SQRDMLSH (vector) */ case 0x12 :/* UDOT (vector) */ case 0x14 :/* UMMLA */ +case 0x1c :/* FCADD, #90 */ case 0x1d :/* BFMMLA */ +case 0x1e :/* FCADD, #270 */ case 0x1f :/* BFDOT / BFMLAL */ unallocated_encoding (s);return ;
@@ -11013,27 +11021,6 @@ static void disas_simd_three_reg_same_extra(DisasContext *s, uint32_t insn) }return ; -case 0xc :/* FCADD, #90 */ -case 0xe :/* FCADD, #270 */ - rot =extract32 (opcode,1 ,1 ); -switch (size) { -case 1 : -gen_gvec_op3_fpst (s, is_q, rd, rn, rm, size ==1 , rot, - gen_helper_gvec_fcaddh); -break ; -case 2 : -gen_gvec_op3_fpst (s, is_q, rd, rn, rm, size ==1 , rot, - gen_helper_gvec_fcadds); -break ; -case 3 : -gen_gvec_op3_fpst (s, is_q, rd, rn, rm, size ==1 , rot, - gen_helper_gvec_fcaddd); -break ; -default : -g_assert_not_reached (); - } -return ; -default :g_assert_not_reached (); }
Signature · 1 line
2.34.1
[PULL 07/29] target/arm: Fix VCMLA Dd, Dn, Dm[idx]
In reply to Peter MaydellFrom: Richard Henderson <[email protected]>
The inner loop, bounded by eltspersegment, must not be larger than the outer loop, bounded by elements.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2376
Message-id: [email protected]
--- target/arm/tcg/vec_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
target/arm/tcg/vec_helper.c +2 -2
@@ -907,7 +907,7 @@ void HELPER(gvec_fcmlah_idx)(void *vd, void *vn, void *vm, void *va,intptr_t index =extract32 (desc,SIMD_DATA_SHIFT +2 ,2 );uint32_t neg_real = flip ^ neg_imag;intptr_t elements = opr_sz /sizeof (float16); -intptr_t eltspersegment =16 /sizeof (float16); +intptr_t eltspersegment =MIN (16 /sizeof (float16), elements);intptr_t i, j;/* Shift boolean to the sign bit so we can xor to negate. */
@@ -969,7 +969,7 @@ void HELPER(gvec_fcmlas_idx)(void *vd, void *vn, void *vm, void *va,intptr_t index =extract32 (desc,SIMD_DATA_SHIFT +2 ,2 );uint32_t neg_real = flip ^ neg_imag;intptr_t elements = opr_sz /sizeof (float32); -intptr_t eltspersegment =16 /sizeof (float32); +intptr_t eltspersegment =MIN (16 /sizeof (float32), elements);intptr_t i, j;/* Shift boolean to the sign bit so we can xor to negate. */
Signature · 1 line
2.34.1
[PULL 10/29] target/arm: Convert SQRDMLAH, SQRDMLSH to decodetree
In reply to Peter MaydellFrom: Richard Henderson <[email protected]>
Message-id: [email protected]
--- target/arm/helper.h | 10 ++ target/arm/tcg/a64.decode | 16 +++ target/arm/tcg/translate-a64.c | 206 +++++++++++++-------------------- target/arm/tcg/vec_helper.c | 72 ++++++++++++ 4 files changed, 180 insertions(+), 124 deletions(-)
target/arm/helper.h +10 -0
@@ -979,6 +979,16 @@ DEF_HELPER_FLAGS_5(neon_sqrdmulh_idx_h, TCG_CALL_NO_RWG,DEF_HELPER_FLAGS_5 (neon_sqrdmulh_idx_s,TCG_CALL_NO_RWG , void, ptr, ptr, ptr, ptr, i32) +DEF_HELPER_FLAGS_5 (neon_sqrdmlah_idx_h,TCG_CALL_NO_RWG , + void, ptr, ptr, ptr, ptr, i32) +DEF_HELPER_FLAGS_5 (neon_sqrdmlah_idx_s,TCG_CALL_NO_RWG , + void, ptr, ptr, ptr, ptr, i32) + +DEF_HELPER_FLAGS_5 (neon_sqrdmlsh_idx_h,TCG_CALL_NO_RWG , + void, ptr, ptr, ptr, ptr, i32) +DEF_HELPER_FLAGS_5 (neon_sqrdmlsh_idx_s,TCG_CALL_NO_RWG , + void, ptr, ptr, ptr, ptr, i32) + DEF_HELPER_FLAGS_4(sve2_sqdmulh_b, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32) DEF_HELPER_FLAGS_4(sve2_sqdmulh_h, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)DEF_HELPER_FLAGS_4 (sve2_sqdmulh_s,TCG_CALL_NO_RWG , void, ptr, ptr, ptr, i32)
target/arm/tcg/a64.decode +16 -0
@@ -781,6 +781,8 @@ CMEQ_s 0111 1110 111 ..... 10001 1 ..... ..... @rrr_d SQDMULH_s 0101 1110 ..1 ..... 10110 1 ..... ..... @rrr_e SQRDMULH_s 0111 1110 ..1 ..... 10110 1 ..... ..... @rrr_e +SQRDMLAH_s 0111 1110 ..0 ..... 10000 1 ..... ..... @rrr_e +SQRDMLSH_s 0111 1110 ..0 ..... 10001 1 ..... ..... @rrr_e ### Advanced SIMD scalar pairwise
@@ -941,6 +943,8 @@ MLS_v 0.10 1110 ..1 ..... 10010 1 ..... ..... @qrrr_e SQDMULH_v 0.00 1110 ..1 ..... 10110 1 ..... ..... @qrrr_e SQRDMULH_v 0.10 1110 ..1 ..... 10110 1 ..... ..... @qrrr_e +SQRDMLAH_v 0.10 1110 ..0 ..... 10000 1 ..... ..... @qrrr_e +SQRDMLSH_v 0.10 1110 ..0 ..... 10001 1 ..... ..... @qrrr_e ### Advanced SIMD scalar x indexed element
@@ -966,6 +970,12 @@ SQDMULH_si 0101 1111 10 .. .... 1100 . 0 ..... ..... @rrx_s SQRDMULH_si 0101 1111 01 .. .... 1101 . 0 ..... ..... @rrx_h SQRDMULH_si 0101 1111 10 . ..... 1101 . 0 ..... ..... @rrx_s +SQRDMLAH_si 0111 1111 01 .. .... 1101 . 0 ..... ..... @rrx_h +SQRDMLAH_si 0111 1111 10 .. .... 1101 . 0 ..... ..... @rrx_s + +SQRDMLSH_si 0111 1111 01 .. .... 1111 . 0 ..... ..... @rrx_h +SQRDMLSH_si 0111 1111 10 .. .... 1111 . 0 ..... ..... @rrx_s + ### Advanced SIMD vector x indexed element FMUL_vi 0.00 1111 00 .. .... 1001 . 0 ..... ..... @qrrx_h
@@ -1004,6 +1014,12 @@ SQDMULH_vi 0.00 1111 10 . ..... 1100 . 0 ..... ..... @qrrx_s SQRDMULH_vi 0.00 1111 01 .. .... 1101 . 0 ..... ..... @qrrx_h SQRDMULH_vi 0.00 1111 10 . ..... 1101 . 0 ..... ..... @qrrx_s +SQRDMLAH_vi 0.10 1111 01 .. .... 1101 . 0 ..... ..... @qrrx_h +SQRDMLAH_vi 0.10 1111 10 .. .... 1101 . 0 ..... ..... @qrrx_s + +SQRDMLSH_vi 0.10 1111 01 .. .... 1111 . 0 ..... ..... @qrrx_h +SQRDMLSH_vi 0.10 1111 10 .. .... 1111 . 0 ..... ..... @qrrx_s + # Floating-point conditional select FCSEL 0001 1110 .. 1 rm:5 cond:4 11 rn:5 rd:5 esz=%esz_hsd
target/arm/tcg/translate-a64.c +82 -124
283 lines not on this page · raw message
target/arm/tcg/vec_helper.c +72 -0
84 lines not on this page · raw message
Signature · 1 line
2.34.1
[PULL 08/29] target/arm: Fix SQDMULH (by element) with Q=0
In reply to Peter MaydellFrom: Richard Henderson <[email protected]>
The inner loop, bounded by eltspersegment, must not be larger than the outer loop, bounded by elements.
Message-id: [email protected]
--- target/arm/tcg/vec_helper.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-)
target/arm/tcg/vec_helper.c +16 -8
@@ -317,10 +317,12 @@ void HELPER(neon_sqdmulh_idx_h)(void *vd, void *vn, void *vm,intptr_t i, j, opr_sz =simd_oprsz (desc);int idx =simd_data (desc);int16_t *d = vd, *n = vn, *m = (int16_t *)vm +H2 (idx); +intptr_t elements = opr_sz /2 ; +intptr_t eltspersegment =MIN (16 /2 , elements); -for (i =0 ; i < opr_sz /2 ; i +=16 /2 ) { +for (i =0 ; i < elements; i +=16 /2 ) {int16_t mm = m[i]; -for (j =0 ; j <16 /2 ; ++j) { +for (j =0 ; j < eltspersegment; ++j) { d[i + j] =do_sqrdmlah_h (n[i + j], mm,0 , false, false, vq); } }
@@ -333,10 +335,12 @@ void HELPER(neon_sqrdmulh_idx_h)(void *vd, void *vn, void *vm,intptr_t i, j, opr_sz =simd_oprsz (desc);int idx =simd_data (desc);int16_t *d = vd, *n = vn, *m = (int16_t *)vm +H2 (idx); +intptr_t elements = opr_sz /2 ; +intptr_t eltspersegment =MIN (16 /2 , elements); -for (i =0 ; i < opr_sz /2 ; i +=16 /2 ) { +for (i =0 ; i < elements; i +=16 /2 ) {int16_t mm = m[i]; -for (j =0 ; j <16 /2 ; ++j) { +for (j =0 ; j < eltspersegment; ++j) { d[i + j] =do_sqrdmlah_h (n[i + j], mm,0 , false, true, vq); } }
@@ -512,10 +516,12 @@ void HELPER(neon_sqdmulh_idx_s)(void *vd, void *vn, void *vm,intptr_t i, j, opr_sz =simd_oprsz (desc);int idx =simd_data (desc);int32_t *d = vd, *n = vn, *m = (int32_t *)vm +H4 (idx); +intptr_t elements = opr_sz /4 ; +intptr_t eltspersegment =MIN (16 /4 , elements); -for (i =0 ; i < opr_sz /4 ; i +=16 /4 ) { +for (i =0 ; i < elements; i +=16 /4 ) {int32_t mm = m[i]; -for (j =0 ; j <16 /4 ; ++j) { +for (j =0 ; j < eltspersegment; ++j) { d[i + j] =do_sqrdmlah_s (n[i + j], mm,0 , false, false, vq); } }
@@ -528,10 +534,12 @@ void HELPER(neon_sqrdmulh_idx_s)(void *vd, void *vn, void *vm,intptr_t i, j, opr_sz =simd_oprsz (desc);int idx =simd_data (desc);int32_t *d = vd, *n = vn, *m = (int32_t *)vm +H4 (idx); +intptr_t elements = opr_sz /4 ; +intptr_t eltspersegment =MIN (16 /4 , elements); -for (i =0 ; i < opr_sz /4 ; i +=16 /4 ) { +for (i =0 ; i < elements; i +=16 /4 ) {int32_t mm = m[i]; -for (j =0 ; j <16 /4 ; ++j) { +for (j =0 ; j < eltspersegment; ++j) { d[i + j] =do_sqrdmlah_s (n[i + j], mm,0 , false, true, vq); } }
Signature · 1 line
2.34.1
[PULL 28/29] hw/misc: In STM32L4x5 EXTI, correct configurable interrupts
In reply to Peter MaydellFrom: Inès Varhol <[email protected]>
The implementation of configurable interrupts (interrupts supporting edge selection) was incorrectly expecting alternating input levels :
this commits adds a new status field irq_levels to actually detect edges.
Message-id: [email protected]
--- include/hw/misc/stm32l4x5_exti.h | 2 ++ hw/misc/stm32l4x5_exti.c | 28 +++++++++++++--------------- 2 files changed, 15 insertions(+), 15 deletions(-)
include/hw/misc/stm32l4x5_exti.h +2 -0
@@ -45,6 +45,8 @@ struct Stm32l4x5ExtiState {uint32_t swier[EXTI_NUM_REGISTER ];uint32_t pr[EXTI_NUM_REGISTER ]; +/* used for edge detection */ +uint32_t irq_levels[EXTI_NUM_REGISTER ];qemu_irq irq[EXTI_NUM_INTERRUPT_OUT_LINES ]; };
hw/misc/stm32l4x5_exti.c +13 -15
@@ -88,6 +88,7 @@ static void stm32l4x5_exti_reset_hold(Object *obj, ResetType type) s->ftsr[bank] =0x00000000 ; s->swier[bank] =0x00000000 ; s->pr[bank] =0x00000000 ; + s->irq_levels[bank] =0x00000000 ; } }
@@ -102,27 +103,23 @@ static void stm32l4x5_exti_set_irq(void *opaque, int irq, int level)/* Shift the value to enable access in x2 registers. */ irq %=EXTI_MAX_IRQ_PER_BANK ; +if (level ==extract32 (s->irq_levels[bank], irq,1 )) { +/* No change in IRQ line state: do nothing */ +return ; + } + s->irq_levels[bank] =deposit32 (s->irq_levels[bank], irq,1 , level); +/* If the interrupt is masked, pr won't be raised */ if (!extract32 (s->imr[bank], irq,1 )) {return ; } -if (((1 << irq) & s->rtsr[bank]) && level) { -/* Rising Edge */ - s->pr[bank] |=1 << irq; -qemu_irq_pulse (s->irq[oirq]); - }else if (((1 << irq) & s->ftsr[bank]) && !level) { -/* Falling Edge */ +if ((level &&extract32 (s->rtsr[bank], irq,1 )) || + (!level &&extract32 (s->ftsr[bank], irq,1 ))) { + s->pr[bank] |=1 << irq;qemu_irq_pulse (s->irq[oirq]); } -/* -* In the following situations : -* - falling edge but rising trigger selected -* - rising edge but falling trigger selected -* - no trigger selected -* No action is required -*/ } static uint64_t stm32l4x5_exti_read(void *opaque, hwaddr addr,
@@ -255,8 +252,8 @@ static void stm32l4x5_exti_init(Object *obj)static const VMStateDescription vmstate_stm32l4x5_exti = { .name =TYPE_STM32L4X5_EXTI , - .version_id =1 , - .minimum_version_id =1 , + .version_id =2 , + .minimum_version_id =2 , .fields = (VMStateField []) {VMSTATE_UINT32_ARRAY (imr, Stm32l4x5ExtiState,EXTI_NUM_REGISTER ),VMSTATE_UINT32_ARRAY (emr, Stm32l4x5ExtiState,EXTI_NUM_REGISTER ),
@@ -264,6 +261,7 @@ static const VMStateDescription vmstate_stm32l4x5_exti = {VMSTATE_UINT32_ARRAY (ftsr, Stm32l4x5ExtiState,EXTI_NUM_REGISTER ),VMSTATE_UINT32_ARRAY (swier, Stm32l4x5ExtiState,EXTI_NUM_REGISTER ),VMSTATE_UINT32_ARRAY (pr, Stm32l4x5ExtiState,EXTI_NUM_REGISTER ), +VMSTATE_UINT32_ARRAY (irq_levels, Stm32l4x5ExtiState,EXTI_NUM_REGISTER ), VMSTATE_END_OF_LIST() } };
Signature · 1 line
2.34.1
[PULL 13/29] target/arm: Convert BFDOT to decodetree
In reply to Peter MaydellFrom: Richard Henderson <[email protected]>
Message-id: [email protected]
--- target/arm/tcg/a64.decode | 2 ++ target/arm/tcg/translate-a64.c | 20 +++++--------------- 2 files changed, 7 insertions(+), 15 deletions(-)
target/arm/tcg/a64.decode +2 -0
@@ -950,6 +950,7 @@ SQRDMLSH_v 0.10 1110 ..0 ..... 10001 1 ..... ..... @qrrr_e SDOT_v 0.00 1110 100 ..... 10010 1 ..... ..... @qrrr_s UDOT_v 0.10 1110 100 ..... 10010 1 ..... ..... @qrrr_s USDOT_v 0.00 1110 100 ..... 10011 1 ..... ..... @qrrr_s +BFDOT_v 0.10 1110 010 ..... 11111 1 ..... ..... @qrrr_s ### Advanced SIMD scalar x indexed element
@@ -1029,6 +1030,7 @@ SDOT_vi 0.00 1111 10 .. .... 1110 . 0 ..... ..... @qrrx_s UDOT_vi 0.10 1111 10 .. .... 1110 . 0 ..... ..... @qrrx_s SUDOT_vi 0.00 1111 00 .. .... 1111 . 0 ..... ..... @qrrx_s USDOT_vi 0.00 1111 10 .. .... 1111 . 0 ..... ..... @qrrx_s +BFDOT_vi 0.00 1111 01 .. .... 1111 . 0 ..... ..... @qrrx_s # Floating-point conditional select
target/arm/tcg/translate-a64.c +5 -15
@@ -5604,6 +5604,7 @@ static bool do_dot_vector(DisasContext *s, arg_qrrr_e *a, TRANS_FEAT(SDOT_v, aa64_dp, do_dot_vector, a, gen_helper_gvec_sdot_b) TRANS_FEAT(UDOT_v, aa64_dp, do_dot_vector, a, gen_helper_gvec_udot_b) TRANS_FEAT(USDOT_v, aa64_i8mm, do_dot_vector, a, gen_helper_gvec_usdot_b) +TRANS_FEAT (BFDOT_v, aa64_bf16, do_dot_vector, a, gen_helper_gvec_bfdot)/* * Advanced SIMD scalar/vector x indexed element
@@ -5942,6 +5943,8 @@ TRANS_FEAT(SUDOT_vi, aa64_i8mm, do_dot_vector_idx, a, gen_helper_gvec_sudot_idx_b) TRANS_FEAT(USDOT_vi, aa64_i8mm, do_dot_vector_idx, a, gen_helper_gvec_usdot_idx_b) +TRANS_FEAT(BFDOT_vi, aa64_bf16, do_dot_vector_idx, a, + gen_helper_gvec_bfdot_idx)/* * Advanced SIMD scalar pairwise
@@ -10951,11 +10954,11 @@ static void disas_simd_three_reg_same_extra(DisasContext *s, uint32_t insn)break ;case 0x1f :switch (size) { -case 1 :/* BFDOT */ case 3 :/* BFMLAL{B,T} */ feature =dc_isar_feature (aa64_bf16, s);break ;default : +case 1 :/* BFDOT */ unallocated_encoding (s);return ; }
@@ -11036,9 +11039,6 @@ static void disas_simd_three_reg_same_extra(DisasContext *s, uint32_t insn)return ;case 0xf :switch (size) { -case 1 :/* BFDOT */ -gen_gvec_op4_ool (s, is_q, rd, rn, rm, rd,0 , gen_helper_gvec_bfdot); -break ;case 3 :/* BFMLAL{B,T} */ gen_gvec_op4_fpst (s,1 , rd, rn, rm, rd, false, is_q, gen_helper_gvec_bfmlal);
@@ -12053,13 +12053,6 @@ static void disas_simd_indexed(DisasContext *s, uint32_t insn)break ;case 0x0f :switch (size) { -case 1 :/* BFDOT */ -if (is_scalar || !dc_isar_feature (aa64_bf16, s)) { -unallocated_encoding (s); -return ; - } - size =MO_32 ; -break ;case 3 :/* BFMLAL{B,T} */ if (is_scalar || !dc_isar_feature (aa64_bf16, s)) {unallocated_encoding (s);
@@ -12070,6 +12063,7 @@ static void disas_simd_indexed(DisasContext *s, uint32_t insn)break ;default :case 0 :/* SUDOT */ +case 1 :/* BFDOT */ case 2 :/* USDOT */ unallocated_encoding (s);return ;
@@ -12179,10 +12173,6 @@ static void disas_simd_indexed(DisasContext *s, uint32_t insn)switch (16 * u + opcode) {case 0x0f :switch (extract32 (insn,22 ,2 )) { -case 1 :/* BFDOT */ -gen_gvec_op4_ool (s, is_q, rd, rn, rm, rd, index, - gen_helper_gvec_bfdot_idx); -return ;case 3 :/* BFMLAL{B,T} */ gen_gvec_op4_fpst (s,1 , rd, rn, rm, rd,0 , (index <<1 ) | is_q, gen_helper_gvec_bfmlal_idx);
Signature · 1 line
2.34.1
[PULL 15/29] target/arm: Convert BFMMLA, SMMLA, UMMLA, USMMLA to decodetree
In reply to Peter MaydellFrom: Richard Henderson <[email protected]>
Message-id: [email protected]
--- target/arm/tcg/a64.decode | 4 ++++ target/arm/tcg/translate-a64.c | 36 ++++++++-------------------------- 2 files changed, 12 insertions(+), 28 deletions(-)
target/arm/tcg/a64.decode +4 -0
@@ -952,6 +952,10 @@ UDOT_v 0.10 1110 100 ..... 10010 1 ..... ..... @qrrr_s USDOT_v 0.00 1110 100 ..... 10011 1 ..... ..... @qrrr_s BFDOT_v 0.10 1110 010 ..... 11111 1 ..... ..... @qrrr_s BFMLAL_v 0.10 1110 110 ..... 11111 1 ..... ..... @qrrr_h +BFMMLA 0110 1110 010 ..... 11101 1 ..... ..... @rrr_q1e0 +SMMLA 0100 1110 100 ..... 10100 1 ..... ..... @rrr_q1e0 +UMMLA 0110 1110 100 ..... 10100 1 ..... ..... @rrr_q1e0 +USMMLA 0100 1110 100 ..... 10101 1 ..... ..... @rrr_q1e0 ### Advanced SIMD scalar x indexed element
target/arm/tcg/translate-a64.c +8 -28
@@ -5605,6 +5605,10 @@ TRANS_FEAT(SDOT_v, aa64_dp, do_dot_vector, a, gen_helper_gvec_sdot_b) TRANS_FEAT(UDOT_v, aa64_dp, do_dot_vector, a, gen_helper_gvec_udot_b) TRANS_FEAT(USDOT_v, aa64_i8mm, do_dot_vector, a, gen_helper_gvec_usdot_b) TRANS_FEAT(BFDOT_v, aa64_bf16, do_dot_vector, a, gen_helper_gvec_bfdot) +TRANS_FEAT(BFMMLA, aa64_bf16, do_dot_vector, a, gen_helper_gvec_bfmmla) +TRANS_FEAT(SMMLA, aa64_i8mm, do_dot_vector, a, gen_helper_gvec_smmla_b) +TRANS_FEAT(UMMLA, aa64_i8mm, do_dot_vector, a, gen_helper_gvec_ummla_b) +TRANS_FEAT(USMMLA, aa64_i8mm, do_dot_vector, a, gen_helper_gvec_usmmla_b)static bool trans_BFMLAL_v (DisasContext *s,arg_qrrr_e *a) {
@@ -10949,15 +10953,6 @@ static void disas_simd_three_reg_same_extra(DisasContext *s, uint32_t insn)int rot;switch (u *16 + opcode) { -case 0x04 :/* SMMLA */ -case 0x14 :/* UMMLA */ -case 0x05 :/* USMMLA */ -if (!is_q || size !=MO_32 ) { -unallocated_encoding (s); -return ; - } - feature =dc_isar_feature (aa64_i8mm, s); -break ;case 0x18 :/* FCMLA, #0 */ case 0x19 :/* FCMLA, #90 */ case 0x1a :/* FCMLA, #180 */
@@ -10972,19 +10967,16 @@ static void disas_simd_three_reg_same_extra(DisasContext *s, uint32_t insn) } feature =dc_isar_feature (aa64_fcma, s);break ; -case 0x1d :/* BFMMLA */ -if (size !=MO_16 || !is_q) { -unallocated_encoding (s); -return ; - } - feature =dc_isar_feature (aa64_bf16, s); -break ;default :case 0x02 :/* SDOT (vector) */ case 0x03 :/* USDOT */ +case 0x04 :/* SMMLA */ +case 0x05 :/* USMMLA */ case 0x10 :/* SQRDMLAH (vector) */ case 0x11 :/* SQRDMLSH (vector) */ case 0x12 :/* UDOT (vector) */ +case 0x14 :/* UMMLA */ +case 0x1d :/* BFMMLA */ case 0x1f :/* BFDOT / BFMLAL */ unallocated_encoding (s);return ;
@@ -10998,15 +10990,6 @@ static void disas_simd_three_reg_same_extra(DisasContext *s, uint32_t insn) }switch (opcode) { -case 0x04 :/* SMMLA, UMMLA */ -gen_gvec_op4_ool (s,1 , rd, rn, rm, rd,0 , - u ? gen_helper_gvec_ummla_b - : gen_helper_gvec_smmla_b); -return ; -case 0x05 :/* USMMLA */ -gen_gvec_op4_ool (s,1 , rd, rn, rm, rd,0 , gen_helper_gvec_usmmla_b); -return ; -case 0x8 :/* FCMLA, #0 */ case 0x9 :/* FCMLA, #90 */ case 0xa :/* FCMLA, #180 */
@@ -11051,9 +11034,6 @@ static void disas_simd_three_reg_same_extra(DisasContext *s, uint32_t insn) }return ; -case 0xd :/* BFMMLA */ -gen_gvec_op4_ool (s, is_q, rd, rn, rm, rd,0 , gen_helper_gvec_bfmmla); -return ;default :g_assert_not_reached (); }
Signature · 1 line
2.34.1
[PULL 24/29] hw/misc/zynq_slcr: Add boot-mode property
In reply to Peter MaydellFrom: Sai Pavan Boddu <[email protected]>
boot-mode property sets user values into BOOT_MODE register, on hardware these are derived from board switches.
Message-id: [email protected]
--- hw/misc/zynq_slcr.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-)
hw/misc/zynq_slcr.c +21 -1
@@ -24,6 +24,8 @@#include "hw/registerfields.h" #include "hw/qdev-clock.h" #include "qom/object.h" +#include "hw/qdev-properties.h" +#include "qapi/error.h" #ifndef ZYNQ_SLCR_ERR_DEBUG #define ZYNQ_SLCR_ERR_DEBUG 0
@@ -121,6 +123,7 @@ REG32(RST_REASON, 0x250) REG32(REBOOT_STATUS, 0x258) REG32(BOOT_MODE, 0x25c) + FIELD(BOOT_MODE, BOOT_MODE, 0, 4) REG32(APU_CTRL, 0x300)REG32 (WDT_CLK_SEL ,0x304 )
@@ -195,6 +198,7 @@ struct ZynqSLCRState {Clock *ps_clk;Clock *uart0_ref_clk;Clock *uart1_ref_clk; +uint8_t boot_mode; };/*
@@ -371,7 +375,7 @@ static void zynq_slcr_reset_init(Object *obj, ResetType type) s->regs[R_FPGA_RST_CTRL ] =0x01F33F0F ; s->regs[R_RST_REASON ] =0x00000040 ; - s->regs[R_BOOT_MODE ] =0x00000001 ; + s->regs[R_BOOT_MODE ] = s->boot_mode &R_BOOT_MODE_BOOT_MODE_MASK ;/* 0x700 - 0x7D4 */ for (i =0 ; i <54 ; i++) {
@@ -588,6 +592,15 @@ static const ClockPortInitArray zynq_slcr_clocks = { QDEV_CLOCK_END }; +static void zynq_slcr_realize (DeviceState *dev,Error **errp) +{ +ZynqSLCRState *s =ZYNQ_SLCR (dev); + +if (s->boot_mode >0xF ) { +error_setg (errp,"Invalid boot mode %d specified" , s->boot_mode); + } +} +static void zynq_slcr_init (Object *obj) {ZynqSLCRState *s =ZYNQ_SLCR (obj);
@@ -610,15 +623,22 @@ static const VMStateDescription vmstate_zynq_slcr = { } }; +static Property zynq_slcr_props[] = { +DEFINE_PROP_UINT8 ("boot-mode" , ZynqSLCRState, boot_mode,1 ), +DEFINE_PROP_END_OF_LIST (), +}; +static void zynq_slcr_class_init (ObjectClass *klass,void *data) {DeviceClass *dc =DEVICE_CLASS (klass);ResettableClass *rc =RESETTABLE_CLASS (klass); dc->vmsd = &vmstate_zynq_slcr; + dc->realize = zynq_slcr_realize; rc->phases.enter = zynq_slcr_reset_init; rc->phases.hold = zynq_slcr_reset_hold; rc->phases.exit = zynq_slcr_reset_exit; +device_class_set_props (dc, zynq_slcr_props); }static const TypeInfo zynq_slcr_info = {
Signature · 1 line
2.34.1
[PULL 19/29] target/arm: Delete dead code from disas_simd_indexed
In reply to Peter MaydellFrom: Richard Henderson <[email protected]>
MLA, MLS, SQDMULH, SQRDMULH, were converted with 8db93dcd3def and f80701cb44d, and this code should have been removed then.
Message-id: [email protected]
--- target/arm/tcg/translate-a64.c | 93 ---------------------------------- 1 file changed, 93 deletions(-)
target/arm/tcg/translate-a64.c +0 -93
@@ -11976,7 +11976,6 @@ static void disas_simd_indexed(DisasContext *s, uint32_t insn)int h =extract32 (insn,11 ,1 );int rn =extract32 (insn,5 ,5 );int rd =extract32 (insn,0 ,5 ); -bool is_long = false;int index;switch (16 * u + opcode) {
@@ -11990,12 +11989,10 @@ static void disas_simd_indexed(DisasContext *s, uint32_t insn)unallocated_encoding (s);return ; } - is_long = true;break ;case 0x03 :/* SQDMLAL, SQDMLAL2 */ case 0x07 :/* SQDMLSL, SQDMLSL2 */ case 0x0b :/* SQDMULL, SQDMULL2 */ - is_long = true;break ;default :case 0x00 :/* FMLAL */
@@ -12047,96 +12044,6 @@ static void disas_simd_indexed(DisasContext *s, uint32_t insn)if (size ==3 ) {g_assert_not_reached (); - }else if (!is_long) { -/* 32 bit floating point, or 16 or 32 bit integer. -* For the 16 bit scalar case we use the usual Neon helpers and -* rely on the fact that 0 op 0 == 0 with no side effects. -*/ -TCGv_i32 tcg_idx =tcg_temp_new_i32 (); -int pass, maxpasses; - -if (is_scalar) { - maxpasses =1 ; - }else { - maxpasses = is_q ?4 :2 ; - } - -read_vec_element_i32 (s, tcg_idx, rm, index, size); - -if (size ==1 && !is_scalar) { -/* The simplest way to handle the 16x16 indexed ops is to duplicate -* the index into both halves of the 32 bit tcg_idx and then use -* the usual Neon helpers. -*/ -tcg_gen_deposit_i32 (tcg_idx, tcg_idx, tcg_idx,16 ,16 ); - } - -for (pass =0 ; pass < maxpasses; pass++) { -TCGv_i32 tcg_op =tcg_temp_new_i32 (); -TCGv_i32 tcg_res =tcg_temp_new_i32 (); - -read_vec_element_i32 (s, tcg_op, rn, pass, is_scalar ? size :MO_32 ); - -switch (16 * u + opcode) { -case 0x10 :/* MLA */ -case 0x14 :/* MLS */ - { -static NeonGenTwoOpFn *const fns[2 ][2 ] = { - { gen_helper_neon_add_u16, gen_helper_neon_sub_u16 }, - { tcg_gen_add_i32, tcg_gen_sub_i32 }, - }; -NeonGenTwoOpFn *genfn; -bool is_sub = opcode ==0x4 ; - -if (size ==1 ) { -gen_helper_neon_mul_u16 (tcg_res, tcg_op, tcg_idx); - }else { -tcg_gen_mul_i32 (tcg_res, tcg_op, tcg_idx); - } -if (opcode ==0x8 ) { -break ; - } -read_vec_element_i32 (s, tcg_op, rd, pass,MO_32 ); - genfn = fns[size -1 ][is_sub]; -genfn (tcg_res, tcg_op, tcg_res); -break ; - } -case 0x0c :/* SQDMULH */ -if (size ==1 ) { -gen_helper_neon_qdmulh_s16 (tcg_res, tcg_env, - tcg_op, tcg_idx); - }else { -gen_helper_neon_qdmulh_s32 (tcg_res, tcg_env, - tcg_op, tcg_idx); - } -break ; -case 0x0d :/* SQRDMULH */ -if (size ==1 ) { -gen_helper_neon_qrdmulh_s16 (tcg_res, tcg_env, - tcg_op, tcg_idx); - }else { -gen_helper_neon_qrdmulh_s32 (tcg_res, tcg_env, - tcg_op, tcg_idx); - } -break ; -default : -case 0x01 :/* FMLA */ -case 0x05 :/* FMLS */ -case 0x09 :/* FMUL */ -case 0x19 :/* FMULX */ -case 0x1d :/* SQRDMLAH */ -case 0x1f :/* SQRDMLSH */ -g_assert_not_reached (); - } - -if (is_scalar) { -write_fp_sreg (s, rd, tcg_res); - }else { -write_vec_element_i32 (s, tcg_res, rd, pass,MO_32 ); - } - } - -clear_vec_high (s, is_q, rd); }else {/* long ops: 16x16->32 or 32x32->64 */ TCGv_i64 tcg_res[2 ];
Signature · 1 line
2.34.1
[PULL 23/29] MAINTAINERS: Update my family name
In reply to Peter MaydellFrom: Patrick Leis <[email protected]>
Message-id: [email protected]
--- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
MAINTAINERS +1 -1
@@ -2496,7 +2496,7 @@ F: hw/net/tulip.c F: hw/net/tulip.h pca954x -M: Patrick Venture <[email protected]> +M: Patrick Leis <[email protected]> S: Maintained F: hw/i2c/i2c_mux_pca954x.c F: include/hw/i2c/i2c_mux_pca954x.h
Signature · 1 line
2.34.1
Richard Henderson
AppliedQuoted 12 lines · Peter Maydell
The following changes since commit
b6d32a06fc0984e537091cba08f2e1ed9f775d74:Merge tag 'pull-trivial-patches' ofhttps://gitlab.com/mjt0k/qemu into staging (2024-06-30 16:12:24 -0700)are available in the Git repository at:
https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20240701for you to fetch changes up to
58c782de557beb496bfb4c5ade721bbbd2480c72:tests/qtest: Ensure STM32L4x5 EXTI state is correct at the end of QTests (2024-07-01 15:40:54 +0100)
Quoted 14 lines
----------------------------------------------------------------
target-arm queue:
* tests/avocado: update firmware for sbsa-ref and use all cores
* hw/arm/smmu-common: Replacesmmu_iommu_mrwithsmmu_find_sdev
* arm: Fix VCMLA Dd, Dn, Dm[idx]
* arm: Fix SQDMULH (by element) with Q=0
* arm: Fix FJCVTZS vs flush-to-zero
* arm: More conversion of A64 AdvSIMD to decodetree
* arm: EnableFEAT_Debugv8p8for -cpu max
*MAINTAINERS: Update family name for Patrick Leis
* hw/arm/xilinx_zynq: Add boot-mode property
* docs/system/arm: Add a doc for zynq board
* hw/misc: In STM32L4x5 EXTI, correct configurable interrupts
* tests/qtest: fix minor issues in STM32L4x5 tests
Applied, thanks. Please update https://wiki.qemu.org/ChangeLog/9.1 as appropriate.
r~