spl: Add a comment to spl_set_bd()
authorSimon Glass <sjg@chromium.org>
Fri, 16 Nov 2018 01:43:58 +0000 (18:43 -0700)
committerTom Rini <trini@konsulko.com>
Mon, 26 Nov 2018 13:25:34 +0000 (08:25 -0500)
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>
common/spl/spl.c

index 5a026b8..4313710 100644 (file)
@@ -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;
 }