summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-01-24 10:06:03 -0700
committerBin Meng <bmeng.cn@gmail.com>2021-02-01 15:11:41 +0800
commit86c372af1abd02f6d81c287159e5d80bb27b8ae4 (patch)
tree0debd858c894d13c390efbf483fc1b52b199ec35 /include
parent6754393d260cf779a1c441a58c305a6b62e6a82d (diff)
downloadu-boot-86c372af1abd02f6d81c287159e5d80bb27b8ae4.tar.gz
u-boot-86c372af1abd02f6d81c287159e5d80bb27b8ae4.tar.bz2
u-boot-86c372af1abd02f6d81c287159e5d80bb27b8ae4.zip
x86: spl: Add a function to find the text base
It is useful to know the TEXT_BASE value for the image being loaded in TPL/SPL. Add a new spl_get_image_text_base() function to handle this. Make use of this in the x86 SPL handler, instead of having the logic there. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/spl.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/spl.h b/include/spl.h
index faffeb519a..e172500b5f 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -255,6 +255,16 @@ ulong spl_get_image_pos(void);
ulong spl_get_image_size(void);
/**
+ * spl_get_image_text_base() - get the text base of the next phase
+ *
+ * This returns the address that the next stage is linked to run at, i.e.
+ * CONFIG_SPL_TEXT_BASE or CONFIG_SYS_TEXT_BASE
+ *
+ * @return text-base address
+ */
+ulong spl_get_image_text_base(void);
+
+/**
* spl_load_simple_fit_skip_processing() - Hook to allow skipping the FIT
* image processing during spl_load_simple_fit().
*