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>
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>
Similarly to what has been done in e405a2ba91,
ignore rom intended to be loaded by the bios in find_rom() and rom_copy().
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
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>
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>
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>
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>
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>
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>
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>
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>
It was possible to load roms at address 0, but commit
632cf034b4 started to forbid that, which
broke at least ARM versatile.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
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>
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>
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>
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>
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 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>
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>
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>
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>
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>
Floppy used the io_base address to register savevm region.
This reverts commit 2966b390d0.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
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>
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>
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>
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>
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>
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.
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>
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>