summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2007-07-15 14:02:53 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2007-07-15 14:02:53 +0200
commit8881fb7984fb86469e0e66b88d8230be347e21f9 (patch)
treed8ebe4c3c5e8b2dd6f4be71dea425a60ea2d3c96 /include
parent665291e693efd1fd2955c6f8bfb89956711b0aef (diff)
downloadbarebox-8881fb7984fb86469e0e66b88d8230be347e21f9.tar.gz
barebox-8881fb7984fb86469e0e66b88d8230be347e21f9.tar.xz
use memmap() to save one memcpy call in bootm
Diffstat (limited to 'include')
-rw-r--r--include/boot.h14
-rw-r--r--include/image.h11
2 files changed, 11 insertions, 14 deletions
diff --git a/include/boot.h b/include/boot.h
index 09d4ce6314..889773bc2c 100644
--- a/include/boot.h
+++ b/include/boot.h
@@ -2,21 +2,11 @@
#define __BOOT_H
#ifdef CONFIG_OF_FLAT_TREE
-int do_bootm_linux(image_header_t *os, image_header_t *initrd,
+int do_bootm_linux(struct image_handle *os, struct image_handle *initrd,
const char *oftree);
#else
-int do_bootm_linux(image_header_t *os, image_header_t *initrd);
+int do_bootm_linux(struct image_handle *os, struct image_handle *initrd);
#endif
#endif /* __BOOT_H */
-#ifndef __BOOT_H
-#define __BOOT_H
-
-#ifdef CONFIG_OF_FLAT_TREE
-int do_bootm_linux(image_header_t *os, image_header_t *initrd,
- const char *oftree);
-#else
-int do_bootm_linux(image_header_t *os, image_header_t *initrd);
-#endif
-#endif /* __BOOT_H */
diff --git a/include/image.h b/include/image.h
index 5d744beb6b..648e9d6bed 100644
--- a/include/image.h
+++ b/include/image.h
@@ -180,6 +180,13 @@ typedef struct image_header {
uint8_t ih_name[IH_NMLEN]; /* Image Name */
} image_header_t;
+struct image_handle {
+ image_header_t header;
+ void *data;
+#define IH_MALLOC 1
+ int flags;
+};
+
/* commamds/bootm.c */
void print_image_hdr (image_header_t *hdr);
@@ -187,12 +194,12 @@ void print_image_hdr (image_header_t *hdr);
* Load an image into memory. Returns a pointer to the loaded
* image.
*/
-image_header_t *map_image(const char *filename, int verify);
+struct image_handle *map_image(const char *filename, int verify);
/*
* Relocate an image to load_address by uncompressing
* or just copying.
*/
-int relocate_image(image_header_t *hdr, void *load_address);
+int relocate_image(struct image_handle *handle, void *load_address);
#endif /* __IMAGE_H__ */