[U-Boot] [PATCH v2 11/23] spl: Add a comment to spl_set_bd()
Simon Glass
sjg at chromium.org
Tue Oct 2 11:22:41 UTC 2018
There is a strange feature to set global_data to a data-section variable
early in SPL. This only works if SPL actually has access to SRAM which is
not the case on x86, for eaxmple. Add a comment to this effect.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
Changes in v2: None
common/spl/spl.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/common/spl/spl.c b/common/spl/spl.c
index 9faed0a2adb..396c42e1e1b 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -380,6 +380,10 @@ static int spl_common_init(bool setup_malloc)
void spl_set_bd(void)
{
+ /*
+ * NOTE: On some platforms (e.g. x86) bdata may be in flash and not
+ * writeable.
+ */
if (!gd->bd)
gd->bd = &bdata;
}
--
2.19.0.605.g01d371f741-goog
More information about the U-Boot
mailing list