bios: Remove comapi calls related to the ADV

The only comapi calls left are the ones related to the ADV and to
shuffle and boot.  Remove the ADV-related ones as part of getting rid
of the comapi framework completely.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
bios: Remove shuffle and boot comapi call

Remove the shuffle and boot comapi call.  This is the last of the
comapi calls left; we should now be able to completely remove the
comapi support.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
comapi: Remove the comapi interfaces completely

Remove the last bits of the comapi interfaces completely.  This does
not install stub handlers for the INT 20-3Fh handlers, as we don't
support loading old COMBOOT/COM32/COM32R images anymore.

We could put those back if we really need them.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
lib.mk: Add biosboot.o

We need biosboot.o for shuffle and boot now.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
bios: Fix lowmem check

The lowmem check was backwards and would report error when there
wasn't any.  This was missed because the Ctrl key check was *also*
backwards and so the check would only be done when Ctrl was held down.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
bios: Don't truncate memory size needed to 16 bits

We can't truncate the memory size needed to 16 bits *before* we
convert it to kilobytes...

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Merge branch 'syslinux-5.xx'

Resolved Conflicts:
	core/init.c

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
core, bios: Incorrect detection of EDD in /core/fs/diskio_bios.c

DL register is not set to drive number when detecting EDD for drive,
so detection may fail.

Signed-off-by: Andy Alex <andy at r-tt.com>
Makefiles: export the firmware type as a cpp variable

Export the firmware type as a cpp variable so we can #ifdef.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
shuffler: Actually get the shuffler size sanely

Actually get the shuffler size sanely.  At least for now, we are BIOS
only, so stub out the functions on EFI (they shouldn't even be
compiled for EFI; this stuff should be moved into some kind of
BIOS-only directory.)

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
core, bios: Move __syslinux_shuffler_size to assembly

Putting the __syslinux_shuffler_size in a C file by itself caused it
to not get included in the core, causing failures.  Put it in assembly
to make sure it really gets included there.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
lua: import Lua 5.2.2

Source downloaded from http://www.lua.org/ftp/lua-5.2.2.tar.gz.
The com32/lua directory now matches exactly the source distribution,
plus the various Syslinux extension modules and their documentation.
lua: replace src/Makefile to build Lua as a Syslinux COM32 module

Start with the src/Makefile in Syslinux before importing Lua 5.2.2.
Refresh the core Lua object list based on the original Makefile.
Add the new builtin library objects.
Temporarily remove the Syslinux extension library objects, as they
need adjustments for the new API.
dev.h: get size_t definition
lua: the COM32 API does not provide signal.h
lua: explicitly put the console in standard mode
lua: the COM32 API does not provide locale.h
lua: use integer arithmetic
lua: the COM32 API does not provide strcoll()
lua: the COM32 API supports only part of iolib