aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-09-23fix buildversion.shrel-1.7.3.21.7.3-stableGerd Hoffmann1-1/+1
Recent git versions place the submodule git repos into the .git/modules directory of the toplevel repo. In that case .git of the seabios tree isn't a directory, but a regular file, saying where the gitdir is. Extent the git check to also allow .git being a regular file, so buildversion.sh works correctly when called within the qemu submodule. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> (cherry picked from commit 0b3607f89ac24f84f8b22ffaadb4f0fd111bda24)
2013-09-16ahci: add missing check for allocation failureGerd Hoffmann1-9/+16
Triggerable by creating a virtual machine with *lots* of ahci controllers and disks. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> (cherry picked from commit ce12eaf2044d6aae08795403ecbb888d2b6527ff)
2013-08-20apm: fix shutdownGerd Hoffmann4-0/+14
Qemu commit 9ee59f3 removed the bochs bios apm interface emulation at port 0x8900. That broke poweroff via APM. Fix it by powering off the machine using the acpi pm control register. Old code is left in, so seabios wil try both poweroff methods. Cleaning that eventually up is left for another patch, after checking it isn't needed. Qemu never implemented "Standby" and "Suspend", only "Shutdown", so it looks like there might be non-qemu use cases (bochs probably). Easiest way to test this is the syslinux poweroff module; modern linux distros usually have CONFIG_APM turned off. Reported-by: Sebastian Herbszt <herbszt@gmx.de> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> (cherry picked from commit 5b63109242042372c1d6c3d23602e980f1c9637b) Conflicts: src/acpi.c src/pciinit.c
2013-08-09Fix bug in CBFS file walking with compressed files.rel-1.7.3.1Kevin O'Connor1-1/+1
The file walking code was incorrectly using the uncompressed file size when searching for the next file. Signed-off-by: Kevin O'Connor <kevin@koconnor.net> (cherry picked from commit 1a113e1144113348e04cbe39fa81a448049e82a0)
2013-08-09acpi: sync FADT flags from PIIX4 to Q35Michael S. Tsirkin1-3/+3
The following commits updated the FADT flags for PIIX4: commit c7be281b3be0f2013aa4b5d5f400981a1adb6e63 Drop FIX_RTC flag from FADT. commit a4e2b9adbba95c2d783761e84444bbb3c8d6107b enable USE_PLATFORM_CLOCK bit in FADT flags Q35 support was originally written before these commits in seabios, PIIX got updated, Q35 didn't. QEMU uses the same clock for both so there's no reason for these bits to differ. Sync them up. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> (cherry picked from commit ed88f6515c18d9520efa4a41ccb70038dfbe43f9)
2013-08-08Fix USB EHCI detection that was broken in hlist conversion of PCIDevices.Kevin O'Connor2-1/+2
Make sure the PCI device list is ordered in bus order. Don't iterate past the end of the list when detecting EHCI devices. Signed-off-by: Kevin O'Connor <kevin@koconnor.net> (cherry picked from commit 2a9aeabdfb34374ecac25e7a8d21c9e368618cd4)
2013-06-13Minor - remove debugging dprintf added to pciinit.c.rel-1.7.3Kevin O'Connor1-2/+0
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-06-13Another fix for hlist_for_each_entry_safe.Kevin O'Connor4-8/+16
Although the previous patch does fix hlist_for_each_entry_safe for the common case, it doesn't work correctly when deleting the current node. To fix this, introduce two macros - hlist_for_each_entry_safe for iterating through a list that can be modified, and hlist_for_each_entry_pprev for those users that only need access to the "pprev" pointer. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-06-13make qemu_cfg_init depend on QEMU_HARDWARE instead of QEMUKevin O'Connor1-1/+4
Gets qemu features like direct kernel boot and boot ordering going when seabios runs on coreboot. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-06-13tweak coreboot qemu detectionGerd Hoffmann1-1/+1
I have patches for coreboot in the queue adding q35 support there, which will change the mainboard names (adding the detected chipset). Make SeaBIOS check the mainboard name starts with "QEMU" instead of doing a full string match to handle this. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-06-13Convert pciinit.c to use standard list manipulation code.Kevin O'Connor1-34/+30
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-06-13Fix error in hlist_for_each_entry_safe macro.Kevin O'Connor1-2/+1
Fix broken macro - it did not work correctly at all. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-06-13Revert "Convert pciinit.c to use standard list manipulation code."Kevin O'Connor1-30/+34
This reverts commit aab42152881dc62b37f1833e79cbdb3dfa51603b.
2013-06-12coreboot: add qemu detectionGerd Hoffmann1-0/+5
2013-06-12config: allow DEBUG_IO for !QEMUGerd Hoffmann2-2/+3
Make DEBUG_IO depend on QEMU_HARDWARE instead of QEMU, so it can be enabled for seabios builds running indirectly (coreboot, csm) on qemu. Add runtime check for PF_QEMU to debug port console to make sure we don't poke on random ports on physical hardware. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-06-08Convert PCIDevices list to use standard list manipultion code.Kevin O'Connor6-15/+15
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-06-08Convert pciinit.c to use standard list manipulation code.Kevin O'Connor1-34/+30
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-06-08Convert boot.c to use standard list manipulation code.Kevin O'Connor1-20/+17
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-06-08Convert stacks.c to use standard list manipulation code.Kevin O'Connor1-17/+15
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-06-08Introduce helper function have_threads() in stacks.c.Kevin O'Connor1-10/+12
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-06-08Minor - relocate code in stacks.c to keep low-level thread code together.Kevin O'Connor1-52/+57
Just code movement - no actual code changes. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-06-08Introduce and convert pmm code to use standard list helpers.Kevin O'Connor3-48/+108
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-06-08Minor - move "tracked memory alloc" code in pmm.c.Kevin O'Connor1-98/+98
Move the "pmm_malloc" code closer to the low level alloc functions it calls. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-06-08Minor - explicitly close files in buildrom.py.Kevin O'Connor1-0/+2
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-04-30Add pvpanic device driverHu Tao2-0/+49
pvpanic device is used to notify host(qemu) when guest panic happens. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
2013-03-30acpi: Use cpu_to_leXX() consistently.Kevin O'Connor2-26/+25
Audit the ACPI code and ensure that all multi-byte fields do proper byte swabbing. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-03-30acpi: Remove dead code with descriptions of bit flags.Kevin O'Connor1-25/+1
Remove dead code from acpi table definitions - the ACPI specification is the best place to get descriptions of the fields and tables anyway. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-03-30acpi: Move ACPI table definitions from acpi.c to acpi.h.Kevin O'Connor2-185/+175
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-03-30Use container_of on romfile entries.Kevin O'Connor3-44/+57
Create cbfs and fw_cfg specific romfile_s wrappers instead of using private variables directly in romfile_s. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-03-23Cleanup QEMU_CFG_NUMA fw_cfg processing - split into two romfile entries.Kevin O'Connor2-13/+19
The QEMU_CFG_NUMA fw_cfg entry is actually two separate tables in one fw_cfg entry - a table for cpu affinity and a table for the memory map. Create two romfile entries to make that more clear. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-03-22acpi: make default DSDT optionalMichael S. Tsirkin2-1/+12
Since commit f7e4dd6c18ccfbaf6cd2f5eaaed2b77cabc8a406 QEMU loads its own copy of DSDT, so let's not build in PIIX. This makes building in the DSDT an option, default to on (built-in). If no one complains for a while, we'll be able to switch it off and then maybe remove altogether. With CONFIG_ACPI_DSDT = y Total size: 127348 Fixed: 58892 Free: 3724 (used 97.2% of 128KiB rom) With CONFIG_ACPI_DSDT = n Total size: 122844 Fixed: 58884 Free: 8228 (used 93.7% of 128KiB rom) Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2013-03-22pciinit: Enable default VGA deviceAlex Williamson3-1/+42
As QEMU gains PCI bridge and PCIe root port support, we won't always find the VGA device on the root bus. We therefore need to add support to find and enable a VGA device and the path to it through the VGA Enable support in the PCI bridge control register. Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2013-03-18mptable: Use same PCI irqs as ACPI code.Kevin O'Connor3-8/+8
The ACPI code has a hardcoded list of PCI interrupts. Use that same list in the mptable code generation. This will ensure that both tables are in synch - it may also make the mptable easier to generate from QEMU. Also, move the irq0_override lookup outside of the irq loop. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-03-18mptable: Don't describe pci-to-pci bridges.Kevin O'Connor1-12/+10
It should not be necessary to describe PCI-to-PCI bridges in the mptable. (The mptable was designed to fit in ROM, so it seems unlikely that it would be used for bridges that could be dynamically added.) Describing only the root bus should make it easier to port this content into QEMU. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-03-17Set ZF prior to keyboard read call in check_for_keystroke().Kevin O'Connor1-1/+1
Set the ZF flag to make sure the keyboard interrupt is actively clearing it on a key event. This fixes a hang when CONFIG_BOOTMENU is on and CONFIG_KEYBOARD is off. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-03-17Add dependencies to vgafixup.py and buildversion.sh scripts.Kevin O'Connor1-3/+3
Rebuild targets if these scripts change. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-03-17Update README - copy *.aml files for QEMU.Kevin O'Connor1-0/+1
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-03-17virtio-scsi: Pack struct virtio_scsi_{req_cmd,resp_cmd}Asias He1-2/+2
Device needs the exact size of these data structure. Prevent padding. This fixes guest hang when booting seabios + tcm_vhost. Signed-off-by: Asias He <asias@redhat.com>
2013-03-17virtio-scsi: Set _DRIVER_OK flag before scsi target scanningAsias He1-2/+3
Before we start scsi target scanning, we need to set the VIRTIO_CONFIG_S_DRIVER_OK flag so the device can do setup properly. This fix a bug when booting tcm_vhost with seabios. Signed-off-by: Asias He <asias@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com>
2013-03-09Fix bug in NUMA node setup - don't create SRAT if NUMA not present.Kevin O'Connor1-0/+2
Make sure to check for the case where there are no NUMA nodes passed in from QEMU. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-03-09Minor - add missing newline to floppy debug statement.Kevin O'Connor1-1/+1
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-03-09vgabios: Fix cirrus memory clear on mode switch.Kevin O'Connor3-6/+8
The cirrus_clear_vram() code wasn't actually doing anything because of a u8 overflow. Fix that. Fill with 0xff when performing a legacy cirrus mode switch (WinXP has been observed to incorrectly render dialog boxes if the memory is filled to 0). This was the behavior of the original LGPL vgabios code. To support this, add mechanism (MF_LEGACY) to allow vga drivers to detect if the mode switch is from vesa or int10. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-03-09vgabios: Fix stdvga_perform_gray_scale_summing().Kevin O'Connor1-0/+1
Fix conversion error that resulted in stdvga_perform_gray_scale_summing not actually writing the new results back. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-03-08Use VARVERIFY32INIT on global variables that point to "tmp" memory.Kevin O'Connor4-6/+8
Enable the recently added build check on global variables that are (or contain) pointers to memory allocated by malloc_tmp(). This helps detect cases where temporary memory is accessed after POST. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-03-08Add VARVERIFY32INIT attribute for variables only available during "init".Kevin O'Connor2-9/+13
Add a build check to verify certain variables are only reachable via the 32bit "init" code. This can be used as a mechanism to enforce certain data (and code that accesses that data) as only available during POST. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-03-08smm: Don't use PCIDevices list in smm_setup().Kevin O'Connor3-31/+37
The smm_setup() call is invoked from resume. The PCIDevices list is only valid during POST. Cache the necessary PCI BDF ids so that PCIDevices isn't needed. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-03-08shadow: Don't use PCIDevices list in make_bios_readonly().Kevin O'Connor1-21/+13
The make_bios_readonly() call is invoked from resume. The PCIDevices list is only valid during POST. Cache the necessary PCI BDF ids so that PCIDevices isn't needed. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-03-08Don't use __FILE__ in virtio-ring.c.Kevin O'Connor1-4/+2
Avoid referencing __FILE__ - that value changes depending on the user's build setting of OUT. The function and line number are sufficient. Also, use panic() instead of looping forever. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-03-08Add additional dependency checks to Makefile.Kevin O'Connor1-3/+6
Generate dependencies on pre-processed ASL files. This ensures that a change to an imported dsdt file will cause iasl to be called. Make .config depend on Kconfig files. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-03-06acpi: Eliminate BDAT parameter passing to DSDT code.Kevin O'Connor5-75/+71
The "BDAT" construct is the only ACPI mechanism that relies on SeaBIOS reserved memory. Replace it with the SSDT based template system. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>