sdcard: Initial support for SD cards on PCI SDHCI controllers on QEMU

This adds basic read/write support for SD cards emulated by QEMU.
This code is not expected to work on real hardware, because the
current controller and card initialization is not robust.

Signed-off-by: Kevin O'Connor <>
diff --git a/Makefile b/Makefile
index 1cff1d0..a84a5f7 100644
--- a/Makefile
+++ b/Makefile
@@ -39,7 +39,7 @@
 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 \
+    hw/ahci.c hw/pvscsi.c hw/usb-xhci.c hw/usb-hub.c hw/sdcard.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 \
     fw/acpi.c fw/mptable.c fw/pirtable.c fw/smbios.c fw/romfile_loader.c