summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2018-11-15 18:43:58 -0700
committerTom Rini <trini@konsulko.com>2018-11-26 08:25:34 -0500
commitc21f407bf01cf497fd03fe404c1f06bdb36c88f9 (patch)
treeae4b9a166a0bfb21272d581bcd227b578b37c5d8 /common
parentaedc08b297b1682ac12acb81d0867606f422a15c (diff)
downloadu-boot-c21f407bf01cf497fd03fe404c1f06bdb36c88f9.tar.gz
u-boot-c21f407bf01cf497fd03fe404c1f06bdb36c88f9.tar.xz
u-boot-c21f407bf01cf497fd03fe404c1f06bdb36c88f9.zip
spl: Add a comment to spl_set_bd()
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. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common')
-rw-r--r--common/spl/spl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/common/spl/spl.c b/common/spl/spl.c
index 5a026b844e..43137105ba 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -378,6 +378,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;
}