summaryrefslogtreecommitdiff
path: root/include/binman_sym.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-11-13 18:55:03 -0700
committerSimon Glass <sjg@chromium.org>2017-12-12 19:53:45 -0700
commit8bee2d251afb61c203aa94877cf5077731822ed5 (patch)
tree38dce2f79df048900946da20b32fb5bb1e0e236c /include/binman_sym.h
parentcf2a8fd66d8d4b855f5955e15e4d8e436b4bc3d5 (diff)
binman: Add binman symbol support to SPL
Allow SPL to access binman symbols and use this to get the address of U-Boot. This falls back to CONFIG_SYS_TEXT_BASE if the binman symbol is not available. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/binman_sym.h')
-rw-r--r--include/binman_sym.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/binman_sym.h b/include/binman_sym.h
index 3999b26d8d..87d03d5294 100644
--- a/include/binman_sym.h
+++ b/include/binman_sym.h
@@ -38,6 +38,17 @@
__attribute__((aligned(4), unused, section(".binman_sym")))
/**
+ * binman_sym_extern() - Declare a extern symbol that will be used at run-time
+ *
+ * @_type: Type f the symbol (e.g. unsigned long)
+ * @entry_name: Name of the entry to look for (e.g. 'u_boot_spl')
+ * @_prop_name: Property value to get from that entry (e.g. 'pos')
+ */
+#define binman_sym_extern(_type, _entry_name, _prop_name) \
+ extern _type binman_symname(_entry_name, _prop_name) \
+ __attribute__((aligned(4), unused, section(".binman_sym")))
+
+/**
* binman_sym_declare_optional() - Declare an optional symbol
*
* If this symbol cannot be provided by binman, an error will not be generated.
@@ -73,6 +84,8 @@
#define binman_sym_declare_optional(_type, _entry_name, _prop_name)
+#define binman_sym_extern(_type, _entry_name, _prop_name)
+
#define binman_sym(_type, _entry_name, _prop_name) BINMAN_SYM_MISSING
#endif /* BINMAN */