summaryrefslogtreecommitdiff
path: root/include/spl.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-12-08 17:40:12 -0700
committerBin Meng <bmeng.cn@gmail.com>2019-12-15 11:44:28 +0800
commite82c624d7cd0640da789ecb0d6906db491003e2d (patch)
treec7acbb5498e12ffee8f4a7bfb50c104cd92c06fc /include/spl.h
parentf5b18ae3097ceaced8bef2e82f659af62433ebe1 (diff)
downloadu-boot-e82c624d7cd0640da789ecb0d6906db491003e2d.tar.gz
u-boot-e82c624d7cd0640da789ecb0d6906db491003e2d.tar.bz2
u-boot-e82c624d7cd0640da789ecb0d6906db491003e2d.zip
spl: Add methods to find the position/size of next phase
Binman supports writing the position and size of U-Boot proper and SPL into the previous phase of U-Boot. This allows the next phase to be easily located and loaded. Add functions to return these useful values, along with symbols to allow TPL to load SPL. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'include/spl.h')
-rw-r--r--include/spl.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/include/spl.h b/include/spl.h
index 08ffddac29..02aa1ff85d 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -169,10 +169,29 @@ struct spl_load_info {
* We need to know the position of U-Boot in memory so we can jump to it. We
* allow any U-Boot binary to be used (u-boot.bin, u-boot-nodtb.bin,
* u-boot.img), hence the '_any'. These is no checking here that the correct
- * image is found. For * example if u-boot.img is used we don't check that
+ * image is found. For example if u-boot.img is used we don't check that
* spl_parse_image_header() can parse a valid header.
+ *
+ * Similarly for SPL, so that TPL can jump to SPL.
*/
binman_sym_extern(ulong, u_boot_any, image_pos);
+binman_sym_extern(ulong, u_boot_any, size);
+binman_sym_extern(ulong, spl, image_pos);
+binman_sym_extern(ulong, spl, size);
+
+/**
+ * spl_get_image_pos() - get the image position of the next phase
+ *
+ * This returns the image position to use to load the next phase of U-Boot
+ */
+ulong spl_get_image_pos(void);
+
+/**
+ * spl_get_image_size() - get the size of the next phase
+ *
+ * This returns the size to use to load the next phase of U-Boot
+ */
+ulong spl_get_image_size(void);
/**
* spl_load_simple_fit_skip_processing() - Hook to allow skipping the FIT