ahci: add missing check for allocation failure

Triggerable by creating a virtual machine with
*lots* of ahci controllers and disks.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
bochsvga: fallback to stdvga if dispi interface isn't present

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
vgabios: Rename stdvga_bpp_factor to stdvga_vram_ratio.

Invert the values returned by stdvga_bpp_factor and rename it.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
vgabios: Limit the range of the VBE number of "pages" parameter.

Looking at the output of other VGA BIOS implementations, it appears
that the number of available video pages reported is always between 1
and 127.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
readme: Minor - fix typo in readme.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Split x86 specific functions out of util.c/h to new files x86.c/h.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Move keyboard calling code from util.c to boot.c.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Rename util.c to string.c and introduce string.h.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
build: Perform compile checking on vgasrc code.

Perform a compile check on each individual C file of the vgabios code
similar to the way that the main bios code does individual C compile
tests.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Move stacks.c definitions from util.h to new file stacks.h.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Move romfile definitions from util.h to new file romfile.h.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Move malloc code from pmm.c to new files malloc.c and malloc.h.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Move function definitions for output.c from util.h to new file output.h.

Also, sort the order of include files in the c files.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Move definition of struct segoff_s from farptr.h to types.h.

The segoff_s definition is used by a number of header files that would
not otherwise need farptr.h, so move it to a more central location.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
build: Fix import of gcc dependency files.

Make sure dependency file import works with new hw/ and fw/
sub-directories.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Move pirtable definitions from hw/pci.h to std/pirtable.h and util.h.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Move optionroms.h to std/optionrom.h and util.h.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Move vbe.h to std/vbe.h.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Move fw/LegacyBios.h to std/LegacyBios.h and remove csm.h.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Move fw/smbios.h to std/smbios.h.

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