summaryrefslogtreecommitdiff
path: root/src/lib/prog_loaders.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/prog_loaders.c')
-rw-r--r--src/lib/prog_loaders.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/lib/prog_loaders.c b/src/lib/prog_loaders.c
index a5598c7003..e27eca1f3a 100644
--- a/src/lib/prog_loaders.c
+++ b/src/lib/prog_loaders.c
@@ -33,6 +33,20 @@
/* Only can represent up to 1 byte less than size_t. */
const struct mem_region_device addrspace_32bit = MEM_REGION_DEV_INIT(0, ~0UL);
+int prog_locate(struct prog *prog)
+{
+ struct cbfsf file;
+
+ cbfs_prepare_program_locate();
+
+ if (cbfs_boot_locate(&file, prog_name(prog), NULL))
+ return -1;
+
+ cbfs_file_data(prog_rdev(prog), &file);
+
+ return 0;
+}
+
void run_romstage(void)
{
struct prog romstage =