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>
This commit is contained in:
@@ -378,6 +378,10 @@ static int spl_common_init(bool setup_malloc)
|
|||||||
|
|
||||||
void spl_set_bd(void)
|
void spl_set_bd(void)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
* NOTE: On some platforms (e.g. x86) bdata may be in flash and not
|
||||||
|
* writeable.
|
||||||
|
*/
|
||||||
if (!gd->bd)
|
if (!gd->bd)
|
||||||
gd->bd = &bdata;
|
gd->bd = &bdata;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user