#ifndef __PV_H
#define __PV_H
+#include "config.h" // CONFIG_COREBOOT
#include "util.h"
/* This CPUID returns the signature 'KVMKVMKVM' in ebx, ecx, and edx. It
u32 qemu_cfg_next_prefix_file(const char *prefix, u32 prevselect);
u32 qemu_cfg_find_file(const char *name);
int qemu_cfg_size_file(u32 select);
+const char* qemu_cfg_name_file(u32 select);
int qemu_cfg_read_file(u32 select, void *dst, u32 maxlen);
// Wrappers that select cbfs or qemu_cfg file interface.
return cbfs_copyfile((void*)fileid, dst, maxlen);
return qemu_cfg_read_file(fileid, dst, maxlen);
}
+static inline const char* romfile_name(u32 fileid) {
+ if (CONFIG_COREBOOT)
+ return cbfs_filename((void*)fileid);
+ return qemu_cfg_name_file(fileid);
+}
+void *romfile_loadfile(const char *name, int *psize);
+u64 romfile_loadint(const char *name, u64 defval);
u32 qemu_cfg_e820_entries(void);
void* qemu_cfg_e820_load_next(void *addr);