Philippe Mathieu-Daudé
7c032bfbe8
hw/mips/Kconfig: Introduce CONFIG_GT64120 to select gt64xxx_pci.c
...
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Reviewed-by: Bernhard Beschow <shentey@gmail.com >
Message-Id: <20221209151533.69516-2-philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
2023-01-13 09:32:32 +01:00
Philippe Mathieu-Daudé
145e2198d7
hw/mips/gt64xxx_pci: Endian-swap using PCI_HOST_BRIDGE MemoryRegionOps
...
GT64120's PCI endianness swapping works on little-endian hosts,
but doesn't on big-endian ones. Instead of complicating how
CFGADDR/CFGDATA registers deal with endianness, use the existing
MemoryRegionOps from hw/pci/pci_host.c. Doing so also reduce the
access to internal PCI_HOST_BRIDGE fields.
Map the PCI_HOST_BRIDGE MemoryRegionOps into the corresponding
CFGADDR/CFGDATA regions in the ISD MMIO and remove the unused
code in the current ISD read/write handlers.
Update the mapping when PCI0_CMD register is accessed (in case
the endianness is changed).
This allows using the GT64120 on a big-endian host (and boot
the MIPS Malta machine in little-endian).
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20230104133935.4639-6-philmd@linaro.org >
2023-01-13 09:31:19 +01:00
Philippe Mathieu-Daudé
65423e6efe
hw/mips/gt64xxx_pci: Accumulate address space changes
...
Single registers access in ISD can produce multiple changes
in the address spaces. To reduce computational effort,
accumulate these as a single memory transaction.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20230104133935.4639-5-philmd@linaro.org >
2023-01-13 09:31:19 +01:00
Philippe Mathieu-Daudé
9f81e43f10
hw/mips/malta: Trace FPGA LEDs/ASCII display updates
...
The FPGA LEDs/ASCII display is mostly used by the bootloader
to show very low-level debug info. QEMU connects its output
to a character device backend, which is not very practical
to correlate with ASM instruction executed, interrupts or
MMIO accesses. Also, the display discard the previous states.
To ease bootloader debugging experience, add a pair of trace
events. Such events can be analyzed over time or diff-ed
between different runs.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20230104133935.4639-4-philmd@linaro.org >
2023-01-13 09:31:19 +01:00
Philippe Mathieu-Daudé
e7a65ba694
hw/mips/malta: Split FPGA LEDs/ASCII display updates
...
No need to refresh the ASCII bar when a LED is toggled
(and vice versa).
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20230104133935.4639-3-philmd@linaro.org >
2023-01-13 09:31:19 +01:00
Philippe Mathieu-Daudé
543d022671
hw/timer/xilinx_timer: Use XpsTimerState instead of 'struct timerblock'
...
This remove a use of 'struct' in the DECLARE_INSTANCE_CHECKER()
macro call, to avoid after a QOM refactor:
hw/timer/xilinx_timer.c:65:1: error: declaration of anonymous struct must be a definition
DECLARE_INSTANCE_CHECKER(struct timerblock, XILINX_TIMER,
^
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Edgar E. Iglesias <edgar@zeroasic.com >
Message-id: 20230109140306.23161-15-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-01-12 17:15:09 +00:00
Philippe Mathieu-Daudé
d2960be0c3
hw/intc/xilinx_intc: Use 'XpsIntc' typedef instead of 'struct xlx_pic'
...
This remove a use of 'struct' in the DECLARE_INSTANCE_CHECKER()
macro call, to avoid after a QOM refactor:
hw/intc/xilinx_intc.c:45:1: error: declaration of anonymous struct must be a definition
DECLARE_INSTANCE_CHECKER(struct xlx_pic, XILINX_INTC,
^
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Edgar E. Iglesias <edgar@zeroasic.com >
Message-id: 20230109140306.23161-14-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-01-12 17:15:09 +00:00
Philippe Mathieu-Daudé
95700465ac
hw/misc/sbsa_ec: Declare QOM macros using OBJECT_DECLARE_SIMPLE_TYPE()
...
This model was merged few days before the QOM cleanup from
commit 8063396bf3 ("Use OBJECT_DECLARE_SIMPLE_TYPE when possible")
was pulled and merged. Manually adapt.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20230109140306.23161-13-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-01-12 17:15:09 +00:00
Philippe Mathieu-Daudé
97b49d3509
hw/misc/sbsa_ec: Rename TYPE_SBSA_EC -> TYPE_SBSA_SECURE_EC
...
The structure is named SECUREECState. Rename the type accordingly.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20230109140306.23161-12-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-01-12 17:15:09 +00:00
Philippe Mathieu-Daudé
c79aa350ea
hw/arm/npcm7xx: Declare QOM macros using OBJECT_DECLARE_SIMPLE_TYPE()
...
NPCM7XX models have been commited after the conversion from
commit 8063396bf3 ("Use OBJECT_DECLARE_SIMPLE_TYPE when possible").
Manually convert them.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20230109140306.23161-11-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-01-12 17:15:09 +00:00
Philippe Mathieu-Daudé
a91179e7a4
hw/arm/bcm2836: Remove definitions generated by OBJECT_DECLARE_TYPE()
...
The typedef and definitions are generated by the OBJECT_DECLARE_TYPE
macro in "hw/arm/bcm2836.h":
20 #define TYPE_BCM283X "bcm283x"
21 OBJECT_DECLARE_TYPE(BCM283XState, BCM283XClass, BCM283X)
The script ran in commit a489d1951c ("Use OBJECT_DECLARE_TYPE when
possible") missed them because they are declared in a different
file unit. Remove them.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20230109140306.23161-10-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-01-12 17:15:09 +00:00
Philippe Mathieu-Daudé
d6b109daee
hw/arm/stellaris: Use CamelCase for STELLARIS_ADC type name
...
Following docs/devel/style.rst guidelines, rename
stellaris_adc_state -> StellarisADCState. This also remove a
use of 'struct' in the DECLARE_INSTANCE_CHECKER() macro call.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20230109140306.23161-9-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-01-12 17:15:09 +00:00
Philippe Mathieu-Daudé
66f02065b7
hw/arm/stellaris: Drop useless casts from void * to pointer
...
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20230109140306.23161-8-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-01-12 17:15:09 +00:00
Philippe Mathieu-Daudé
bded15c91c
hw/intc/omap_intc: Use CamelCase for TYPE_OMAP_INTC type name
...
Following docs/devel/style.rst guidelines, rename
omap_intr_handler_s -> OMAPIntcState. This also remove a
use of 'struct' in the DECLARE_INSTANCE_CHECKER() macro call.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20230109140306.23161-7-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-01-12 17:15:09 +00:00
Philippe Mathieu-Daudé
bb3d1c61ec
hw/gpio/omap_gpio: Use CamelCase for TYPE_OMAP2_GPIO type name
...
Following docs/devel/style.rst guidelines, rename omap2_gpif_s ->
Omap2GpioState. This also remove a use of 'struct' in the
DECLARE_INSTANCE_CHECKER() macro call.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20230109140306.23161-6-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-01-12 17:15:09 +00:00
Philippe Mathieu-Daudé
bbcdf7d038
hw/gpio/omap_gpio: Use CamelCase for TYPE_OMAP1_GPIO type name
...
Following docs/devel/style.rst guidelines, rename omap_gpif_s ->
Omap1GpioState. This also remove a use of 'struct' in the
DECLARE_INSTANCE_CHECKER() macro call.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20230109140306.23161-5-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-01-12 17:15:09 +00:00
Philippe Mathieu-Daudé
a75ed3c430
hw/arm/omap: Drop useless casts from void * to pointer
...
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20230109140306.23161-4-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-01-12 17:15:09 +00:00
Philippe Mathieu-Daudé
28180159ec
hw/gpio/omap_gpio: Add local variable to avoid embedded cast
...
Add a local 'struct omap_gpif_s *' variable to improve readability.
(This also eases next commit conversion).
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20230109140306.23161-3-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-01-12 17:15:09 +00:00
Philippe Mathieu-Daudé
c4d15af196
hw/arm/pxa: Avoid forward-declaring PXA2xxI2CState
...
To avoid forward-declaring PXA2xxI2CState, declare
PXA2XX_I2C before its use in pxa2xx_i2c_init() prototype.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20230109140306.23161-2-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-01-12 17:15:09 +00:00
Philippe Mathieu-Daudé
20f822261a
hw/arm: Remove unreachable code calling pflash_cfi01_register()
...
Since its QOM'ification in commit 368a354f02 ("pflash_cfi0x:
QOMified") the pflash_cfi01_register() function does not fail.
This call was later converted with a script to use &error_fatal,
still unable to fail. Remove the unreachable code.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20230109115316.2235-14-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-01-12 17:03:14 +00:00
Philippe Mathieu-Daudé
65395b3cdd
hw/arm/vexpress: Remove dead code in vexpress_common_init()
...
Upon introduction in commit b8433303fb ("Set proper device-width
for vexpress flash"), ve_pflash_cfi01_register() was calling
qdev_init_nofail() which can not fail. This call was later
converted with a script to use &error_fatal, still unable to
fail. Remove the unreachable code.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20230109115316.2235-13-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-01-12 17:03:14 +00:00
Philippe Mathieu-Daudé
96c85ef86b
hw/arm/z2: Use the IEC binary prefix definitions
...
IEC binary prefixes ease code review: the unit is explicit.
Add the FLASH_SECTOR_SIZE definition.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20230109115316.2235-12-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-01-12 17:03:14 +00:00
Philippe Mathieu-Daudé
d7f1bd196e
hw/arm/omap_sx1: Use the IEC binary prefix definitions
...
IEC binary prefixes ease code review: the unit is explicit.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20230109115316.2235-11-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-01-12 17:03:14 +00:00
Philippe Mathieu-Daudé
9ab15edebb
hw/arm/omap_sx1: Remove unused 'total_ram' definitions
...
The total_ram_v1/total_ram_v2 definitions were never used.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20230109115316.2235-10-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-01-12 17:03:14 +00:00
Philippe Mathieu-Daudé
e0ee64131f
hw/arm/musicpal: Use the IEC binary prefix definitions
...
IEC binary prefixes ease code review: the unit is explicit.
Add the FLASH_SECTOR_SIZE definition.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20230109115316.2235-9-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-01-12 17:03:14 +00:00
Philippe Mathieu-Daudé
c0e3a4bf77
hw/arm/mainstone: Use the IEC binary prefix definitions
...
IEC binary prefixes ease code review: the unit is explicit.
Add the FLASH_SECTOR_SIZE definition.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20230109115316.2235-8-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-01-12 17:03:14 +00:00
Philippe Mathieu-Daudé
38cb336fe9
hw/arm/gumstix: Use the IEC binary prefix definitions
...
IEC binary prefixes ease code review: the unit is explicit.
Add definitions for RAM / Flash / Flash blocksize.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20230109115316.2235-7-philmd@linaro.org
Message-Id: <20200223231044.8003-3-philmd@redhat.com >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-01-12 17:03:14 +00:00
Philippe Mathieu-Daudé
1c2addee1a
hw/arm/gumstix: Improve documentation
...
Add a comment describing the Connex uses a Numonyx RC28F128J3F75
flash, and the Verdex uses a Micron RC28F256P30TFA.
Correct the Verdex machine description (we model the 'Pro' board).
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20230109115316.2235-6-philmd@linaro.org
Message-Id: <20200223231044.8003-3-philmd@redhat.com >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-01-12 17:03:14 +00:00
Philippe Mathieu-Daudé
ec177b7300
hw/arm/collie: Simplify flash creation using for() loop
...
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20230109115316.2235-5-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-01-12 17:03:14 +00:00
Philippe Mathieu-Daudé
50f9b33b1d
hw/arm/collie: Use the IEC binary prefix definitions
...
IEC binary prefixes ease code review: the unit is explicit.
Add definitions for RAM / Flash / Flash blocksize.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20230109115316.2235-4-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-01-12 17:03:14 +00:00
Philippe Mathieu-Daudé
2990bf5da7
hw/arm/pxa2xx: Simplify pxa270_init()
...
Since pxa270_init() must map the device in the system memory,
there is no point in passing get_system_memory() by argument.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20230109115316.2235-3-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-01-12 17:03:14 +00:00
Philippe Mathieu-Daudé
abf8361cf7
hw/arm/pxa2xx: Simplify pxa255_init()
...
Since pxa255_init() must map the device in the system memory,
there is no point in passing get_system_memory() by argument.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20230109115316.2235-2-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-01-12 17:03:14 +00:00
Richard Henderson
ce848378b9
target/arm: Fix sve_probe_page
...
Don't dereference CPUTLBEntryFull until we verify that
the page is valid. Move the other user-only info field
updates after the valid check to match.
Cc: qemu-stable@nongnu.org
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1412
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Message-id: 20230104190056.305143-1-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-01-12 16:50:19 +00:00
Strahinja Jankovic
22bd244a1c
tests/avocado: Add SD boot test to Cubieboard
...
Cubieboard now can boot directly from SD card, without the need to pass
`-kernel` parameter. Update Avocado tests to cover this functionality.
Signed-off-by: Strahinja Jankovic <strahinja.p.jankovic@gmail.com >
Reviewed-by: Niek Linnenbank <nieklinnenbank@gmail.com >
Tested-by: Niek Linnenbank <nieklinnenbank@gmail.com >
Message-id: 20221226220303.14420-8-strahinja.p.jankovic@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-01-12 16:50:19 +00:00
Strahinja Jankovic
bb9271cadb
hw/arm: Allwinner A10 enable SPL load from MMC
...
This patch enables copying of SPL from MMC if `-kernel` parameter is not
passed when starting QEMU. SPL is copied to SRAM_A.
The approach is reused from Allwinner H3 implementation.
Tested with Armbian and custom Yocto image.
Signed-off-by: Strahinja Jankovic <strahinja.p.jankovic@gmail.com >
Reviewed-by: Niek Linnenbank <nieklinnenbank@gmail.com >
Message-id: 20221226220303.14420-7-strahinja.p.jankovic@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-01-12 16:50:19 +00:00
Strahinja Jankovic
28057e490b
hw/arm: Add AXP209 to Cubieboard
...
SPL Boot for Cubieboard expects AXP209 connected to I2C0 bus.
Signed-off-by: Strahinja Jankovic <strahinja.p.jankovic@gmail.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Message-id: 20221226220303.14420-6-strahinja.p.jankovic@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-01-12 16:50:19 +00:00
Strahinja Jankovic
632dfea36b
hw/misc: AXP209 PMU Emulation
...
This patch adds minimal support for AXP-209 PMU.
Most important is chip ID since U-Boot SPL expects version 0x1. Besides
the chip ID register, reset values for two more registers used by A10
U-Boot SPL are covered.
Signed-off-by: Strahinja Jankovic <strahinja.p.jankovic@gmail.com >
Message-id: 20221226220303.14420-5-strahinja.p.jankovic@gmail.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-01-12 16:50:19 +00:00
Strahinja Jankovic
9be8a82c0e
{hw/i2c,docs/system/arm}: Allwinner TWI/I2C Emulation
...
This patch implements Allwinner TWI/I2C controller emulation. Only
master-mode functionality is implemented.
The SPL boot for Cubieboard expects AXP209 PMIC on TWI0/I2C0 bus, so this is
first part enabling the TWI/I2C bus operation.
Since both Allwinner A10 and H3 use the same module, it is added for
both boards.
Docs are also updated for Cubieboard and Orangepi-PC board to indicate
I2C availability.
Signed-off-by: Strahinja Jankovic <strahinja.p.jankovic@gmail.com >
Reviewed-by: Niek Linnenbank <nieklinnenbank@gmail.com >
Message-id: 20221226220303.14420-4-strahinja.p.jankovic@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-01-12 16:50:19 +00:00
Strahinja Jankovic
edd3a59d5b
hw/misc: Allwinner A10 DRAM Controller Emulation
...
During SPL boot several DRAM Controller registers are used. Most
important registers are those related to DRAM initialization and
calibration, where SPL initiates process and waits until certain bit is
set/cleared.
This patch adds these registers, initializes reset values from user's
guide and updates state of registers as SPL expects it.
Signed-off-by: Strahinja Jankovic <strahinja.p.jankovic@gmail.com >
Reviewed-by: Niek Linnenbank <nieklinnenbank@gmail.com >
Message-id: 20221226220303.14420-3-strahinja.p.jankovic@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-01-12 16:50:19 +00:00
Strahinja Jankovic
423ec28bb8
hw/misc: Allwinner-A10 Clock Controller Module Emulation
...
During SPL boot several Clock Controller Module (CCM) registers are
read, most important are PLL and Tuning, as well as divisor registers.
This patch adds these registers and initializes reset values from user's
guide.
Signed-off-by: Strahinja Jankovic <strahinja.p.jankovic@gmail.com >
Reviewed-by: Niek Linnenbank <nieklinnenbank@gmail.com >
Message-id: 20221226220303.14420-2-strahinja.p.jankovic@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-01-12 16:50:19 +00:00
Felipe Balbi
ee5bffa9fc
hw/arm: Add Olimex H405
...
Olimex makes a series of low-cost STM32 boards. This commit introduces
the minimum setup to support SMT32-H405. See [1] for details
[1] https://www.olimex.com/Products/ARM/ST/STM32-H405/
Signed-off-by: Felipe Balbi <balbi@kernel.org >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Alistair Francis <alistair.francis@wdc.com >
Message-id: 20221230145733.200496-3-balbi@kernel.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-01-12 16:50:19 +00:00
Felipe Balbi
829da0dbe3
hw/arm/stm32f405: correctly describe the memory layout
...
STM32F405 has 128K of SRAM and another 64K of CCM (Core-coupled
Memory) at a different base address. Correctly describe the memory
layout to give existing FW images a chance to run unmodified.
Reviewed-by: Alistair Francis <alistair@alistair23.me >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Signed-off-by: Felipe Balbi <balbi@kernel.org >
Message-id: 20221230145733.200496-2-balbi@kernel.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-01-12 16:50:18 +00:00
Peter Maydell
3db29dcac2
Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging
...
* Atomic memslot updates for KVM (Emanuele, David)
* libvhost-user/libvduse warnings fixes (Marcel)
* i386 TCG fixes (Joe, myself)
* Remove compilation errors when -Werror=maybe-uninitialized (Eric)
* fix GLIB_VERSION for cross-compilation (Paolo)
# -----BEGIN PGP SIGNATURE-----
#
# iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmO+hUYUHHBib256aW5p
# QHJlZGhhdC5jb20ACgkQv/vSX3jHroM5+Qf9HIy2QDdGZJ1fA3AUhp7bCJgotlRF
# 2NMFwo3P/Vwe4qMzzRGkMpsDLFhJx6j1V+sSyeLNxCPtidHccFcmKJOlTqmGeT0k
# HccK07cgAXSZUtvog2xid7PeNpi8OQjKih2Gn/FnN9Tjtad7yMYfXO3O5ttkRV+7
# F8qXBkm4J74l5zs+UMOXUj9y4PudjRFPS0q/lti82eg8mUZ33BZtBkP18Qjq45GM
# wLcemfId0Z6e4s4fmVeTobZ31ltz/B6HDkoD59pQSK6QW2VBIAoO64Hw6FdZnu5W
# PltBsDy5cboKHibkb/ySZQUMhb7UemKFyf7eRWkdlnSSHHFdL/K4x7x7DA==
# =0b+g
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed 11 Jan 2023 09:45:42 GMT
# gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
# gpg: issuer "pbonzini@redhat.com "
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org >" [full]
# gpg: aka "Paolo Bonzini <pbonzini@redhat.com >" [full]
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1
# Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83
* tag 'for-upstream' of https://gitlab.com/bonzini/qemu : (29 commits)
configure: remove backwards-compatibility code
target/i386: fix operand size of unary SSE operations
libvduse: Add extra compiler warnings
libvhost-user: Add extra compiler warnings
libvhost-user: Fix assignment in vring_set_avail_event
libvduse: Fix assignment in vring_set_avail_event
libvduse: Switch to unsigned int for inuse field in struct VduseVirtq
libvduse: Provide _GNU_SOURCE when compiling outside of QEMU
libvhost-user: Change dev->postcopy_ufd assignment to make it C90 compliant
libvhost-user: Declare uffdio_register early to make it C90 compliant
libvhost-user: Use unsigned int i for some for-loop iterations
libvhost-user: Cast rc variable to avoid compiler warning
libvhost-user: Replace typeof with __typeof__
libvhost-user: Provide _GNU_SOURCE when compiling outside of QEMU
hw/display: avoid creating empty loadable modules
enforce use of G_GNUC_PRINTF attributes
tests: add G_GNUC_PRINTF for various functions
util/error: add G_GNUC_PRINTF for various functions
tools/virtiofsd: add G_GNUC_PRINTF for logging functions
hw/xen: use G_GNUC_PRINTF/SCANF for various functions
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-01-12 13:51:36 +00:00
Peter Maydell
a35fa426ee
Merge tag 'nvme-next-pull-request' of https://gitlab.com/birkelund/qemu into staging
...
hw/nvme updates
# -----BEGIN PGP SIGNATURE-----
#
# iQEzBAABCgAdFiEEUigzqnXi3OaiR2bATeGvMW1PDekFAmO+anUACgkQTeGvMW1P
# Del4HAf/eqW92bf04CpXPzLMG38+FoYQgwkH8Lp390JlSM6kjv3DgPM2ygJXIEYr
# dV0KQpTcPRGAVCuXCSOUd6FTkAYdcPVtOeJeYhldEYj9cc9Y/9tvcBMthFBkiCU/
# 66TL7JEgFmOfVMrLypYpfrPHCN0lQVX+i2+Qruospg6itubAKcYdJq+Hx2WWHzcC
# hl/qNgSSIGlhQi21ada1iCUC8Q3TZzo54M+0tW4zfybzsG+eNM+ouKDl/qOHtQgP
# ON/ef9dl+0Dum1l5z7O+sPiXBzZRJR7V+jZOsbf0A98fxqmuu3YacVrH6mY/Zmdx
# e1xexJt6PVXaIKtoZQKRVn2C0ITjXA==
# =AvaO
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed 11 Jan 2023 07:51:17 GMT
# gpg: using RSA key 522833AA75E2DCE6A24766C04DE1AF316D4F0DE9
# gpg: Good signature from "Klaus Jensen <its@irrelevant.dk >" [full]
# gpg: aka "Klaus Jensen <k.jensen@samsung.com >" [full]
# Primary key fingerprint: DDCA 4D9C 9EF9 31CC 3468 4272 63D5 6FC5 E55D A838
# Subkey fingerprint: 5228 33AA 75E2 DCE6 A247 66C0 4DE1 AF31 6D4F 0DE9
* tag 'nvme-next-pull-request' of https://gitlab.com/birkelund/qemu :
hw/nvme: cleanup error reporting in nvme_init_pci()
hw/nvme: clean up confusing use of errp/local_err
hw/nvme: fix missing cq eventidx update
hw/nvme: fix missing endian conversions for doorbell buffers
hw/nvme: rename shadow doorbell related trace events
hw/nvme: use QOM accessors
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-01-11 16:41:13 +00:00
Paolo Bonzini
75cc286485
configure: remove backwards-compatibility code
...
The cmd_line.txt mangling is only needed when rebuilding from very old
trees and is kept mostly as an example of how to extend it. However,
Meson 0.63 introduces a deprecation mechanism for meson_options.txt
that can be used instead, so get rid of our home-grown hack.
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2023-01-11 10:44:35 +01:00
Paolo Bonzini
3d304620ec
target/i386: fix operand size of unary SSE operations
...
VRCPSS, VRSQRTSS and VCVTSx2Sx have a 32-bit or 64-bit memory operand,
which is represented in the decoding tables by X86_VEX_REPScalar. Add it
to the tables, and make validate_vex() handle the case of an instruction
that is in exception type 4 without the REP prefix and exception type 5
with it; this is the cas of VRCP and VRSQRT.
Reported-by: yongwoo <https://gitlab.com/yongwoo36 >
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1377
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2023-01-11 10:44:35 +01:00
Marcel Holtmann
8d5666d76b
libvduse: Add extra compiler warnings
...
In case libvhost-user is used externally, that projects compiler
warnings might be more strict. Enforce an extra set of compiler warnings
to catch issues early on.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org >
Suggested-by: Paolo Bonzini <pbonzini@redhat.com >
Message-Id: <08daa1896ad8824e17d57d6a970bc0b4bee73ece.1671741278.git.marcel@holtmann.org >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2023-01-11 10:44:35 +01:00
Marcel Holtmann
722b62d97d
libvhost-user: Add extra compiler warnings
...
In case libvhost-user is used externally, that projects compiler
warnings might be more strict. Enforce an extra set of compiler warnings
to catch issues early on.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org >
Suggested-by: Paolo Bonzini <pbonzini@redhat.com >
Message-Id: <737ebf2e697f8640558e6f73d96a692711f548f6.1671741278.git.marcel@holtmann.org >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2023-01-11 10:44:35 +01:00
Marcel Holtmann
950a2f2eff
libvhost-user: Fix assignment in vring_set_avail_event
...
Since it was proposed to change the code in libvduse.c to use memcpy
instead of an assignment, the code in libvhost-user.c should also be
changed to use memcpy.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org >
Suggested-by: Paolo Bonzini <pbonzini@redhat.com >
Message-Id: <502b22723264db064e4b05008233a9c1f2f8aaaa.1671741278.git.marcel@holtmann.org >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2023-01-11 10:44:35 +01:00
Marcel Holtmann
86e61e4233
libvduse: Fix assignment in vring_set_avail_event
...
Since the assignment is causing a compiler warning, fix it by using
memcpy instead.
CC libvduse.o
libvduse.c: In function ‘vring_set_avail_event’:
libvduse.c:603:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasin]
603 | *((uint16_t *)&vq->vring.used->ring[vq->vring.num]) = htole16(val);
| ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Marcel Holtmann <marcel@holtmann.org >
Suggested-by: Xie Yongji <xieyongji@bytedance.com >
Suggested-by: Paolo Bonzini <pbonzini@redhat.com >
Message-Id: <4a0fe2a6436464473119fdbf0bc4076b36fbb37f.1671741278.git.marcel@holtmann.org >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2023-01-11 10:44:35 +01:00