aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-05-15Cache boot-fail-wait to avoid romfile access after POST.rel-1.7.2.21.7.2-stableKevin O'Connor1-6/+9
Memory allocated with malloc_tmp() can't be used after the POST phase. So, access boot-fail-wait in post phase and store it for the boot phase to use. This fixes the regression introduced by commit 59d6ca52. Signed-off-by: Kevin O'Connor <kevin@koconnor.net> Signed-off-by: Amos Kong <akong@redhat.com> (cherry picked from commit 11a7234491cb2a027b0fa5e82af38a3e78b44c80)
2013-05-15virtio-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> (cherry picked from commit 5a7730db57ab0715223421e65b54fb50d6fefe5c)
2013-05-15virtio-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> (cherry picked from commit b44a7be17bdd270ea029a8e2ec0c2e80c6cd0444)
2013-02-24seabios: Add a dummy PCI slot to irq mapping functionrel-1.7.2.1Alex Williamson1-1/+9
This should never get called, but if we somehow get a new chipset that fails to implement their own pci_slot_get_irq function, fail gracefully and add a debug log message. Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2013-02-24seabios q35: Add new PCI slot to irq routing functionAlex Williamson1-1/+32
q35/ich9 doesn't use the same interrupt mapping function as i440fx/piix. PIRQA:D and PIRQE:H are programmed identically, but we start at index 0, not index -1. Slots 25 through 31 are also programmed independently. When running qemu w/o this patch, a device at address 0:6.0 will have its PCI interrupt line register programmed with irq 10 (as seen by info pci), but it actually uses irq 11 (as reported the guest). Half of the interrupt lines are misprogrammedi like this. Functionally, a fully emulated qemu guest doesn't care much, but when we try to use device assignment, we really need to know the correct irqs. Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2013-02-24seabios q35: Enable all PIRQn IRQs at startupAlex Williamson1-4/+2
We seem to use the IRQEN bit of the PIRQn registers interchangeably to select APIC mode or to disable an IRQ. I can't decide if we're intending to disable the IRQ or select APIC mode here, but in either case it prevents PIC mode assigned devices from working. When seabios writes IRQEN to these registers, qemu interprets that as APIC mode, so while the boot ROM driver is waiting for an interrupt on ISA compatible IRQ 10 or 11, KVM is injecting interrupts to APIC pins 16 - 23. Devices on the root bus use PIRQE:H while the root ports use PIRQA:D. Enable them all so we don't limit where we support boot ROMs. The guest will later disable unused IRQs with the ACPI _DIS method. Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2013-02-24Verify CC is valid during build tests.Kevin O'Connor1-1/+8
Update test-build.sh to report if it can't run the c compiler at all. Without this test, a totally non-working build environment will yield an "invalid LD" message which can be confusing. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-02-24build: Don't require $(OUT) to be a sub-directory of the main directory.Kevin O'Connor3-10/+10
Remove references to "../" and "out/" from the build so that "make OUT=/a/b/c/" will work. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-02-24Fix Makefile - don't reference "out/" directly, instead use "$(OUT)".Kevin O'Connor1-3/+3
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-02-24USB-EHCI: Fix null pointer assignmentAvik Sil1-1/+1
cntl->regs should not be accessed before initializing it. Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com>
2013-02-24Update tools/acpi_extract.py to handle iasl 20130117 release.Kevin O'Connor1-2/+2
The latest iasl release produces "lst" output with "number: " instead of "number....". Update the tool to support both formats. Reported-by: Bo Yang <boyang@suse.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2013-01-12vgabios: implement AX=1120H..1124H functionsrel-1.7.2Paolo Bonzini1-0/+60
These function only have to set INT 1Fh and INT 43h, and set the BDA height + number of rows. I could not find out whether AX=1120h should also set the character height to 8. I think not, because INT 43h might still point to 14- or 16-pixel high characters and in this case INT 1Fh will not be used at all. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-01-12boot: Support "halt" in the boot order to prevent default boot attempts.Kevin O'Connor1-0/+8
Current seabios will attempt to boot from both configured devices and a list of default devices. Sometimes it is desirable to only attempt to boot from the configured devices and not from any of the default devices. This patch adds support for a "HALT" item in the "bootorder" file - its presence will prevent SeaBIOS from attempting any default boot actions. Signed-off-by: Kevin O'Connor <kevin@koconnor.net> Signed-off-by: Amos Kong <akong@redhat.com>
2013-01-08megasas: Invert PCI device selectionHannes Reinecke1-13/+12
Stupid typo from my side ... Signed-off-by: Hannes Reinecke <hare@suse.de>
2012-12-21Minor: Separate UUID display from F12 boot prompt.Kevin O'Connor2-2/+2
Place the extra newline as part of the F12 prompt instead of the SeaBIOS version banner so that a UUID report (when present) is still visually separated from the boot menu prompt. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2012-12-21display_uuid(): fix incomplete check after the loopLaszlo Ersek1-2/+2
In the v2->v3 change of what would become commit 37676f83 <http://www.seabios.org/pipermail/seabios/2012-December/005166.html>, the defense against an initial "addr > end" condition ("wraparound") was erroneously loosened. Signed-off-by: Laszlo Ersek <lersek@redhat.com>
2012-12-15acpi: Use prt_slot() macro to describe irq pins of first PCI device.Kevin O'Connor1-4/+1
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2012-12-15acpi: reintroduce LNKSPaolo Bonzini1-1/+17
Commit 4540409 (acpi: LNKS is not needed, 2012-08-07) removed LNKS because it basically worked by chance: _CRS returns something else then one of the possible resources from _PRS, _DIS would not really disable the interrupt, and there was no _SRS method. It just happened to work because all OSes have some kind of special-casing for SCI. Unfortunately, the code after the patch is also against the spec, and it breaks FreeBSD because it treats IRQ 9 polarity as active low without the Interrupt() entry. Actually, numeric _PRT entries are handled the same in Linux and FreeBSD (as active-low). However, under Linux it just happens to trigger another special casing of SCI which sets SCI up from its override entry in the MADT, ignoring the DSDT completely. This patch adds back the LNKS, but without using the PIIX register for LNKA in its methods. Tested-by: Luigi Rizzo <rizzo@iet.unipi.it> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-15maininit(): print machine UUID under seabios version messageLaszlo Ersek3-0/+72
There are users who would like to see the UUID at startup, and it probably won't bother others. Related RHBZ: 876250. Signed-off-by: Laszlo Ersek <lersek@redhat.com>
2012-12-11Add compile checking phase to build.Kevin O'Connor1-4/+8
The build textually includes all the code together in one unit for the compiler in order to use gcc's -fwhole-program option. Textually including all the code can mask subtle code errors (eg, forgetting to include the correct headers) and can lead to confusing error reports from the compiler. So, compile each file individually in addition to the normal textually inclusive build. This improves the error checking while still obtaining the benefits of -fwhole-program. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2012-12-11Don't use gcc's -combine option.Kevin O'Connor2-61/+6
The combine option has been deprecated from gcc for the last few revisions. The option doesn't add any real benefits, so there's no real point in checking for it on the few systems that will still have it. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2012-12-11Don't recursively evaluate CFLAGS variables.Kevin O'Connor1-6/+6
The $(cc-option) macro was being executed multiple times for each compiler invocation. That's a waste of time. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2012-12-07vga: Minor comment spelling fix.Kevin O'Connor1-1/+1
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2012-12-07floppy: Minor - reduce handle_0e code size when CONFIG_FLOPPY is disabled.Kevin O'Connor1-3/+2
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2012-12-06acpi: drop irq 8 from hpet ressourcesGerd Hoffmann1-0/+2
Fixes WinXP BSOD. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-12-05acpi: Minor - merge the two dsdt ISA areas into one ISA area.Kevin O'Connor1-28/+20
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2012-12-04acpi: fix COM2._UIDGerd Hoffmann1-1/+1
Commit 8d7449771068824b8bdb51fe622c10660b373d4f broke this. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-12-04acpi: reorder PX13 + ISAGerd Hoffmann1-12/+12
Without this windows 7 BSODs, probably because we are referencing PX13 from ISA. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-12-02acpi: PCI routing DSDT simplifications.Kevin O'Connor2-125/+98
Use define_link() macro in PIIX4 hardware definitions. Now that all remaining irq links are the same it's possible to just use a macro to define the link. Port several size optimizations to the q35 irq routing definitions: define the PRQx fields in the _SB scope to reduce size of register references, define CRS and STA methods in _SB scope to reduce code duplication, simplify acpi code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2012-12-02ACPI: Delineate q35 ACSP DSL code into sections.Kevin O'Connor1-2/+27
Add comments around major sections of the DSL file. Also, add scope declarations where needed so that each section only contains one scope. This is the q35 equivalent of e9fe15b86c6e98a91b30511d005ecdcc8a3e578d. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2012-12-02ACPI: Move q35 PCI irq definitions together.Kevin O'Connor1-66/+67
Place all the q35 irq definitions close to each other. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2012-12-02ACPI: Move PCI0 hotplug and irq definitions to there respective areas.Kevin O'Connor1-65/+68
Group the hotplug code and definitions together along with the irq code and definitions. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2012-12-02ACPI: Remove unnecessary Return(One) calls from q35 DSDT.Kevin O'Connor1-15/+0
Recent iasl compilers warn about spurious return calls. Remove extra return calls from the GPE event methods. This is the q35 dsdt equivalent of patch 475ce3f5f6a986877d637ac39f6ee23484ecc992. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2012-12-02acpi: Reindent DSDT code.Kevin O'Connor10-760/+690
This patch is purely cosmetic - no code changes should be observed. Use a consistent indentation style with the ACPI DSDT code: 1 - Use spaces (no tabs) and 4 space indentation 2 - Place opening braces on same line as statement declaration 3 - Don't put a space between statement and opening parenthesis, except for control statements (If, Else, While, Return) where a space is always present Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2012-12-01acpi: move isa devices to separate file [q35]Gerd Hoffmann1-183/+11
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2012-12-01acpi: add mcfg table for mmconfigGerd Hoffmann2-0/+40
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2012-12-01q35: fix default vga addressGerd Hoffmann1-1/+1
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-12-01acpi: move isa devices to separate fileGerd Hoffmann2-174/+136
Stuff them parameterized into #defines, so we can (a) reuse them for q35 and (b) don't duplicate the serial line. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-12-01acpi: rework enable bitsGerd Hoffmann1-21/+28
Model the device enable bits as fields so they can be accessed directly by name. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-12-01acpi: move cpu hotplug to separate file [q35]Gerd Hoffmann1-72/+2
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-12-01acpi: move cpu hotplug to separate fileGerd Hoffmann2-76/+78
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-12-01acpi: move \_SB.PCI0._CRS to separate file [q35]Gerd Hoffmann1-105/+1
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-12-01acpi: move \_SB.PCI0._CRS to separate fileGerd Hoffmann2-105/+109
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-12-01acpi: move \_SB.HPET to separate file [q35]Gerd Hoffmann1-19/+2
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-12-01acpi: move \_SB.HPET to separate fileGerd Hoffmann2-36/+37
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-12-01acpi: move DBUG() to separate file [q35]Gerd Hoffmann1-24/+1
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-12-01acpi: move DBUG() to separate fileGerd Hoffmann2-30/+31
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-12-01seabios: q35: Register PCI IRQs as active high in APIC modeJan Kiszka1-13/+33
Seems important for Windows. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Jason Baron <jbaron@redhat.com>
2012-12-01seabios: q35: add dsdtIsaku Yamahata2-1/+831
add dsdt for q35 chipset of qemu. [jbaron: remove suspd bits since they are now auto-generated, move pci window to 0xb0000000, add framework for auto generated pci windows] [kraxel: remove pci express root ports + pci bridge] Cc: Matthew Garrett <mjg59@srcf.ucam.org> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Jason Baron <jbaron@redhat.com>
2012-12-01seabios: add q35 initialization functions.Isaku Yamahata5-5/+207
add q35 initialization functions. [jbaron@redhat.com: restructured to current seabios base, updated pci base to 0xb0000000] [kraxel@redhat.com: join the two lpc init funcs into one] Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Jason Baron <jbaron@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>