All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] xilinx: zynqmp: Do not use 0 as spl bss start address
@ 2022-06-07  7:43 Stefan Herbrechtsmeier
  2022-06-07  8:13 ` Michal Simek
  0 siblings, 1 reply; 13+ messages in thread
From: Stefan Herbrechtsmeier @ 2022-06-07  7:43 UTC (permalink / raw)
  To: u-boot; +Cc: Stefan Herbrechtsmeier, Michal Simek

From: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>

Do not use 0 as address for memory because of the special meaning for
pointers (null pointer). Change the spl bss start address to the second
page.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>

---
The problem was discovered with a static array initialized with zero.
The compiler placed the array at address 0 and thereby a pointer to the
array was interpreted as null pointer.

Changes in v2:
- Rework commit message and replace address null by 0

 include/configs/xilinx_zynqmp.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/configs/xilinx_zynqmp.h b/include/configs/xilinx_zynqmp.h
index f25d796a1e..21a5cf1617 100644
--- a/include/configs/xilinx_zynqmp.h
+++ b/include/configs/xilinx_zynqmp.h
@@ -209,7 +209,7 @@
 #define CONFIG_SPL_MAX_SIZE		0x40000
 
 /* Just random location in OCM */
-#define CONFIG_SPL_BSS_START_ADDR	0x0
+#define CONFIG_SPL_BSS_START_ADDR	0x1000
 #define CONFIG_SPL_BSS_MAX_SIZE		0x80000
 
 #if defined(CONFIG_SPL_SPI_FLASH_SUPPORT)
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2022-07-14 12:26 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-07  7:43 [PATCH v2] xilinx: zynqmp: Do not use 0 as spl bss start address Stefan Herbrechtsmeier
2022-06-07  8:13 ` Michal Simek
2022-06-10 14:42   ` Stefan Herbrechtsmeier
2022-06-10 16:48     ` [SPAM] " Xavier Drudis Ferran
2022-06-13  7:20       ` Michal Simek
2022-06-13  8:21         ` Stefan Herbrechtsmeier
2022-06-13  9:02           ` Stefan Herbrechtsmeier
2022-06-14 13:03             ` Michal Simek
2022-06-14 15:34               ` Stefan Herbrechtsmeier
2022-06-14 15:49                 ` Michal Simek
2022-06-14 16:24                   ` Stefan Herbrechtsmeier
2022-07-14 12:22   ` Stefan Herbrechtsmeier
2022-07-14 12:26     ` Michal Simek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.