floppy: Minor - reduce handle_0e code size when CONFIG_FLOPPY is disabled.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
vga: Minor comment spelling fix.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Don't recursively evaluate CFLAGS variables.

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>
Don't use gcc's -combine option.

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>
Add compile checking phase to build.

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>
maininit(): print machine UUID under seabios version message

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>
acpi: reintroduce LNKS

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>
acpi: Use prt_slot() macro to describe irq pins of first PCI device.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
display_uuid(): fix incomplete check after the loop

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>
Minor: Separate UUID display from F12 boot prompt.

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>
megasas: Invert PCI device selection

Stupid typo from my side ...

Signed-off-by: Hannes Reinecke <hare@suse.de>
boot: add a new type to halt booting

Current seabios will try to boot from selected devices first,
if they are all failed, seabios will also try to boot from
un-selected devices.

For example:
@ qemu-kvm -boot order=n,menu=on ...

Guest will boot from network first, if it's failed, guest will try to
boot from other un-selected devices (floppy, cdrom, disk) one by one.

We need to make it configurable. This patch added a new type, qemu can
add "HALT" at the end of bootindex string, then seabios will halt
booting after trying to boot from selected devices.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Signed-off-by: Amos Kong <akong@redhat.com>