Fix bug in CBFS file walking with compressed files.

The file walking code was incorrectly using the uncompressed file size
when searching for the next file.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Support custom boot menu prompt and custom boot menu key.

Allow configuration of the boot menu prompt and boot menu key (via the
romfile interface).  Some machines don't have an F12 key, so make this
configurable.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
acpi_extract.py: document DEVICE directives

commit 2b568ebb20b08c7881d976b5bc9f59a425bae5e6
    acpi_extract: detect DeviceOp
added new directives to acpi_extract.py, but didn't
document them.
Add documentation at top of file.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
apm: fix shutdown

Qemu commit 9ee59f3 removed the bochs bios apm interface emulation at
port 0x8900.  That broke poweroff via APM.  Fix it by powering off the
machine using the acpi pm control register.

Old code is left in, so seabios wil try both poweroff methods.  Cleaning
that eventually up is left for another patch, after checking it isn't
needed.  Qemu never implemented "Standby" and "Suspend", only
"Shutdown", so it looks like there might be non-qemu use cases (bochs
probably).

Easiest way to test this is the syslinux poweroff module; modern linux
distros usually have CONFIG_APM turned off.

Reported-by: Sebastian Herbszt <herbszt@gmx.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Minor cleanups to smm assembler.

Use size prefixes on assembler instructions.

Split the relocation smm handler into a separate section from the main
runtime smm handler.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add config option to support memory allocations in 9-segment.

Internal "low memory" allocations are currently placed in the UMB
region (0xc0000-0xf0000).  However, there have been reports of some
real machines that do not support DMA to this area of memory.  So, add
a compile time config option (off by default) to support placing all
internal low-memory allocations at the end of the 640K real-memory
area (0x90000-0xa0000).

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Minor - no need to declare MaxCountCPUs as VARFSEG.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Minor - simplify rom_reserve().

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