build: Get fixed address variables from 32bit compile pass (not 16bit)

Update the build script so that fixed address sections
can come from the 32bit compiled C code.  Update the C code so that
all VAR16FIXED variables instead use the new VARFSEGFIXED which is
defined in 32bit mode.

Signed-off-by: Kevin O'Connor <>
diff --git a/Makefile b/Makefile
index e095601..eecb8a1 100644
--- a/Makefile
+++ b/Makefile
@@ -27,17 +27,17 @@
 # Source files
-SRCBOTH=misc.c stacks.c output.c string.c x86.c block.c cdrom.c mouse.c kbd.c \
-    serial.c clock.c resume.c pnpbios.c vgahooks.c pcibios.c apm.c \
+SRCBOTH=misc.c stacks.c output.c string.c block.c cdrom.c disk.c mouse.c kbd.c \
+    system.c serial.c clock.c resume.c pnpbios.c vgahooks.c pcibios.c apm.c \
     hw/pci.c hw/timer.c hw/rtc.c hw/dma.c hw/pic.c hw/ps2port.c hw/serialio.c \
     hw/usb.c hw/usb-uhci.c hw/usb-ohci.c hw/usb-ehci.c \
     hw/usb-hid.c hw/usb-msc.c hw/usb-uas.c \
     hw/blockcmd.c hw/floppy.c hw/ata.c hw/ramdisk.c \
     hw/virtio-ring.c hw/virtio-pci.c hw/virtio-blk.c hw/virtio-scsi.c \
     hw/lsi-scsi.c hw/esp-scsi.c hw/megasas.c
-SRC16=$(SRCBOTH) system.c disk.c font.c
-SRC32FLAT=$(SRCBOTH) post.c memmap.c malloc.c pmm.c romfile.c optionroms.c \
-    boot.c bootsplash.c jpeg.c bmp.c \
+SRC32FLAT=$(SRCBOTH) post.c memmap.c malloc.c romfile.c x86.c optionroms.c \
+    pmm.c font.c boot.c bootsplash.c jpeg.c bmp.c \
     hw/ahci.c hw/pvscsi.c hw/usb-xhci.c hw/usb-hub.c \
     fw/coreboot.c fw/lzmadecode.c fw/csm.c fw/biostables.c \
     fw/paravirt.c fw/shadow.c fw/pciinit.c fw/smm.c fw/smp.c fw/mtrr.c fw/xen.c \