add hw/serialio.c to SRC32SEG

Fixes build failure for CONFIG_COREBOOT=y.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Minor - move sgdt/lgdt macros from stacks.c to x86.h.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Separate out sec32init sections even when not doing code relocation.

The current code does not boot on QEMU with 256K roms when code
relocation is disabled, because QEMU only maps the last 128K of the
rom to low memory.  The seabios make_bios_writable() call copies the
full rom to low memory.

This patch separates out the init sections even if code relocations
are disabled.  This effectively ensures that make_bios_writable() code
is in the last 128K of the rom.

This also introduces a new build symbol (final_readonly_start) which
stores the address of where the final runtime read-only memory begins.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
floppy: Fix incorrect LBA to CHS translation.

The floppy LBA to CHS translation was incorrect for the last sector of
a given cylinder.  This wasn't a problem under QEMU as it came to the
same results anyway, but it causes errors of real floppy controllers.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
floppy: Fix accesses to DOR register.

The DOR register is a write-only register (even though QEMU and at
least some real hardware permit read/write acess).  So, do not read
from the DOR port.  Introduce a VARLOW variable (FloppyDOR) to store
the current state.

When resetting the controller, make sure to enable both the controller
and interrupts.  Also, make sure the controller is really reset (by
writing a 0 to DOR first) to ensure an IRQ is received on reset.

Also, add some additional dprintf statements to the floppy init path.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
vgabios: Avoid memory references via %esp register in vgabios.

Win7 interprets the vgabios and it does not properly handle memory
references relative to the %esp register.  Commit 4a8b58cb introduced
some of these %esp references - rework that assembler to avoid these
instructions and make win7 happy.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Small improvements to irqentry_extrastack assembler.

Simplify the entry assembler slightly.

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