History | View | Annotate | Download (26 kB)
qom: Unify type registration
Replace device_init() with generalized type_init().
While at it, unify naming convention: type_init([$prefix_]register_types)Also, type_init() is a function, so add preceding blank line wherenecessary and don't put a semicolon after the closing brace....
qdev: register all types natively through QEMU Object Model
This was done in a mostly automated fashion. I did it in three steps and thenrebased it into a single step which avoids repeatedly touching every file inthe tree.
The first step was a sed-based addition of the parent type to the subclass...
sysbus: apic: ioapic: convert to QEMU Object Model
This converts three devices because apic and ioapic are subclasses of sysbus.Converting subclasses independently of their base class is prohibitively hard.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
sysbus: rename sysbus_init_mmio_region() to sysbus_init_mmio()
Signed-off-by: Avi Kivity <avi@redhat.com>
char: qemu_chr_ioctl() -> qemu_chr_fe_ioctl()
char: rename qemu_chr_write() -> qemu_chr_fe_write()
escc: replace DPRINTFs with tracepoints
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
escc: avoid structure holes spotted by pahole
Edited report from pahole on amd64 host:struct ChannelState {... ChnType type; /* 32 4 */
/* XXX 4 bytes hole, try to pack /... uint8_t rregs[16]; / 66 16 */...
ppc: convert to memory API
Reviewed-by: Richard Henderson <rth@twiddle.net>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
escc: fix interrupt flags
Recent PowerPC kernel end up in kernel panic during boot in -nographicmode. In this mode the second serial port is used as the udbg console,and thus a few characters are sent on this port. This activates thetx interrupt flag, and later choke the Linux kernel, as it was not...
Add endianness as io mem parameter
As stated before, devices can be little, big or native endian. Thetarget endianness is not of their concern, so we need to push thingsdown a level.
This patch adds a parameter to cpu_register_io_memory that allows adevice to choose its endianness. For now, all devices simply choose...
sparc escc IUS improvements (SunOS 4.1.4 fix)
According to scc_escc_um.pdf: - Reset Highest IUS must update irq status to allow processing of the next priority interrupt. - rx interrupt has always higher priority than tx on same channel
The documentation only explicitly says that Reset Highest IUS...
escc: don't use reserved _t suffix
sparc32 (mostly): remove unneeded calls to device reset
escc: add chipset docs
escc: convert to VMState, vmsd and reset
New qdev_init_nofail()
Like qdev_init(), but terminate program via hw_error() instead ofreturning an error value.
Use it instead of qdev_init() where terminating the program on failureis okay, either because it's during machine construction, or because...
Revert "Get rid of _t suffix"
In the very least, a change like this requires discussion on the list.
The naming convention is goofy and it causes a massive merge problem. Somethinglike this must be presented on the list first so people can provide input...
Get rid of _t suffix
Some not so obvious bits, slirp and Xen were left alone for the timebeing.
Signed-off-by: malc <av1474@comtv.ru>
escc: fix another coding style nit
Fix another place with =- to be "= ".to avoid confusion with old-style "=" (which we also have, and needs to be fixed).
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
escc: fix coding style nit
Put space between = and - assigning a negative numberto avoid confusion with old-style "-=" (which we also have, and needs to be fixed).
escc: fix IRQ routing, broken by 6c319c82223a1766c5d64a20051e5c6ab7b53951
The logic of Zilog makes channel B the first device and channel A thesecond one.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
qdev: add return value to init() callbacks.
Sorry folks, but it has to be. One more of these invasive qdev patches.
We have a serious design bug in the qdev interface: device initcallbacks can't signal failure because the init() callback has noreturn value. This patch fixes it....
Make CPURead/WriteFunc structure 'const'
Unbreak Sparc32 and PPC
Convert qdev ptr type to chr, allow a NULL pointer.
qdev/prop: convert escc.c to helper macros.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Message-Id:
Sparc32: fix escc devices broken by ee6847d19be16c789b8bd4e553b7cd6701ba1245
qdev: rework device properties.
This patch is a major overhaul of the device properties. The propertiesare saved directly in the device state struct now, the linked list ofproperty values is gone.
Advantages: * We don't have to maintain the list with the property values....
Sparc32/PPC: convert escc to qdev
Revert "Introduce reset notifier order"
This reverts commit 8217606e6edb49591b4a6fd5a0d1229cebe470a9 (andupdates later added users of qemu_register_reset), we solved theproblem it originally addressed less invasively.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
Remove io_index argument from cpu_register_io_memory()
The parameter is always zero except when registering the three internalio regions (ROM, unassigned, notdirty). Remove the parameter to reducethe API's power, thus facilitating future change.
Signed-off-by: Avi Kivity <avi@redhat.com>...
Introduce reset notifier order
Add the parameter 'order' to qemu_register_reset and sort callbacks onregistration. On system reset, callbacks with lower order will beinvoked before those with higher order. Update all existing users to thestandard order 0....
Replace gcc variadic macro extension with C99 version
hw: remove error handling from qemu_malloc() callers (Avi Kivity)
Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6529 c046a42c-6fe2-441c-8c8c-71466251a162
escc: allow one IRQ per serial channel
The Z85C30 on the PowerMAC machines have one interrupt per serialchannel, while the Sparc machines have only one for both. Allow theemulated device to use one IRQ per channel.
Patch by Laurent Vivier.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6295 c046a42c-6fe2-441c-8c8c-71466251a162
ESCC: swap the two CharDriverState arguments
Swap the two CharDriverState arguments so that the first argumentcorresponds to the channel A and the second argument to the channel B.
Modify hw/sun4m.c accordingly.
This fixes the order of the serial ports on the PPC machines....
Rename slavio_serial functions to escc, add clock rate and it_shift parameters
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6270 c046a42c-6fe2-441c-8c8c-71466251a162
Rename slavio_serial to escc
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6269 c046a42c-6fe2-441c-8c8c-71466251a162