Cache romfile entries.

Create a 'struct romfile_s' and populate a list of all romfiles at
start of init.  Caching the romfiles both simplifies the code and
makes it more efficient.

Also, convert the ramdisk code to use romfile helpers instead of
directly accessing cbfs.

Signed-off-by: Kevin O'Connor <>
diff --git a/src/boot.c b/src/boot.c
index 3f6375b..6949490 100644
--- a/src/boot.c
+++ b/src/boot.c
@@ -11,8 +11,8 @@
 #include "bregs.h" // struct bregs
 #include "boot.h" // func defs
 #include "cmos.h" // inb_cmos
-#include "paravirt.h" // romfile_loadfile
-#include "pci.h" //pci_bdf_to_*
+#include "paravirt.h" // qemu_cfg_show_boot_menu
+#include "pci.h" // pci_bdf_to_*
 #include "usb.h" // struct usbdevice_s