From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Wed, 26 Sep 2018 15:55:09 -0600 Subject: [U-Boot] [PATCH 11/22] spl: Add a comment to spl_set_bd() In-Reply-To: <20180926215520.87168-1-sjg@chromium.org> References: <20180926215520.87168-1-sjg@chromium.org> Message-ID: <20180926215520.87168-12-sjg@chromium.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- common/spl/spl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/spl/spl.c b/common/spl/spl.c index 0f64902b9b0..69e4aca8a58 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -375,6 +375,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