e178113ff6
Several QOM type names contain ',':
ARM,bitband-memory
etraxfs,pic
etraxfs,serial
etraxfs,timer
fsl,imx25
fsl,imx31
fsl,imx6
fsl,imx6ul
fsl,imx7
grlib,ahbpnp
grlib,apbpnp
grlib,apbuart
grlib,gptimer
grlib,irqmp
qemu,register
SUNW,bpp
SUNW,CS4231
SUNW,DBRI
SUNW,DBRI.prom
SUNW,fdtwo
SUNW,sx
SUNW,tcx
xilinx,zynq_slcr
xlnx,zynqmp
xlnx,zynqmp-pmu-soc
xlnx,zynq-xadc
These are all device types. They can't be plugged with -device /
device_add, except for xlnx,zynqmp-pmu-soc, and I doubt that one
actually works.
They *can* be used with -device / device_add to request help.
Usability is poor, though: you have to double the comma, like this:
$ qemu-system-x86_64 -device SUNW,,fdtwo,help
Trap for the unwary. The fact that this was broken in
device-introspect-test for more than six years until commit e27bd49876
fixed it demonstrates that "the unwary" includes seasoned developers.
One QOM type name contains ' ': "ICH9 SMB". Because having to
remember just one way to quote would be too easy.
Rename the "SUNW,FOO types to "sun-FOO". Summarily replace ',' and '
' by '-' in the other type names.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20210304140229.575481-2-armbru@redhat.com>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
79 lines
2.2 KiB
C
79 lines
2.2 KiB
C
/*
|
|
* ARMv7M CPU object
|
|
*
|
|
* Copyright (c) 2017 Linaro Ltd
|
|
* Written by Peter Maydell <peter.maydell@linaro.org>
|
|
*
|
|
* This code is licensed under the GPL version 2 or later.
|
|
*/
|
|
|
|
#ifndef HW_ARM_ARMV7M_H
|
|
#define HW_ARM_ARMV7M_H
|
|
|
|
#include "hw/sysbus.h"
|
|
#include "hw/intc/armv7m_nvic.h"
|
|
#include "target/arm/idau.h"
|
|
#include "qom/object.h"
|
|
|
|
#define TYPE_BITBAND "ARM-bitband-memory"
|
|
OBJECT_DECLARE_SIMPLE_TYPE(BitBandState, BITBAND)
|
|
|
|
struct BitBandState {
|
|
/*< private >*/
|
|
SysBusDevice parent_obj;
|
|
/*< public >*/
|
|
|
|
AddressSpace source_as;
|
|
MemoryRegion iomem;
|
|
uint32_t base;
|
|
MemoryRegion *source_memory;
|
|
};
|
|
|
|
#define TYPE_ARMV7M "armv7m"
|
|
OBJECT_DECLARE_SIMPLE_TYPE(ARMv7MState, ARMV7M)
|
|
|
|
#define ARMV7M_NUM_BITBANDS 2
|
|
|
|
/* ARMv7M container object.
|
|
* + Unnamed GPIO input lines: external IRQ lines for the NVIC
|
|
* + Named GPIO output SYSRESETREQ: signalled for guest AIRCR.SYSRESETREQ.
|
|
* If this GPIO is not wired up then the NVIC will default to performing
|
|
* a qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET).
|
|
* + Property "cpu-type": CPU type to instantiate
|
|
* + Property "num-irq": number of external IRQ lines
|
|
* + Property "memory": MemoryRegion defining the physical address space
|
|
* that CPU accesses see. (The NVIC, bitbanding and other CPU-internal
|
|
* devices will be automatically layered on top of this view.)
|
|
* + Property "idau": IDAU interface (forwarded to CPU object)
|
|
* + Property "init-svtor": secure VTOR reset value (forwarded to CPU object)
|
|
* + Property "vfp": enable VFP (forwarded to CPU object)
|
|
* + Property "dsp": enable DSP (forwarded to CPU object)
|
|
* + Property "enable-bitband": expose bitbanded IO
|
|
*/
|
|
struct ARMv7MState {
|
|
/*< private >*/
|
|
SysBusDevice parent_obj;
|
|
/*< public >*/
|
|
NVICState nvic;
|
|
BitBandState bitband[ARMV7M_NUM_BITBANDS];
|
|
ARMCPU *cpu;
|
|
|
|
/* MemoryRegion we pass to the CPU, with our devices layered on
|
|
* top of the ones the board provides in board_memory.
|
|
*/
|
|
MemoryRegion container;
|
|
|
|
/* Properties */
|
|
char *cpu_type;
|
|
/* MemoryRegion the board provides to us (with its devices, RAM, etc) */
|
|
MemoryRegion *board_memory;
|
|
Object *idau;
|
|
uint32_t init_svtor;
|
|
bool enable_bitband;
|
|
bool start_powered_off;
|
|
bool vfp;
|
|
bool dsp;
|
|
};
|
|
|
|
#endif
|