summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/boot/selfboot.c18
-rw-r--r--src/include/cbfs.h2
-rw-r--r--src/lib/cbfs.c18
3 files changed, 20 insertions, 18 deletions
diff --git a/src/boot/selfboot.c b/src/boot/selfboot.c
index d87fe50c82..faeadba0f0 100644
--- a/src/boot/selfboot.c
+++ b/src/boot/selfboot.c
@@ -71,6 +71,24 @@ struct ip_checksum_vcb {
unsigned short ip_checksum;
};
+void * cbfs_load_payload(struct lb_memory *lb_mem, const char *name)
+{
+ int selfboot(struct lb_memory *mem, struct cbfs_payload *payload);
+ struct cbfs_payload *payload = (struct cbfs_payload *)
+ cbfs_find_file(name, CBFS_TYPE_PAYLOAD);
+
+ struct cbfs_payload_segment *segment, *first_segment;
+
+ if (payload == NULL)
+ return (void *) -1;
+ printk_debug("Got a payload\n");
+ first_segment = segment = &payload->segments;
+ selfboot(lb_mem, payload);
+ printk_emerg("SELFBOOT RETURNED!\n");
+
+ return (void *) -1;
+}
+
/* The problem:
* Static executables all want to share the same addresses
* in memory because only a few addresses are reliably present on
diff --git a/src/include/cbfs.h b/src/include/cbfs.h
index adc3f5ab64..b11c3b316d 100644
--- a/src/include/cbfs.h
+++ b/src/include/cbfs.h
@@ -166,5 +166,7 @@ void * cbfs_get_file(const char *name);
void *cbfs_load_optionrom(u16 vendor, u16 device, void * dest);
int run_address(void *f);
+struct cbfs_stage *cbfs_find_file(const char *name, int type);
+
#endif
diff --git a/src/lib/cbfs.c b/src/lib/cbfs.c
index 4c025d1472..b5fb9b15eb 100644
--- a/src/lib/cbfs.c
+++ b/src/lib/cbfs.c
@@ -174,24 +174,6 @@ void *cbfs_load_optionrom(u16 vendor, u16 device, void * dest)
return dest;
}
-void * cbfs_load_payload(struct lb_memory *lb_mem, const char *name)
-{
- int selfboot(struct lb_memory *mem, struct cbfs_payload *payload);
- struct cbfs_payload *payload = (struct cbfs_payload *)
- cbfs_find_file(name, CBFS_TYPE_PAYLOAD);
-
- struct cbfs_payload_segment *segment, *first_segment;
-
- if (payload == NULL)
- return (void *) -1;
- printk_debug("Got a payload\n");
- first_segment = segment = &payload->segments;
- selfboot(lb_mem, payload);
- printk_emerg("SELFBOOT RETURNED!\n");
-
- return (void *) -1;
-}
-
void * cbfs_load_stage(const char *name)
{
struct cbfs_stage *stage = (struct cbfs_stage *)