Fix PNP regression introduced in 99cb8f3e due to missed conversion

Commit 99cb8f3e missed a conversion from 12(%esp) to BREGS_eax(%esp)
causing winxp to break.

Reported-by: Ian Campbell <Ian.Campbell@citrix.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
megasas: read addional PCI I/O bar

Some newer cards have the I/O bar at BAR 0, so we need to check
that, too, if we cannot get an address for BAR 2.
Without this patch the new 'megasas-gen2' emulation in qemu
is not detected.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Minor - move PORT_PS2_CTRLB from hw/ps2port.h to hw/timer.c

The PORT_PS2_CTRLB port is only used by timers - it's just a
historical artifact that it was part of the original ps2 controller.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
vgabios: Support emulating text mode attributes while in graphics mode

Add support for simple text mode attribute emulation while in graphics
mode.  This improves text highlighting and background color on some
boot-loaders.  Enable it only for CBVGA vgabios and only when a text
mode is requested.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
vgabios: Add software cursor capability

Add mechanism for drawing a cursor to the framebuffer to implement a
cursor in software.  The timer interrupt is "hooked" so that the
cursor can blink.  This can be useful for "coreboot native vga".

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Use an aligned stack offset when entering on the extra stack

The size of 'struct bregs' is not evenly divisible by four and where
the assembler placed a 'struct bregs' on the extra stack as part of
entering into the C functions it caused the C functions to run with a
non-aligned stack.  It's technically not correct to use an unaligned
stack and it is certainly less efficient.

This patch avoids using BREGS_size (the sizeof struct bregs) and
instead introduces PUSHBREGS_size (the size of the general purpose
registers in struct bregs) in the assembler.  Where the code actually
did use the %cs:%ip and flags, an extra 8 (instead of 6) bytes are
added to maintain a sane alignment.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Minor - comment updates in romlayout.S

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Fix build issue on gcc34

Older versions of gcc may not inline on_extra_stack() and thus cause a
link error when compiling in 32bit segmented mode.  Test for MODE16
explicitly in stack_hop_back() to prevent the problem.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
pciinit: Fix build warning in mch_pci_slot_get_irq()

Some old versions of gcc warn that 'irq might be used uninitialized'.
Replace the switch statement with an if statement to suppress the
warning.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
add scripts/tarball.sh

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
build: set LC_ALL=C

Avoids tools such as layoutrom stumble over localized messages.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Tested-By: Patrick Georgi <pgeorgi@google.com>
floppy: Make sure to yield() during floppy PIO

The floppy Programmed IO code really should yield while the controller
is busy.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Minor - be consistent in placement of .code16/32 in romlayout.S

Place .code32 in those functions that need it, and make sure every
function ends in .code16 mode.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Use macros for .code16/32 mode switches in inline asm in stacks.c

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Eliminate FUNCFSEG - only force portions of inline asm to f-segment

The FUNCFSEG macro was introduced to force a C function into the
f-segment.  This was needed for some C functions that used inline
assembler that contained some 16bit code.  Instead of forcing the
entire C function into the f-segment, just force the small subset of
inline assembler into the f-segment.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
usb: Update USB hub code to support super speed hubs

Super speed hubs (usb3 spec) have specific initialization
requirements.  Add the code necessary to detect and initialize these
hubs.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Simplify README files - point to online documentation instead

The README file and README.CSM file have gotten a bit out of date.
Instead of maintaining technical information in the README file, point
new users to the SeaBIOS wiki.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
sdcard: Initial support for SD cards on PCI SDHCI controllers on QEMU

This adds basic read/write support for SD cards emulated by QEMU.
This code is not expected to work on real hardware, because the
current controller and card initialization is not robust.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add wiki documentation to repository

Add a docs/ directory that contains the contents of the SeaBIOS wiki
in markdown format.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
docs: Don't point to repo README files

Now that the README files have been simplified, don't point the wiki
pages to them.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>