diff mbox series

[U-Boot,v3,10/21] spl: Add a comment to spl_set_bd()

Message ID 20181116014409.147279-11-sjg@chromium.org
State Accepted
Delegated to: Tom Rini
Headers show
Series spl: Add features for passing info from SPL to U-Boot proper | expand

Commit Message

Simon Glass Nov. 16, 2018, 1:43 a.m. UTC
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>
---

Changes in v3: None
Changes in v2: None

 common/spl/spl.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Tom Rini Nov. 26, 2018, 6:44 p.m. UTC | #1
On Thu, Nov 15, 2018 at 06:43:58PM -0700, Simon Glass wrote:

> 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>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/common/spl/spl.c b/common/spl/spl.c
index 5a026b844e9..43137105bab 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;
 }