summaryrefslogtreecommitdiff
path: root/hw
AgeCommit message (Collapse)AuthorFilesLines
2009-10-27qdev: add qdev_prop_exists()Gerd Hoffmann2-0/+6
Function test whenever a driver has a specific property. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27ne2k_isa: use qdev properties for configuration.Gerd Hoffmann3-15/+12
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27qdev/net: common nic property bitsGerd Hoffmann1-0/+9
Add a new type for properties common to all nics. Add helper functions and macros to deal with it. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27qdev: add vlan propertyGerd Hoffmann2-0/+45
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27qdev: add netdev propertyGerd Hoffmann2-0/+40
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27qdev: mac addr property fixupsGerd Hoffmann2-11/+23
Make the mac property use the newly added type for the mac address. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27eepro100: Restructure codeStefan Weil1-24/+30
This patch only moves about 150 lines of code from function eepro100_cu_command to a new function action_command. A goto statement was replaced by a for loop. There are no functional changes. Nor did I change comments starting with // (they will be removed by future patches). Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-25sparc32: tcx: remove unused include directiveBlue Swirl1-1/+0
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-10-24sparc32: convert sbi to VMState, vmsd and vmstate resetBlue Swirl1-31/+15
Also remove unused include directive. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-10-24sparc32: convert Sun4c interrupt controller to reset + vmsdBlue Swirl1-5/+7
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-10-24sparc32: convert interrupt controller to reset + vmsdBlue Swirl1-5/+7
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-10-24sparc32: convert IOMMU to reset + vmsdBlue Swirl1-5/+6
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-10-24sparc32: convert DMA controller to reset + vmsd, fix reset on initBlue Swirl1-5/+6
Add a missing call to reset on device init. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-10-24m48t59: convert to vmstate resetBlue Swirl1-4/+19
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-10-24sparc32: convert slavio_timer to reset + vmsdBlue Swirl1-5/+6
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-10-24fdc: convert to reset + vmsdBlue Swirl1-8/+29
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-10-24esp: convert to reset + vmsdBlue Swirl1-8/+16
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-10-24sparc32: convert cs4231 to VMState, vmsd and resetBlue Swirl1-33/+19
Also remove unused include directive. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-10-24escc: add chipset docsBlue Swirl1-0/+4
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-10-24escc: convert to VMState, vmsd and resetBlue Swirl1-62/+38
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-10-24sparc32: add chipset docs for eccmemctlBlue Swirl1-0/+4
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-10-24sparc32: convert slavio_misc to reset + vmsdBlue Swirl1-6/+6
Also remove unused include directive. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-10-24sparc32: convert eccmemctl to reset + vmsdBlue Swirl1-6/+6
Also remove unused include directive. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-10-24sparc64: remove unused variablesBlue Swirl1-3/+0
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-10-21qdev: add string property.Gerd Hoffmann2-0/+32
Patchworks-ID: 35755 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-21char: rename CHR_EVENT_RESET to CHR_EVENT_OPENEDAmit Shah2-2/+2
The char event RESET is emitted when a char device is opened. Give it a better name. Patchworks-ID: 35287 Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-18Suppress warnings about 'warn_unused_result' attribute directiveBlue Swirl1-1/+1
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-10-15MIPS jazz: create isa busRoy Tam1-0/+2
As i8259 in mips_jazz.c is not correctly connected to the isa bus, the mc146818rtc isa devices fails to be created. Signed-off-by: Roy Tam <roytam@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-10-15multiboot: Limit number of multiboot modulesAdam Lackorzynski1-1/+8
Add size checks to avoid overwriting the multiboot structure when too many modules are loaded. Patchworks-ID: 35700 Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-15multiboot: Fix cmdline of modulesAdam Lackorzynski1-1/+1
Fix address specified for cmdline value of module in multiboot structure. Patchworks-ID: 35699 Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-15pcnet: Extend hardware resetJan Kiszka1-0/+3
Update the IRQ state and stop the poll timer on reset. Moreover, register the reset function with qemu. Patchworks-ID: 35462 Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-15net: allow NICs to be connected to netdevsMark McLoughlin7-9/+16
Introduce a 'peer' member to VLANClientState as an alternative to a vlan. The idea being that packets are transfered directly from peer clients rather than going through a vlan. Patchworks-ID: 35516 Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-15net: handle -netdevice optionsMark McLoughlin1-1/+1
Same as for -net except for: - only tap, user, vde and socket types are supported - the vlan parameter is not allowed - the name parameter is not allowed but the id parameter is required Patchworks-ID: 35517 Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-15net: remove id field from NICInfoMark McLoughlin1-2/+2
Just use the name field instead since we now use the id paramater as the name, if supplied. Only implication with this change is that if id is not supplied, the value of the name paramater is used as an id. Patchworks-ID: 35512 Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-15hotplug: safely iterate bus's sibling list while removing a deviceMark McLoughlin1-2/+2
Without this, I'm seeing a segfault when unpluging a NIC. Cc: Gerd Hoffmann <kraxel@redhat.com> Patchworks-ID: 35519 Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-15eepro100: Remove unused device status entriesStefan Weil1-74/+20
Once upon the time when QEMU hacking was fun there was a brave knight who wanted to have a driver for a special intel nic. So he started by cloning ne2000.c which also meant that the new born eepro100.c was immediately three years old. Other knights who also wanted to have fun and take their part in the battle thought that it would be a good idea to remove stupid code which says "missing nic load, missing nic save". They saved everything they saw, man and women, ne2000 code and runtime address offsets, and put all saved elements in a prison called vm data. When the first knight came back and noticed the unhappy prisoners, he wanted to set them free. But the keepers of the keys told him that they would have to stay there forever for compatibility reasons. So our brave knight now takes a new effort to save the souls of the poor prisoners by removing their names. Their bodies will have to rot in the dungeons of compatibility forever, watched by the keepers of the keys. Patchworks-ID: 35635 Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-14scsi disk block descriptor v2Artyom Tarasenko1-1/+21
The SCSI-2 documentation suggests, that although the block descriptor is optional for an arbitrary SCSI-2 device (chapter 8.2.10, http://ldkelley.com/SCSI2/SCSI2/SCSI2/SCSI2/SCSI2-08.html ) it is mandatory for a disk: chapters 9.1.2, 9.3.3 ( http://ldkelley.com/SCSI2/SCSI2/SCSI2/SCSI2-09.html ) don't say "optional" any more, just "The block descriptor in the MODE SENSE data describes the block lengths that are used on the medium." v2: limit the number of sectors reported in the block descriptor to 24 bits. Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-10-13Add some chipset doc linksBlue Swirl2-0/+17
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-10-12Fixed wacom emulationFrançois Revol1-14/+24
- for absolute mode, scale coordinates to the real device maximum values, since some drivers (on Haiku and Linux at least) need them as such, and the HID descriptor is boggus on some models anyway, - keep the coordinates even when no button is pressed, on real tablet the pen is sensed on the surface even without direct contact, and drivers expect this, - map left button to pressure according to what the Haiku driver wants, - map the right button to the pen button, - map the middle button to the eraser, - use asynchronous reporting as the hid code does, stops the Haiku driver (and probably others) from spending 50% cpu polling for changes. Signed-off-by: François Revol <revol@free.fr> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-12rom loader: also try filename as-is.Gerd Hoffmann1-2/+1
In case qemu_find_file fails try to open the file as-is. Patchworks-ID: 35263 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-12rom loader: fix sparc -kernel boot.Gerd Hoffmann14-24/+54
Changes: (1) register pstrcpy_targphys() in rom list, it is used for kernel command lines by a number of architectures. (2) add rom_ptr() function to get a pointer for applying changes to loaded images. Needed for example to tell the linux kernel where it finds the initrd image by updating the header. (3) make sparc use rom_ptr for initrd setup. booting sparc-test works now, and 'info roms' shows this: (qemu) info roms addr=0000000000000000 size=0x2a3828 mem=ram name="phdr #0: vmlinux-2.6.11+tcx" addr=00000000007ff000 size=0x00000e mem=ram name="cmdline" addr=0000000000800000 size=0x400000 mem=ram name="/root/qemu-test/sparc-test/linux.img" addr=0000000070000000 size=0x0e4000 mem=rom name="phdr #0: /home/kraxel/projects/qemu/build-zfull/pc-bios/openbios-sparc32" reboot via 'system_reset' works too. Patchworks-ID: 35262 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-12TARGET_I386 is always defined if TARGET_X86_64 is definedJuan Quintela3-4/+4
Patchworks-ID: 35378 Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-12ide: BMDMAState don't need a pci_dev field anymoreJuan Quintela3-3/+0
Patchworks-ID: 35306 Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-12ide: cmd646 ->unit has just the value that we wantJuan Quintela1-2/+2
Patchworks-ID: 35307 Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-12ide: cmd646 we can get the pci device with container_ofJuan Quintela1-6/+11
Patchworks-ID: 35305 Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-12ide: 'secondary' field is only used by cmd646Juan Quintela1-1/+1
Patchworks-ID: 35303 Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-12ide: PCIIDEState type field is not needed anymoreJuan Quintela3-30/+11
We have split the functions that needed it for cmd646 Patchworks-ID: 35302 Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-12ide: split cmd646 and piix from pci.cJuan Quintela3-338/+478
This patch splits cmd646 specific code from pci.c. This patch splits piix4 specific code from pci.c. And compile new piix.o and cmd646.o when they are needed. The only change that is not code movemet is removal of cmd646 specific parts in bmdma_readb/writeb for piix. Patchworks-ID: 35301 Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-12ide: export needed ide-pci functions for splitJuan Quintela2-10/+20
Patchworks-ID: 35300 Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-12ide: create ide/pci.h for common ide pci definitionsJuan Quintela2-13/+19
Patchworks-ID: 35299 Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>