summaryrefslogtreecommitdiffstats
path: root/hw
Commit message (Collapse)AuthorAgeFilesLines
* hw/pc.c: fix warnings with _FORTIFY_SOURCEKirill A. Shutemov2009-12-251-3/+12
| | | | | | | | | | | | | | CC i386-softmmu/pc.o cc1: warnings being treated as errors /usr/src/RPM/BUILD/qemu-0.11.92/hw/pc.c: In function 'load_multiboot': /usr/src/RPM/BUILD/qemu-0.11.92/hw/pc.c:614: error: ignoring return value of 'fread', declared with attribute warn_unused_result /usr/src/RPM/BUILD/qemu-0.11.92/hw/pc.c: In function 'load_linux': /usr/src/RPM/BUILD/qemu-0.11.92/hw/pc.c:888: error: ignoring return value of 'fread', declared with attribute warn_unused_result /usr/src/RPM/BUILD/qemu-0.11.92/hw/pc.c:889: error: ignoring return value of 'fread', declared with attribute warn_unused_result make[1]: *** [pc.o] Error 1 Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* PCI: partially revert 2e01c8cf4b076b05013c87723e3fc710b50a0a7aBlue Swirl2009-12-251-5/+3
| | | | | | Bus address conversion was not correct. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* PCI: make pci_mem_base privateBlue Swirl2009-12-252-11/+21
| | | | | | Make pci_mem_base private to PCIBus. Add a function to set it. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Fix Sparse error: dubious one-bit signed bitfieldBlue Swirl2009-12-251-1/+1
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Fix Sparse warning: dubious: !x & yBlue Swirl2009-12-251-1/+1
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* scsi: fix Sparse warning: Initializer entry defined twiceBlue Swirl2009-12-251-2/+2
| | | | | | | Both REWIND and REZERO_UNIT use 0x01, READ_POSITION and PRE_FETCH share 0x34. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* MAC DBDMA: store register values in native endiannessAurelien Jarno2009-12-241-39/+46
| | | | | | | | | | | Store the register values in native endianness, by dropping all the endianness conversion functions, and converting the endianness in dbdma_readl/dbdma_writel instead. Also guard the endianness conversion with TARGET_WORDS_BIGENDIAN to simulate the backward connection of the bus. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* loader: more ignores for rom intended to be loaded by the biosAurelien Jarno2009-12-241-0/+6
| | | | | | | Similarly to what has been done in e405a2ba91b68817cae2a428de55fe9616a4cf37, ignore rom intended to be loaded by the bios in find_rom() and rom_copy(). Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* Don't load options roms intended to be loaded by the bios in qemuAvi Kivity2009-12-241-1/+7
| | | | | | | | The first such option rom will load at address 0, which isn't very nice, and the second will report a conflict and abort, which is horrible. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* e1000: add link to data sheetMichael S. Tsirkin2009-12-231-0/+3
| | | | | | | Link to data sheet at intel.com so people can find it. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* ARM PBX-A9 memory map tweaksPaul Brook2009-12-211-2/+10
| | | | | | | Add core tile memeory to the RealView PBX-A9 board. Document the memeory maps that are known to work with the qemu bootloader. Signed-off-by: Paul Brook <paul@codesourcery.com>
* LAN9118 improvementsPaul Brook2009-12-211-5/+89
| | | | | | | Implement LAN9118 general purpose timer and PHY interrupts. Fix global interrupt status bit. Signed-off-by: Paul Brook <paul@codesourcery.com>
* PPC: Make DCR uint32_tAlexander Graf2009-12-214-34/+34
| | | | | | | | | | | For what I know DCR is always 32 bits wide, so we should also use uint32_t to pass it along the stacks. This fixes a warning when compiling qemu-system-ppc64 with KVM enabled, making it compile without --disable-werror Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* PPC64: Fix alternate timebaseAurelien Jarno2009-12-211-2/+2
| | | | | | | Fix the alternate time base the same way as the default timebase. SPR_ATBL should return a 64-bit value on 64 bit implementations. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* PPC64: Fix timebaseAlexander Graf2009-12-211-2/+2
| | | | | | | | | | | | | | | On PPC we have a 64-bit time base. Usually (PPC32) this is accessed using two separate 32 bit SPR accesses to SPR_TBU and SPR_TBL. On PPC64 the SPR_TBL register acts as 64 bit though, so we get the full 64 bits as return value. If we only take the lower ones, fine. But Linux wants to see all 64 bits or it breaks. This patch makes PPC64 Linux work even after TB crossed the 32-bit boundary, which usually happened a few seconds after bootup. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* ppc64: Change default machine to mac99Andreas Färber2009-12-212-0/+9
| | | | | | | | | Also change the New World default CPU to 970FX for ppc64, since the G4 is a 32-bit CPU. Signed-off-by: Andreas Färber <andreas.faerber@web.de> Acked-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* Multiboot support: Fix rom_copyKevin Wolf2009-12-191-2/+5
| | | | | | | | | ROMs need to be loaded if they are anywhere in the requested area, not only at the very beginning. This fixes Multiboot with ELF kernels that have more than one program header. Signed-off-by: Kevin Wolf <mail@kevin-wolf.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* roms: allow roms to be loaded at address 0Aurelien Jarno2009-12-191-8/+0
| | | | | | | | It was possible to load roms at address 0, but commit 632cf034b401cdd01dae253a8b577fe518e37654 started to forbid that, which broke at least ARM versatile. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* hw/openpic.c: replace tabs by spacesAurelien Jarno2009-12-191-131/+131
| | | | Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* target-ppc: Use interrupts for esccAlexander Graf2009-12-191-5/+1
| | | | | | | | | | | | | When using the escc with Linux, we need interrupts. So instead of creating a dummy device, let's just map them to the openpic we have anyways. This makes Linux on PPC64 with console=ttyPZ0 work. Obviously, this change needs to be reflected in openbios. Patch for that follows this one. Please update the binary then. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* target-ppc: Initialize OpenPIC properlyAlexander Graf2009-12-191-0/+2
| | | | | | | | | | | | When lowering an IRQ line, we search for the line we're supposed to lower. Usually we run into an optimization there that queues up interrupts. This queue ends with -1. Unfortunately we didn't set the first item to -1. This patch fixes this, making interrupts work on PPC64. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* e1000: Don't muck with PCI commmand registerAnthony Liguori2009-12-191-1/+0
| | | | | | | | | Otherwise, the driver does not work in Linux after the INT_DISABLE changes in PCI. Michael Tsirkin had a patch to do this, I'm not sure what happened to it. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* usb-musb: convert fifo to 8bit and add more registersRiku Voipio2009-12-181-57/+107
| | | | | | | | | | | | | | | | | | Convert musb fifo to 8bit to allow 8/16/32bit access MUSB allows reading and writing to the fifo in 32/16/8 bit width. The Linux kernel does this sometimes, most usually at the end of writing the packet to allow packet to end at a odd bytecount. Convert the fifo to 8bit allows removing lots of shifts which shows that the fifo is more natural as 8bit. While at it, add multiple missing register definitions and and cleanup debug prints. Signed-off-by: Riku Voipio <riku.voipio@nokia.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* handle SD CMD5 without error messagesJuha Riihimäki2009-12-181-0/+4
| | | | | | | From: Juha Riihimäki <juha.riihimaki@nokia.com> Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com> Signed-off-by: Riku Voipio <riku.voipio@nokia.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* Make USB hid devices self-poweredRiku Voipio2009-12-182-2/+2
| | | | | | | Simplifies power budget negotiation. Signed-off-by: Riku Voipio <riku.voipio@nokia.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* roms: remove option rom packing logicGerd Hoffmann2009-12-182-61/+50
| | | | | | | | | | | | Now that we load the option roms via fw_cfg, we can stop copying them to the 0xc000 -> 0xe000. The patch does just that. Also the rom loader gets simplified as all remaining users of the rom loader load the bits at a fixed address so the packing and aligning logic can go away. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* roms: use new fw_cfg file xfer support.Gerd Hoffmann2009-12-183-5/+27
| | | | | | | | roms: use fw_cfg for vgabios and option rom loading, additionally to deploying them the traditional way (copy to 0xc0000 -> 0xe0000 range). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* fw_cfg: add API for file transfer.Gerd Hoffmann2009-12-182-2/+62
| | | | | | | | | | | | | | | This patch adds a file transfer interface to fw_cfg. Intended to be used for passing non-pci option roms and vgabios to seabios. Namespace is modeled after the existing cbfs filesystem support in seabios. Reading the new FW_CFG_FILE_DIR entry returns a file list. Fields there are in network byte order (aka bigendian). aliguori: fix fw_cfg.h for multiboot.bin, add proper fw_cfg.h declarations, quiet fprintf() in fw_cfg.c Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* fw_cfg: make calls typesafeGerd Hoffmann2009-12-182-21/+21
| | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* pci romfiles: add property, add default to PCIDeviceInfoGerd Hoffmann2009-12-186-32/+29
| | | | | | | | | | This patch adds a romfile property to the pci bus. It allows to specify a romfile to load into the rom bar of the pci device. The default value comes from a new field in PCIDeviceInfo. The property allows to change the file and also to disable the rom loading using an empty string. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Support PCI based option rom loadingAnthony Liguori2009-12-186-4/+44
| | | | | | | | | | | | | | | | | Currently, we preload option roms into the option rom space in memory. This prevents DDIM from functioning correctly which severely limits the number of roms we can support. This patch introduces a pci_add_option_rom() which registers the PCI_ROM_ADDRESS bar which points to our option rom. It also converts over the cirrus vga adapter, the rtl8139, virtio, and the e1000 to use this new mechanism. The result is that PXE boot functions even with three unique types of cards. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Fix backcompat for hotplug of SCSI controllersDaniel P. Berrange2009-12-181-5/+1
| | | | | | | | | | | | | | | | | | | | SCSI controllers have no trouble existing without any attached disks. This could be achieved with the (legacy) monitor syntax pci_add pci_addr=auto storage if=scsi This is now denied with scsi requires a backing file/device. failed to add if=scsi There is no need for this denial and it breaks compatability with existing QEMU usage, so remove the check for presence of a drive. Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* fdc: fix migration from 0.11Juan Quintela2009-12-181-7/+5
| | | | | | | 0.11 uses as instance ide io_base, get it back Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Revert "fdc: fix vmstate variable passed"Juan Quintela2009-12-181-29/+4
| | | | | | | | | Floppy used the io_base address to register savevm region. This reverts commit 2966b390d0f7cd5e5b971290fcc20685de374228. Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmware: increase cursor buffer size.Dave Airlie2009-12-181-1/+1
| | | | | | | | The cursor pixmap size we calculate later ends up being 4096 dwords long by the looks of it. This boots an F12 LiveCD now. Signed-off-by: Dave Airlie <airlied@linux.ie> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* VMware VGA: Only enable dirty log tracking when fifo is disabledAnthony Liguori2009-12-183-4/+36
| | | | | | | | | | | | This patch enables dirty log tracking whenever it's needed and disables it when it is not. We unconditionally enable dirty log tracking on reset, restart dirty log tracking when PCI IO regions are remapped, and disable/enable it based on commands from the guest. Rebased-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Fix VMware VGA depth computationAnthony Liguori2009-12-181-7/+7
| | | | | | | | | | | | | | | | VMware VGA requires that the depth presented to the guest is the same as the DisplaySurface that it renders to. This is because it performs a very simple memcpy() to blit from one surface to another. We currently hardcode a 24-bit depth. The surface allocator for SDL may, and usually will, allocate a surface with a different depth causing screen corruption. This changes the code to allocate the DisplaySurface before initializing the device which allows the depth of the DisplaySurface to be used instead of hardcoding something. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Make sure to enable dirty log tracking for VMware VGAAnthony Liguori2009-12-181-0/+4
| | | | | | This is needed for VMware VGA to work properly under KVM. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Make sure to enable dirty tracking of VBE vram mappingAnthony Liguori2009-12-185-19/+31
| | | | | | | | | | | | | | | Apparently, VBE maps the VGA vram to a fixed physical location. KVM requires that all mappings of the VGA vram have dirty tracking enabled on them. Any access to the VGA vram through the VBE mapping currently fails to result in dirty page tracking updates causing a black screen. This is the true root cause of VMware VGA not working correctly under KVM and likely also an issue with some of the std-vga black screen issues too. Cirrus does not enable VBE so it would not be a problem when using Cirrus. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Rebased-by: Dave Airlie <airlied@redhat.com>
* vmware: setup PCI BAR 2 for FIFO as per vmware specDave Airlie2009-12-181-5/+30
| | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qdev: improve property error reporting.Gerd Hoffmann2009-12-181-2/+7
| | | | | | | | | | | | Add a error message in case we fail to parse a qdev property. Also make qemu not abort() in case setting a global property can't be set. This used to be a clear programming error. The introduction of the -global switch changed that though, so better exit instead (after printing the new error message). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* usb-net: use qdev for -usbdeviceGerd Hoffmann2009-12-182-34/+47
| | | | | | | | Rebased to master, adapted to device renaming by armbru, no other changes. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Check rom_load_all() return value.Gerd Hoffmann2009-12-181-1/+1
| | | | | | | | Check rom_load_all() return value. Also don't make option rom loading failure fatal. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* defaults: split default_driveGerd Hoffmann2009-12-181-1/+4
| | | | | | | | Split default_drive into default_{floppy,cdrom,sdcard}. Also add QEMUMachine flags to disable them per machine. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qdev: Improve uni-north device namesMarkus Armbruster2009-12-181-12/+12
| | | | | | | Switch to the names suggested by Blue Swirl. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Fix loading of ELF multiboot kernelsKevin Wolf2009-12-182-6/+6
| | | | | | | | | | | | The multiboot implementation assumed that there is only one program header (which contains the entry point) and that the entry point is at the start of the code. This doesn't hold true generally and caused too little data to be loaded. Fix the loading code to pass the whole loaded data to the Multiboot Option ROM. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Revert "pci: interrupt disable bit support"Anthony Liguori2009-12-182-28/+2
| | | | | | | | This reverts commit 0ea5709a32085f7d14901a09d12bd35f9b267607. Per discussion with Michael Tsirkin, this is too risky for 0.12 Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* S390: Bail out without KVMAlexander Graf2009-12-181-0/+7
| | | | | | | | Currently only the S390 KVM target works. To keep users from accidently not using KVM, let's not even initialize the machine when KVM is not used. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* S390: Don't tell guest we're updating config spaceAlexander Graf2009-12-181-1/+1
| | | | | | | | | | | | | Currently we always set the "config space changed" bit to 1 when triggering any virtio interrupt. While that worked in 2.6.27, newer kernels interpret that value as "only the config space changed and nothing else happened". Since we usually trigger interrupts to tell the guest that something did happen, we just not tell it the config space changed for now until we implement the correct callback for that. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* S390: Loop through virtio console devicesAlexander Graf2009-12-181-1/+5
| | | | | | | | | We used to always create one single virtio console device. This breaks when either zero of multiple virtio console devices are requested, so let's use the same code as on x86. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
OpenPOWER on IntegriCloud